LLVM/project eb690e6 — clang/lib/Driver ToolChain.cpp, clang/lib/Driver/ToolChains BareMetal.cpp

[clang][nfc] Add baremetal runtime path checks (#238184)

Showing how the multilib configuration affects runtime include and lib
paths.

This change also adds comments to describe why the include paths and lib
paths have slightly different handling.

Assisted-by: AI
DeltaFile
+3-1clang/test/Driver/baremetal-multilib.yaml
+4-0clang/lib/Driver/ToolChain.cpp
+2-0clang/lib/Driver/ToolChains/BareMetal.cpp
+1-0clang/test/Driver/Inputs/multilib_baremetal_resource_tree/lib/thumbv8m.main-unknown-none-eabihf/arm-none-eabi/thumb/v8-m.main/fp/libclang_rt.builtins.a
+10-14 files

FreeBSD/ports 673c907 — graphics/p5-Image-ExifTool-devel Makefile pkg-plist

graphics/p5-Image-ExifTool-devel: Update 13.61 => 13.62

Changelog:
https://exiftool.org/history.html#v13.62

PR:             300667
Sponsored by:   UNIS Labs (vvd, commit patch)
DeltaFile
+3-3graphics/p5-Image-ExifTool-devel/distinfo
+1-1graphics/p5-Image-ExifTool-devel/Makefile
+2-0graphics/p5-Image-ExifTool-devel/pkg-plist
+6-43 files

LLVM/project ac31c61 — compiler-rt/cmake config-ix.cmake, compiler-rt/test/sanitizer_common CMakeLists.txt

[compiler-rt][test] Keep -funwind-tables in sanitizer_common

`get_test_cc_for_arch` is also used by `Builtins-armhf-linux`, which
links tests with `-nodefaultlibs` and without `libunwind`/`libgcc_eh`.
Passing `-funwind-tables` there emits `.ARM.exidx` tables with undefined
references to `__aeabi_unwind_cpp_pr0` and `__aeabi_unwind_cpp_pr1` on
https://lab.llvm.org/buildbot/#/builders/clang-armv8-lld-2stage
(#240790).

Keep `-funwind-tables` in `sanitizer_common` and only propagate
`--sysroot=${CMAKE_SYSROOT}` in `get_test_cc_for_arch`.

Assisted-by: Gemini
DeltaFile
+2-7compiler-rt/cmake/config-ix.cmake
+8-0compiler-rt/test/sanitizer_common/CMakeLists.txt
+10-72 files

LLVM/project b891523 — compiler-rt/cmake config-ix.cmake, compiler-rt/test/sanitizer_common CMakeLists.txt

Reland "[compiler-rt][test] Apply CFLAGS from sanitizer_common to all tests"

Reverts llvm/llvm-project#240790 (7ef93748feaebefe516af5ebdee432a820ca37f5).
Relands llvm/llvm-project#239742 (97218874e828e38eac17c5ecef78ef962fae0342)
and llvm/llvm-project#120798 (b757bc8b13b1088e2f2b1b98aa33ebb16334b59d).

Co-authored-by: Aaron Puchert <aaron.puchert at sap.com>
Assisted-by: Gemini
DeltaFile
+0-11compiler-rt/test/sanitizer_common/CMakeLists.txt
+8-0compiler-rt/cmake/config-ix.cmake
+8-112 files

LLVM/project ed504d9 — llvm/include/llvm/IR RuntimeLibcalls.td, llvm/test/Transforms/Util/DeclareRuntimeLibcalls systemz.ll bsd.ll

RuntimeLibcalls: Add missing attributes to memory and allocator libcalls

Add the attributes inferLibFuncAttributes would give these functions.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+74-26llvm/include/llvm/IR/RuntimeLibcalls.td
+49-35llvm/test/Transforms/Util/DeclareRuntimeLibcalls/ppc.ll
+46-36llvm/test/Transforms/Util/DeclareRuntimeLibcalls/aarch64.ll
+36-28llvm/test/Transforms/Util/DeclareRuntimeLibcalls/windows.ll
+27-21llvm/test/Transforms/Util/DeclareRuntimeLibcalls/bsd.ll
+18-14llvm/test/Transforms/Util/DeclareRuntimeLibcalls/systemz.ll
+250-16016 files not shown
+430-28722 files

LLVM/project 3fe1e7a — llvm/include/llvm/IR RuntimeLibcalls.td, llvm/test/Transforms/Util/DeclareRuntimeLibcalls divmod.ll

RuntimeLibcalls: Annotate divrem libcall remainder out arguments

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+16-5llvm/include/llvm/IR/RuntimeLibcalls.td
+3-2llvm/test/Transforms/Util/DeclareRuntimeLibcalls/divmod.ll
+19-72 files

LLVM/project 82a705c — llvm/include/llvm/IR RuntimeLibcallsImpl.td RuntimeLibcalls.td, llvm/lib/IR RuntimeLibcalls.cpp

RuntimeLibcalls: Move divrem attributes to TableGen

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+0-21llvm/lib/IR/RuntimeLibcalls.cpp
+2-0llvm/include/llvm/IR/RuntimeLibcalls.td
+1-0llvm/include/llvm/IR/RuntimeLibcallsImpl.td
+3-213 files

LLVM/project 7dca1b8 — llvm/test/CodeGen/AArch64 settag.ll stack-tagging-dynamic-alloca.ll

Remove redundant tests
DeltaFile
+0-137llvm/test/CodeGen/AArch64/stack-tagging-dynamic-alloca.ll
+0-13llvm/test/CodeGen/AArch64/settag.ll
+0-1502 files

LLVM/project 1f6ce16 — llvm/include/llvm/Transforms/Utils MemoryTaggingSupport.h, llvm/lib/Target/AArch64 AArch64StackTagging.cpp

Address review feedback
DeltaFile
+47-46llvm/lib/Target/AArch64/AArch64StackTagging.cpp
+14-0llvm/test/CodeGen/AArch64/stack-tagging-dynamic-alloca.ll
+2-1llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
+1-1llvm/include/llvm/Transforms/Utils/MemoryTaggingSupport.h
+2-0llvm/test/CodeGen/AArch64/stack-tagging-dynamic-alloca-history.ll
+66-485 files

LLVM/project 1e7e654 — lldb/include/lldb/Target Process.h, lldb/source/Target Process.cpp

[LLDB] Guard Process::m_instrumentation_runtimes with a mutex

This patch is the sixth part in a patch series that will allow
enabling/disabling InstrumentationRuntime plugins in a running debug
session.

`Process::m_instrumentation_runtimes` can be accessed from multiple
threads. For example, a plugin can be enabled/disabled in a process
from the command thread (or from another debugger when using the
`global` domain) while `Process::ModulesDidLoad()` iterates over the
plugins on another thread, or while an SB API client calls
`Process::GetInstrumentationRuntime()`. These accesses were
unsynchronized.

Now every access to `m_instrumentation_runtimes` is guarded by the new
`m_instrumentation_runtimes_mutex`:

* `Process::Finalize()` and `Process::DidExec()` clear the map while
  holding the mutex.

    [13 lines not shown]
DeltaFile
+25-10lldb/source/Target/Process.cpp
+2-0lldb/include/lldb/Target/Process.h
+27-102 files

LLVM/project 38c2bf8 — lldb/include/lldb/Target InstrumentationRuntime.h, lldb/source/Plugins/InstrumentationRuntime/ASan InstrumentationRuntimeASan.cpp

[LLDB] Keep InstrumentationRuntime plugins alive during breakpoint callbacks

This patch is the fifth part in a patch series that will allow
enabling/disabling InstrumentationRuntime plugins in a running debug
session.

InstrumentationRuntime plugins passed a raw `this` pointer as the baton
for their breakpoint callbacks. Now that disabling a plugin in a process
destroys the plugin instance, a plugin could be destroyed (e.g. by
`plugin disable` running on the command thread) while one of its
breakpoint callbacks was running on another thread (e.g. the thread
handling the stop event), causing a use-after-free.

Try to partially fix this by keeping a plugin alive while the baton is being
used.  Now the plugins use a baton created by
`InstrumentationRuntime::CreateBreakpointBaton()` which only holds a weak
reference to the plugin. In a callback,
`InstrumentationRuntime::GetRuntimeFromBaton()` gets a strong reference to the
plugin which keeps the plugin alive until the callback finishes.  If the plugin

    [13 lines not shown]
DeltaFile
+6-13lldb/source/Target/Process.cpp
+14-0lldb/source/Target/InstrumentationRuntime.cpp
+12-0lldb/include/lldb/Target/InstrumentationRuntime.h
+8-3lldb/source/Plugins/InstrumentationRuntime/TSan/InstrumentationRuntimeTSan.cpp
+8-3lldb/source/Plugins/InstrumentationRuntime/ASan/InstrumentationRuntimeASan.cpp
+8-2lldb/source/Plugins/InstrumentationRuntime/MainThreadChecker/InstrumentationRuntimeMainThreadChecker.cpp
+56-212 files not shown
+71-258 files

LLVM/project f4e57bf — lldb/source/Core PluginManager.cpp, lldb/source/Target Process.cpp

[LLDB] Support enabling/disabling InstrumentationRuntime plugins in a debug session

This patch is the fourth part in a patch series that will allow
enabling/disabling InstrumentationRuntime plugins in a running debug
session.

This is a rework of an older now abandoned patch:
https://github.com/llvm/llvm-project/pull/193334

Previously enabling/disabling an instrumentation runtime plugin via the
`plugin enable/disable instrumentation-runtime.<name>` command was only
supported using the `global` domain. This only toggled the plugin's
enablement state in the PluginManager. This would affect the enablement
in newly launched processes but not in any existing processes. In
practice what this meant is that:

1. If the plugin was activated when the inferior process was launched it
   could not be disabled even if requested. This meant it was impossible
   to prevent LLDB from stopping at the breakpoint set by an

    [106 lines not shown]
DeltaFile
+575-0lldb/test/API/functionalities/ubsan/plugin_enable_disable/TestUbsanPluginEnableDisable.py
+555-6lldb/test/API/lang/BoundsSafety/soft_trap/TestBoundsSafetyInstrumentationPlugin.py
+183-13lldb/source/Core/PluginManager.cpp
+171-0lldb/test/Shell/Commands/command-plugin-enable-disable-domain-flag-two-targets.test
+119-0lldb/test/Shell/Commands/command-plugin-enable-disable-domain-flag-one-target.test
+73-2lldb/source/Target/Process.cpp
+1,676-2115 files not shown
+2,072-6821 files

LLVM/project a0b1da3 — lldb/include/lldb/Utility Iterable.h, lldb/source/Core Debugger.cpp

Fix race pointed out in review feedback
DeltaFile
+14-0lldb/unittests/Utility/IterableTest.cpp
+9-0lldb/include/lldb/Utility/Iterable.h
+4-3lldb/source/Core/Debugger.cpp
+27-33 files

LLVM/project fd34a04 — llvm/include/llvm/Transforms/IPO Attributor.h

Attributor: Hash all bits of the abstract attribute map keys

The AA IDs are adjacent bytes and the positions of a value only differ
in the low bits, which the default hashes mostly ignore, so many AAMap
keys collide. Hash the full key instead.

attributor-light instruction counts (callgrind): -0.6% to -4.3%, full
attributor -0.5% to -1.5%. CTMark (-attributor-enable=light): O3
-0.01%, ThinLTO -0.03%.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+12-1llvm/include/llvm/Transforms/IPO/Attributor.h
+12-11 files

LLVM/project 6e94aea — llvm/lib/Target/RISCV RISCVISelLowering.cpp, llvm/test/CodeGen/RISCV rvp-simd-64.ll

[RISCV][P-ext] Use nsrl to for 64-bit extract_vector_elt with variable index on RV32.
DeltaFile
+6-30llvm/test/CodeGen/RISCV/rvp-simd-64.ll
+21-6llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+27-362 files

LLVM/project 6f6aae5 — llvm/lib/Target/RISCV RISCVISelLowering.cpp, llvm/test/CodeGen/RISCV rvp-simd-64.ll

[RISCV][P-ext] Fix crash on v2i32 extract_vector_elt with a variable index on RV32.

Assisted-by: Claude
DeltaFile
+63-39llvm/test/CodeGen/RISCV/rvp-simd-64.ll
+6-3llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+69-422 files

LLVM/project d18f304 — llvm/test/CodeGen/RISCV rvp-simd-32.ll rvp-simd-64.ll

[RISCV][P-ext] Add tests for extractelement with a variable index. NFC

Assisted-by: Claude
DeltaFile
+109-61llvm/test/CodeGen/RISCV/rvp-simd-64.ll
+36-4llvm/test/CodeGen/RISCV/rvp-simd-32.ll
+145-652 files

LLVM/project 0a88893 — llvm/lib/Target/RISCV RISCVInstrInfoP.td RISCVISelLowering.cpp, llvm/test/CodeGen/RISCV rvp-simd-64.ll

[RISCV][P-ext] Make v2i32 insert_vector_elt with constant indices legal for RV32.

We can select to an insert_subreg.

The default lowering created a store+load to stack that got folded,
but left behind the stack slot allocation.

Assisted-by: Claude
DeltaFile
+73-47llvm/test/CodeGen/RISCV/rvp-simd-64.ll
+6-0llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+5-0llvm/lib/Target/RISCV/RISCVInstrInfoP.td
+84-473 files

LLVM/project 4847ba4 — llvm/lib/Target/RISCV RISCVISelLowering.cpp, llvm/test/CodeGen/RISCV rvp-simd-32.ll rvp-simd-64.ll

[RISCV][P-ext] Lower 2 element insert_vector_elt to scalar_to_vec+ppaire/ppaireo.

This avoids needing to match the srl+build_vec later which we only
do on RV64.
DeltaFile
+9-14llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+2-4llvm/test/CodeGen/RISCV/rvp-simd-64.ll
+1-2llvm/test/CodeGen/RISCV/rvp-simd-32.ll
+12-203 files

LLVM/project 25b1d2f — cross-project-tests/intrinsic-header-tests riscv_packed_simd.c

fixup! Update test expectation
DeltaFile
+1-1cross-project-tests/intrinsic-header-tests/riscv_packed_simd.c
+1-11 files

LLVM/project c628d63 — llvm/lib/Target/RISCV RISCVInstrInfoXSpacemiT.td

[RISCV] Add SMT_ prefix to SpacemiT instruction enum names. (#241053)

Add "vtype" to end of names that become ambiguous. This represents the
additional operand the VMADOT II instructions have.
DeltaFile
+14-14llvm/lib/Target/RISCV/RISCVInstrInfoXSpacemiT.td
+14-141 files

LLVM/project c01e243 — llvm/test/CodeGen/BPF adjust-opt-icmp7.ll

[BPF] Regenerate adjust-opt-icmp7.ll checks after #237690 (#241074)

#231257 added this test with checks generated before #237690 started
marking global functions noipa, so it fails on main.

cc @eaeltsin

Assisted-by: Claude Opus 5.5
DeltaFile
+1-1llvm/test/CodeGen/BPF/adjust-opt-icmp7.ll
+1-11 files

FreeBSD/src 2d5a6bc — sys/dev/mlx5/mlx5_core fs_core.h mlx5_fs_core.c

mlx5: add per-flow-group hash table for FTE lookup

lookup_fte_locked() scanned every FTE in a flow group with xa_next()
and memcmp() on each one.  A new RX TLS session always misses, so the
whole group was walked under the group lock for every insertion.  With
tens of thousands of RX-offloaded sessions in the same IPv6 TCP group
this costs milliseconds per call and grows linearly with the number of
FTEs.

Keep a hash table of the FTEs in each flow group, keyed by a jhash of
the match value.  The table is sized from the group size, capped at
16K buckets.  It is updated in insert_fte() and del_sw_fte(), both of
which hold the group write lock, and read in lookup_fte_locked() under
the group read or write lock.  The xarray is kept for index
allocation.  No lockless reads are introduced.

Reported by:    NetApp
Reviewed by:    kib
Sponsored by:   NVidia networking
MFC after:      1 week
DeltaFile
+27-4sys/dev/mlx5/mlx5_core/mlx5_fs_core.c
+7-0sys/dev/mlx5/mlx5_core/fs_core.h
+34-42 files

OpenZFS/src 013c77e — module/zfs zvol.c

zvol: leave alone a minor that is being removed

zvol_os_remove_minor() clears zv_zso and drops zv_state_lock while it
tears down the OS side of a ZVOL_REMOVING zvol. zvol_set_ro() and
zvol_set_volthreading() can find the zvol by name in that window and
zvol_set_ro() dereferences the NULL zv_zso. zvol_set_volsize() drops
all its locks before it updates the OS side, so the removal can start
under it.

Since d73686867 the thread that changes volmode waits for the minor to
be replaced, but another process setting readonly or volsize on the
same volume still hits the window: the kernel oopses in
zvol_os_set_disk_ro() or zvol_os_update_volsize(), the ioctl thread
dies with the zvol's lock held and every later minor operation hangs
in the zvol taskq.

Skip a ZVOL_REMOVING zvol when setting readonly, volthreading or
volsize, as zvol_suspend() does; the property is still stored, as when
there is no minor. Hold a suspend reference across the OS side of the

    [12 lines not shown]
DeltaFile
+55-5module/zfs/zvol.c
+55-51 files

OpenZFS/src 150fc41 — tests/runfiles common.run, tests/zfs-tests/tests Makefile.am

ZTS: race volume property changes with volmode changes

Setting readonly or volsize on a volume whose minor another process is
removing, for a volmode change, dereferences the minor's OS state after
it has been cleared. Run volmode, readonly, volthreading and volsize
changes on the same volume at the same time, and check that they all
finish and the volume still works afterwards, with the properties set.

A loop still running two minutes after it should have stopped is stuck
in the kernel: fail with the stuck zfs processes' stacks rather than
wait for the test timeout.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Will Rouesnel <wrouesnel at wrouesnel.com>
Closes #19319
DeltaFile
+115-0tests/zfs-tests/tests/functional/zvol/zvol_misc/zvol_misc_volmode_race.ksh
+2-1tests/runfiles/common.run
+1-0tests/zfs-tests/tests/Makefile.am
+118-13 files

FreeBSD/ports 30ba8dc — graphics/nvidia-drm-kmod Makefile.common, x11/nvidia-kmod Makefile

x11/nvidia-kmod*, graphics/nvidia-drm-*-kmod*: Use sys/stdarg.h

machine/stdarg.h is deprecated and will be removed in due course.
This deorbits machine/stdarg.h and use sys/stdarg.h instead.

Not bumping PORTREVISION, as this is a build fix for future
removal of machine/stdarg.h and shouldn't cause changes
in contents of pkgs.

PR:             300622
Co-authored-by: Brooks Davis <brooks at FreeBSD.org>
Differential Revision:  https://reviews.freebsd.org/D61415
DeltaFile
+17-0x11/nvidia-kmod/Makefile
+3-0graphics/nvidia-drm-kmod/Makefile.common
+20-02 files

OpenZFS/src 3ca520e — tests/zfs-tests/cmd libzfs_input_check.c

libzfs_input_check: Fix integer to pointer casts

The zc_nvlist_foo fields are uint64_t and must be first cast to a
pointer-sized integer (uintptr_t) before being cast to a pointer to
avoid build-breakage for some targets (e.g. FreeBSD i386 w/GCC).

Fixes: 59dc88602
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Garth Snyder <garth at garthsnyder.com>
Reviewed-by: Tigerblue77 <37409593+tigerblue77 at users.noreply.github.com>
Signed-off-by: Ryan Moeller <rmoeller at FreeBSD.org>
Closes #19793
DeltaFile
+2-2tests/zfs-tests/cmd/libzfs_input_check.c
+2-21 files

OpenZFS/src 5fd1c64 — lib/libspl/include/sys kmem.h

libspl/kmem: Make prototypes safe for C++

restrict is a C99 keyword and is not available in C++, so including
this header from C++ fails to compile.  FreeBSD's zfsd is one such
user, through sys/vdev_impl.h.

Use __restrict, which gcc and clang accept in both languages.

Fixes: 8b5d919d4 ("libspl: move kmem definitions from zfs_context.h")
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Garth Snyder <garth at garthsnyder.com>
Reviewed-by: Tigerblue77 <37409593+tigerblue77 at users.noreply.github.com>
Signed-off-by: Ryan Moeller <rmoeller at FreeBSD.org>
Closes #19793
DeltaFile
+2-2lib/libspl/include/sys/kmem.h
+2-21 files

OpenZFS/src 9f65cfa — cmd/zdb zdb.c, cmd/zpool zpool_vdev.c

Fix uint64_t format strings on 32-bit targets

These print 64-bit values with %lu, %ld or %lx, which only matches
where long is 64 bits, and breaks builds with -Werror.

Use %llu and %lld with (u_longlong_t) and (longlong_t) casts, as is
done elsewhere.

Fixes: 13ec35ce3 ("Linux/vnops: implement STATX_DIOALIGN")
Fixes: d1b0a6982 ("draid: add failure domains support")
Fixes: 816804dfd ("Add support for anyraid vdevs")
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Garth Snyder <garth at garthsnyder.com>
Reviewed-by: Tigerblue77 <37409593+tigerblue77 at users.noreply.github.com>
Signed-off-by: Ryan Moeller <rmoeller at FreeBSD.org>
Closes #19793
DeltaFile
+17-12tests/zfs-tests/cmd/statx.c
+2-2cmd/zdb/zdb.c
+1-1cmd/zpool/zpool_vdev.c
+20-153 files

OpenZFS/src a94aa16 — cmd/zstream zstream_io.c

zstream: Use libspl atomics for memory accounting

These were the only bare __atomic calls in zstream, and Clang rejects
the 64-bit ones on i386 with -Watomic-alignment.  The rest of zstream
already uses libspl.

Fixes: c878ee452 ("zstream: track and limit memory use")
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Garth Snyder <garth at garthsnyder.com>
Reviewed-by: Tigerblue77 <37409593+tigerblue77 at users.noreply.github.com>
Signed-off-by: Ryan Moeller <rmoeller at FreeBSD.org>
Closes #19793
DeltaFile
+8-14cmd/zstream/zstream_io.c
+8-141 files