NAS-141412 / 26.0.0-RC.1 / audit: serialize truenas_verify baseline against /usr race (by anodos325) (#19146)
setup_truenas_verify generates the as-installed truenas_verify baseline
by reading the entire rootfs. It runs as a first-boot system.ready
handler, concurrently with boot.update_initramfs (another system.ready
agent), which overlays a read-only functioning-dpkg sysext on /usr for
the duration of its truenas-initrd.py rebuild.
When the baseline read hits /usr while that overlay is mounted, it
captures the overlay's dpkg files instead of the installed ones,
producing spurious discrepancies (e.g. '/usr/bin/dpkg: got mode 0o755,
expected: 644', '/usr/local/bin/dpkg: incorrect file type.') and a
non-clean install log.
Wrap the do_verify call in rootfs_protection_lock() so it can't overlap
the sysext rebuild. Only caller is audit's
run_in_thread(setup_truenas_verify), so the blocking flock stays off the
event loop, and do_verify never calls back into middleware, so there is
no deadlock.
[3 lines not shown]
[AMDGPU] Shrink VOPCX (nosdst) instructions in SIShrinkInstructions (#202711)
Fix `SIShrinkInstructions` to shrink `V_CMPX_*_e64` instructions.
The `VOPC` destination handling block treated `MI.getOperand(0)` as the
destination unconditionally, but `VOPCX` variants have no `sdst`, their
operand 0 is `src0`. The pass set a bogus VCC allocation hint on the
source SGPR and skipped the shrink. The existing comment said these
should be excluded, but the code never actually did so.
libopensync: Various build fixes.
Improve the handling of non-POSIX iconv, detect a GNU libiconv,
and fix an implicit function declaration. This is important for
NetBSD with newer GCC.
Merge tag 'trace-tools-v7.2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace
Pull RTLA tool updates from Steven Rostedt:
- Fix discrepancy in --dump-tasks option
Due to a mistake, rtla-timerlat-hist used the CLI syntax
"--dump-task" instead of the documented "--dump-tasks". Change the
option to match both documentation and the other timerlat tool,
rtla-timerlat-top.
- Extend coverage of runtime tests
Cover both top and hist tools in all applicable test cases, add tests
for a few uncovered options, and extend checks for some existing
tests.
- Add unit tests for actions
[55 lines not shown]
plotutils: Fix build with GCC 15.
This defines its own bool type, which is incompatible
with C23 having it as a built-in keyword.
gnu99 is chosen for being the minimum bootstrap requirement
and safety against APIs being hidden in standards mode.
Merge tag 'trace-latency-v7.2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace
Pull tracing latency updates from Steven Rostedt:
- Dump the stack to the buffer on timerlat uret threashold event
Record the stack trace in the buffer for THREAD_URET as well as
THREAD_CONTEXT when the threshold is hit. Otherwise, if the threshold
was not hit at task wakeup, but was at task return, it will not
produce a stack trace making it harder to debug.
- Have osnoise trace prints print to all buffers
The osnoise tracer is allowed to print to the main buffer. Add a
osnoise_print() helper function and use trace_array_vprintk() to
print osnoise output.
* tag 'trace-latency-v7.2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
tracing/osnoise: Array printk init and cleanup
tracing/osnoise: Dump stack on timerlat uret threshold event
devd/snd.conf: Handle absent control device properly
If virtual_oss is not enabled when these rules run on startup, dmesg
will show the following messages:
Starting devd.
virtual_oss_cmd: Could not open control device: /dev/vdsp.ctl: No such file or directory
virtual_oss_cmd: Could not open control device: /dev/vdsp.ctl: No such file or directory
Reported by: olce, Mark Millard <marklmi at yahoo.com>
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
(cherry picked from commit 439b219fed3eea8ad3e1204393a8605826b8bbca)
Reapply "[Dexter] Add label nodes for line references" (#203938)
This reverts commit
https://github.com/llvm/llvm-project/commit/2a789821b0d723bc92f61563e74e67d69d660927.
The original commit previously caused pre-merge check failures for Linux
AArch64 cross-project-tests, due to the stepping behaviour being
slightly different to x86_64. The tests have been adjusted to be less
brittle to exact stepping behaviour, but this reapply also disables the
tests for ARM targets as there is not currently the infrastructure to
reliably test them, meaning we may end up with latent failures.
Merge tag 'probes-v7.2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace
Pull probes updates from Masami Hiramatsu:
- BTF support for dereferencing pointers
Add syntax to the parsing of eprobes to typecast structure pointer
trace event fields, enabling BTF-based dereferencing instead of
relying on manual offsets.
- Improvements and robustness enhancements
- Use flexible array for entry fetch code.
Store probe entry fetch instructions in the probe_entry_arg
allocation via a flexible array member to simplify memory
allocation and lifetime management.
- Replace BUG_ON with lockdep_assert_held in uprobe_buffer functions
[16 lines not shown]
Merge tag 'bootconfig-v7.2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace
Pull bootconfig updates from Masami Hiramatsu:
- bootconfig: move xbc_snprint_cmdline() to lib/bootconfig.c
Move the xbc_snprint_cmdline() function and its buffer from
main.c to the shared lib/bootconfig.c parser library so it
can be reused by userspace tools.
- render kernel.* subtree as cmdline string with -C
Add a new -C option to print the kernel.* subtree as a flat
command-line string at build time, allowing early parameter
injection without runtime parsing.
* tag 'bootconfig-v7.2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
tools/bootconfig: render kernel.* subtree as cmdline string with -C
bootconfig: move xbc_snprint_cmdline() to lib/bootconfig.c
NAS-141412 / 27.0.0-BETA.1 / audit: serialize truenas_verify baseline against /usr race (#19143)
setup_truenas_verify generates the as-installed truenas_verify baseline
by reading the entire rootfs. It runs as a first-boot system.ready
handler, concurrently with boot.update_initramfs (another system.ready
agent), which overlays a read-only functioning-dpkg sysext on /usr for
the duration of its truenas-initrd.py rebuild.
When the baseline read hits /usr while that overlay is mounted, it
captures the overlay's dpkg files instead of the installed ones,
producing spurious discrepancies (e.g. '/usr/bin/dpkg: got mode 0o755,
expected: 644', '/usr/local/bin/dpkg: incorrect file type.') and a
non-clean install log.
Wrap the do_verify call in rootfs_protection_lock() so it can't overlap
the sysext rebuild. Only caller is audit's
run_in_thread(setup_truenas_verify), so the blocking flock stays off the
event loop, and do_verify never calls back into middleware, so there is
no deadlock.
[SPIR-V] Order alias-decl instructions so definitions precede uses (#203699)
The SPV_INTEL_memory_access_aliasing decl instructions are built at the
insertion point of the memory operation being selected. Because
selection is bottom-up, an alias domain shared between scopes that are
built at different memory operations could be emitted after a scope that
references it.
Sort the collected aliasing instructions by dependency tier.
[SPIR-V] Don't lower metadata-argument intrinsics to functions (#203654)
llvm.experimental.noalias.scope.decl takes a metadata argument. When the
SPIR-V backend lowered unknown intrinsics to functions (AMD vendor or
--spv-allow-unknown-intrinsics), it emitted
@spirv.llvm_experimental_noalias_scope_decl(metadata ...), which fails
the verifier: "Function has metadata parameter but isn't an intrinsic".
Therefore drop llvm.experimental.noalias.scope.decl, as it has no SPIR-V
representation.
[SPIR-V] Fix verifier crash on aggregate extract into a mutated callsite (#203729)
SPIRVPrepareFunctions rewrites indirect/inline-asm callsite signatures
so aggregate params become i32 value-ids, but leaves the operands for
SPIRVEmitIntrinsics to tokenize. An aggregate-returning spv_extractv
result passed to such a call was never tokenized, so it no longer
matched the mutated callee signature, tripping the IR verifier ("Call
parameter type does not match function signature!").
Mutate the spv_extractv result to i32 when it feeds a callsite param
that was rewritten to a value-id. Real SPIR-V type is recovered from the
value attributes later during selection.
Assisted by: Claude Code
[AMDGPU] Add synthetic apertures and use them for barriers
Define what a synthetic aperture is, and adjust the barrier AS
to use this new system. This makes the barrier AS even safer to
use as now we can use all 32 bits of it without ever risking
hitting a valid address of any kind (LDS or outside LDS).
[NFC][LLVM][Tests] Replace instances of @llvm.aarch64.sve.ptrue.nxv16i1(i32 31) with splat (i1 true). (#204113)
I have kept instances where the ptrue seems more relevant. For example,
when a test varies the predicate pattern, I opted to maintain ptrue(31)
for test consistency.
Use a CAS loop for pointer types in __cxx_atomic_fetch_{max,min} on c11.h
Clang's __c11_atomic_fetch_max/min builtins reject pointer arguments
("address argument to atomic operation must be a pointer to atomic integer
or supported floating point type"). The four __cxx_atomic_fetch_{max,min}
overloads in support/c11.h were unconditionally calling those builtins, so
std::atomic<T*>::fetch_max/min failed to compile on every Clang-based
config. support/gcc.h already had this dispatch via #if __has_builtin(...)
falling back to a CAS loop, which is why generic-gcc was passing.
Dispatch on is_pointer<_Tp>::value: pointer types use a CAS loop matching
gcc.h's body, others keep calling the builtin.
Assisted by Claude