Add sancov support for large AArch64 binaries. (#185374)
In AArch64 calls have a +/-128MB range
(https://developer.arm.com/documentation/ddi0602/2025-12/Base-Instructions/BL--Branch-with-link-).
In cases where the .text is larger than that, the linker adds functions
that just jumps to the sanitizer functions and places them to some code
location where the rest of the binary can call it. These functions have
the prefix __AArch64ADRPThunk__.
This commit marks calls to this function as coverage points.
[AArch64][GlobalISel] Add G_SQDMULL node
Previously, GISel was failing to lower the sqdmulls.scalar intrinsic. This is just a variation of sqdmull, but on two 32-bit S registers.
To fix this, create a G_SQDMULL node, and lower sqdmulls.scalar to that. This node is linked to the SD patterns for sqdmull, which allow this version of the intrinsic to lower.
[AArch64][PAC] Don't skip global legalization for AUTH_TCRETURN (#182513)
The 77bcab835aca1 folds llvm.ptrauth.resign intrinsic in case intrinsic
discriminant and key match those in call ptrauth bundle. However
assertion is now fired in AArch64AsmPrinter when PAC is enabled and
we're tail calling a global, because AUTH_TCRETURN expects address to be
stored in register.
www/awstats: Remove awdownloadcsv.pl (security vuln)
Problem:
awdownloadcsv.pl is vulnerable to command injection and path traversal,
ref [1] and [2].
The GitHub issue [1] mentions that it is deprecated, and the readme does
not list this file among the files that are (supposed to be) part of the
distribution.
Solution:
This commit prevents awdownloadcsv.pl to be installed, thus removing the
vulnerability.
[1] https://github.com/eldy/AWStats/issues/276
[2] https://www.openwall.com/lists/oss-security/2026/03/08/8
While here, clean up sorting of IPV6_RUN_DEPENDS.
PR: 293698
[2 lines not shown]
L2ARC: Fix prev_hdr use-after-free in l2arc_write_sublist
prev_hdr is dereferenced after the sublist lock is dropped for write I/O
but nothing prevents it from being freed during that window. Eliminate
prev_hdr entirely and simplify persistent marker repositioning logic.
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Alexander Motin <alexander.motin at TrueNAS.com>
Signed-off-by: Ameer Hamza <ahamza at ixsystems.com>
Closes #18289
www/awstats: Remove awdownloadcsv.pl (security vuln)
Problem:
awdownloadcsv.pl is vulnerable to command injection and path traversal,
ref [1] and [2].
The GitHub issue [1] mentions that it is deprecated, and the readme does
not list this file among the files that are (supposed to be) part of the
distribution.
Solution:
This commit prevents awdownloadcsv.pl to be installed, thus removing the
vulnerability.
[1] https://github.com/eldy/AWStats/issues/276
[2] https://www.openwall.com/lists/oss-security/2026/03/08/8
While here, clean up sorting of IPV6_RUN_DEPENDS.
PR: 293698
MFH: 2026Q1
man: Update L2ARC documentation for depth cap and write budget fairness
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Alexander Motin <alexander.motin at TrueNAS.com>
Signed-off-by: Ameer Hamza <ahamza at ixsystems.com>
Closes #18289
L2ARC: Write budget fairness for metadata monopolization
Under heavy metadata load, metadata passes can monopolize the write
budget every cycle while data passes get nothing written. Track
consecutive monopolized cycles per device in l2ad_meta_cycles. After
l2arc_meta_cycles (default 2) consecutive cycles where metadata fills
the write budget, skip metadata for one cycle to let data run. Reset
the counter when nothing is written.
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Alexander Motin <alexander.motin at TrueNAS.com>
Signed-off-by: Ameer Hamza <ahamza at ixsystems.com>
Closes #18289
L2ARC: Scan-based depth cap for persistent markers
With persistent markers and inclusive scanning, the marker traverses the
entire ARC state across many feed cycles, writing buffers far from the
tail that may no longer be relevant.
Track cumulative bytes scanned per pass in l2arc_ext_scanned. When scans
reach l2arc_ext_headroom_pct (default 25%) of the ARC state size, reset
the pass markers to the tail via lazy reset flags. This keeps markers
focused on the tail zone where buffers soon to be evicted have the most
value for L2ARC.
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Alexander Motin <alexander.motin at TrueNAS.com>
Signed-off-by: Ameer Hamza <ahamza at ixsystems.com>
Closes #18289
L2ARC: Lazy sublist reset flags for persistent markers
Replace direct marker-to-tail manipulation with per-sublist boolean
flags consumed lazily by feed threads. Each scanning thread resets its
own marker when it sees the flag, rather than having another thread
manipulate the marker directly.
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Alexander Motin <alexander.motin at TrueNAS.com>
Signed-off-by: Ameer Hamza <ahamza at ixsystems.com>
Closes #18289
L2ARC: Even sublist headroom distribution with round-robin selection
The dynamic headroom redistribution formula gave later sublists
progressively larger scanning budgets, and random sublist selection
caused uneven coverage across sublists. For depth cap to work
effectively, each sublist should be equally and fairly treated.
Use equal per-sublist headroom (headroom / num_sublists) for even
distribution and deterministic round-robin selection for fair
coverage across cycles.
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Alexander Motin <alexander.motin at TrueNAS.com>
Signed-off-by: Ameer Hamza <ahamza at ixsystems.com>
Closes #18289
NAS-140203 / 26.0.0-BETA.2 / remove zfs.pool.query (replace w/ zpool.query) (by yocalebo) (#18418)
Replace the old zfs.pool.query (backed by the legacy py-libzfs Cython
extension) with a new zpool.query public API backed by the
truenas_pylibzfs C extension.
New: zpool.query API (plugins/zpool/)
- zpool/crud.py: New ZPoolService with a public zpool.query endpoint
(POOL_READ role). Accepts a structured query dict instead of the old
filter_list pattern.
- zpool/query_impl.py: Core implementation that talks directly to
truenas_pylibzfs. Returns pool health, status, properties, topology,
scan/scrub, expansion, and feature flag data. Callers request only the
data they need (properties, topology, scan, expand, features).
- zpool/exceptions.py: ZpoolNotFoundException for explicit
pool-not-found handling.
- API models (api/v26_0_0/zpool_query.py, api/v27_0_0/zpool_query.py):
Pydantic models for ZPoolEntry, ZPoolQuery, ZPoolVdev, ZPoolVdevStats,
ZPoolTopology, ZPoolFeature, ZPoolPropertyValue.
[46 lines not shown]
[Matrix] Fix cbuffers support for matrix element expr (#185471)
fixes #184877
This change was threefold.
1. copy the padded cbuffer from memory to a local alloca
2. switch to using the new `getFlattenedIndex` helpers for index
generation
3. convert row major to column major indicies in codegen depending on
LangOptions
[X86] Accept 'a' modifier for 'p' constraint in inline asm (#185590)
GCC supports the %a modifier with the p constraint (e.g., %a0), while
Clang rejected it. The 'a' modifier means "print as address", which on
a 'p' constraint memory operand is what the default path already does.
Like GCC, reject 'a' with other memory constraints (e.g. 'm').
Close https://github.com/llvm/llvm-project/issues/185343
[llubi] Add support for bitcast (#185205)
Bitcasting pointers to pointers is not fully implemented for now. We
haven't encoded provenance information in the memory. This patch also
fixes the endianness handling of vectors by treating the vector as a
single unit (the endianness handling is now handled by a transparent
accessor `BytesView`).
[MLIR][XeGPU][GPU] Optimize GPU to XeVM pipeline (#184711)
Some XeGPU transforms can generate code sequences that can simplified by
folding. But full canonicalization is not required. As an alternative,
remove canonicalize from some parts of the pipeline where only folding
is needed and add folding at the end of XeGPU blocking pass
and XeGPU peephole optimize pass.