ZTS: don't mix files and disks where 4K disks reject it
zpool_add_001_pos, slog_013_pos and zvol_misc_fua fail on disks with 4K
sectors: "adding devices with different physical sector sizes is not
allowed". Each adds file or loop vdevs (512-byte sectors) and $DISKS to
the same pool without -f, which only works when the disks have 512-byte
physical sectors too, as in upstream CI.
- zpool_add_001_pos: add sparse files instead of $DISKS, so that every
pool is made only of files.
- zvol_misc_fua: use a second disk as the log instead of a file.
- slog_013_pos: this test adds file and loop logs to a disk pool on
purpose, so pass --allow-ashift-mismatch to those zpool add calls.
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Alan Somers <asomers at gmail.com>
Signed-off-by: Matthew Ahrens <matt at mahrens.org>
Co-Authored-By: Claude Opus 5.5 <noreply at anthropic.com>
Closes #19881
Closes #19893
ZTS: use a 128k block in zdb_decompress
zdb_decompress fails on pools whose ashift is 12 (disks with 4K
physical or logical sectors). Its 4K lzjb block can't save a whole
sector at ashift 12, so it is stored uncompressed (1000L/1000P), and
"zdb -R :d" finds nothing to decompress. Upstream CI uses 512-byte
vdevs, where the block compresses.
- Use a 128K recordsize, which compresses by at least one sector at
any ashift.
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Alan Somers <asomers at gmail.com>
Signed-off-by: Matthew Ahrens <matt at mahrens.org>
Co-Authored-By: Claude Opus 5.5 <noreply at anthropic.com>
Closes #19893
ZTS: create the gang_blocks ashift=9 pools on file vdevs
On disks with 4K logical sectors (4Kn), "zpool create -o ashift=9"
gives ashift 12, since a disk vdev's ashift can't be below its logical
sector size. Three gang_blocks tests depend on 512-byte sectors:
- gang_blocks_redundant and gang_blocks_special_fallback force every
allocation of 1500 bytes or more to gang. At ashift 12, compressed
blocks and gang members take at least 4K, and a 4K block can't be
split into gang members, so the forced ganging fails the write,
testpool suspends, and the test hangs until the pool is cleared.
- gang_blocks_dyn_header_neg fails, because the pool it checks for
not using dynamic gang headers is really ashift 12.
Upstream CI uses 512-byte file and loop vdevs, where the tests pass.
- Create the pools of these three tests on sparse files, which
cleanup removes.
[5 lines not shown]
[scudo] Fix wrapper tests. (#247360)
The size check in the size deallocate was changed to allow any value
between the size and usable size. However, the wrapper test was not
checking this properly. Now make sure to use UsableSize + 1 for one of
the boundaries instead of Size + 1.
In addition, fix the incorrect size check when MTE is on.
[HLSL][SPIRV] Reject textures and typed buffers with 16-bit or double elements on Vulkan (#243566)
Vulkan limits image sampled types to 32-bit floats and 32-/64-bit
integers.
Reject incompatible elements types of HLSL textures and typed buffers
through
a new Vulkan-specific typed resource constraint that is selected only
when
targeting SPIR-V. As a safeguard, the SPIR-V backend will error on
incompatible
Vulkan image sampled types if they do somehow make it there.
This matches DXC behavior but with better diagnostics.
Fixes https://github.com/llvm/llvm-project/issues/235905
Assisted by: GitHub Copilot
[clang-doc] Use a custom executor for clang-doc (#244717)
This adds a new custom tooling executor specialized for clang-doc and
using llvm::parallel taskgroups. It largely borrows from the
clang::tooling::ToolExecutor, or the existing practices for using
llvm::parallel. In the future we may want to consider extending this in
a more clang-doc specific manner.
carp: Leave the multicast groups without the softc lock
carp_detach() calls carp_multicast_cleanup() with the softc mutex held.
in_leavegroup() and in6_leavegroup() take in_multi_sx and in6_multi_sx,
so removing the last CARP address of a family from an interface gives:
lock order reversal: (sleepable after non-sleepable)
1st carp_softc (carp_softc, sleep mutex) @ sys/netinet/ip_carp.c:2329
2nd in_multi_sx (in_multi_sx, sx) @ sys/netinet/in_mcast.c:1280
and the same with in6_multi_sx for IPv6.
The memberships belong to the carp_if and are protected by carp_sx,
which carp_detach() holds throughout; carp_attach() already joins the
groups without the softc lock. Leave them once the softc is unlocked
or destroyed, before the carp_if may be freed. The groups of a family
are left only when no CARP address of that family remains on the
interface, and only softcs with an address of a family send
advertisements through its multicast options, so no sender uses them
[7 lines not shown]
X86MCCodeEmitter: Reduce per-instruction overhead. NFC (#246529)
* Look up MCInstrDesc and the operand bias once and pass them down.
* Skip is16BitMemOperand in 64-bit mode.
* Check for high/low byte registers only in the register operands
emitREXPrefix's form switch visits, instead of scanning every operand.
* Compute VEX/EVEX payloads only for those prefixes.
* Emit disp8 directly.
instructions:u (millions):
```
before after
llc -O0 sqlite3 1366.2 1354.0
llc -O0 tramp3d 6302.0 6277.3
llvm-mc tramp3d.s 4504.9 4477.0
```
LLM-aided
[Clang] Reject non-scalar pointee types in masked builtins (#247474)
A non-scalar pointee type (e.g. int **) was not rejected by
CheckMaskedBuiltinArgs and was then passed to getExtVectorType, which
only accepts valid vector element types.
CheckMaskedBuiltinArgs now allows only pointee types that
getExtVectorType accepts (builtin, dependent, or a _BitInt with a
power-of-two bit width) and reports an error otherwise. The check is
shared by __builtin_masked_load, __builtin_masked_store,
__builtin_masked_gather and __builtin_masked_scatter.
Tests covering all four builtins are added in
clang/test/Sema/builtin-masked.c; llvm-lit passes locally.
Fixes #246852
netipsec: Do not send a Packet Too Big below the IPv6 minimum MTU
ipsec6_check_pmtu() answers a forwarded packet that does not fit once
encapsulated with an ICMPv6 Packet Too Big for the path MTU less the
estimated IPsec overhead. When the path MTU to the tunnel endpoint is
below IPV6_MMTU plus that overhead, 1417 bytes for an ESP tunnel over
IPv6, the message asks for less than IPV6_MMTU. Senders ignore it
(RFC 8201; icmp6_mtudisc_update() here does too), keep sending packets
of up to 1280 bytes, and the check drops every one of them.
Do what RFC 2473 section 7.1 asks of a tunnel entry point instead: pass
a packet of up to IPV6_MMTU bytes on, so that the outer packet is
fragmented, and report IPV6_MMTU for larger ones. This also replaces
the silent drop of every packet when the path MTU does not even cover
the overhead. With an IPv4 outer header and net.inet.ipsec.dfbit set
to 1, ip_output() still drops such a packet, as the outer header has DF
set.
Add a test with a path MTU of 1300 between the gateways.
[6 lines not shown]
netipsec: Find the outer destination of a bundle for the PMTU check
ipsec{4,6}_check_pmtu() look up the SA of the last request of a policy
to learn the outer destination, and from it the path MTU. The lookup
fills in the empty addresses of a transport request from the packet as
it is before any transform. When the transport request follows a
tunnel request, as in "esp/tunnel/A-B/require ah/transport//require",
the transform applies it after the tunnel request, to the outer header,
and its SA is installed for A and B. The check then finds no SA with
every SA in place. At level require it sends an SADB_ACQUIRE for the
inner addresses and drops the packet. strongSwan installs this shape
for IPComp in tunnel mode,
"ipcomp/tunnel/A-B/unique esp/transport//unique", so with such a policy
no forwarded IPv6 packet got through, and no IPv4 packet that the check
covers (net.inet.ipsec.dfbit 1, or above 1 for a packet with DF set).
At level use the check sends the same SADB_ACQUIRE and, since
655407eeea5b, skips the comparison with the path MTU. A packet that is
too big once encapsulated is then dropped by ip_output() if the outer
IPv4 header has DF set, or else fragmented, and its sender never learns
[28 lines not shown]
[c-index-test] Switch to OptTable (#246765)
Parse the `c-index-test core` command line with OptTable instead of
cl::opt, as part of removing cl::opt from clang/. Help output uses the
OptTable format, and LLVM's global options (e.g. -debug-only, --version)
are no longer accepted. `c-index-test core -help` now also lists the
options that cl::HideUnrelatedOptions hid.
LLM-aided
[ConstantMerge] Do not merge unnamed_addr into non-unnamed_addr
This implements the semantics in proposed in #247279.
This has limited practical impact (~300 byte increase in .rodata for a
clang binary) and helps with some semantics problems described in
the LangRef PR.
Fixes #63628.
Helps with #229138.
Assisted-By: LLM
Reviewers: efriedma-quic, nikic
Pull Request: https://github.com/llvm/llvm-project/pull/247287
[IR] Tighten unnamed_addr merging semantics
This patch specifies in LangRef that we should not allow merging
functions marked unnamed_addr (i.e., no address significance) into
functions with address significance.
This can cause problems. For example, ICP currently drops unnamed_addr
on functions it takes the address of for pointer equality checks,
assuming that this ensures that the function will have a unique address.
However, given unnamed_addr previously implied that one could merge the
function into a function with a significant address, this assumption did
not hold up in reality.
This has limited practical impact. ICF already respects the updated
rule. We lose some constant merging, but the difference seems to be
negligible (300 byte increase on a clang bootstrap which is trivial).
Related to #229138, and #63628
[2 lines not shown]
NAS-145497 / 28.0.0-BETA.1 / Add the truesearch.status event (#20345)
This commit adds a subscribable event so that the UI can get status
updates as truesearchd does indexing passes on datasets. Middlewared
uses the python client library provided by the truesearchd package and
creates a single process-wide subscription for indexing / truesearch
events and then forwards them along to any subscribers.
27.1 backport notes:
- event sources: master's EventSource and EventSourceManager rework is
not backported. It folds in TypedEventSource (NAS-140179), which 27
lacks. TruesearchStatusEventSource subclasses 27's EventSource, and the
other event sources are unchanged
- truesearch.py: keep 27's service_ import path, and ignore
no-untyped-call on super().cancel(), which 27 leaves unannotated
- test_status_event: subscribe both clients to truesearch.status. 27
keys event source instances by the raw argument, so
truesearch.status:{} starts a second indexer subscription
- api/v28_0_0/truesearch.py is not on 27
[6 lines not shown]
editors/neovim: Only link against libintl when NLS is on
Previously, nvim required gettext to build/run, even if the i18n
flags were turned off. Even with NLS support turned off, the build
required gettext-runtime, which means it was needed at runtime too.
Now, we're finally able to conditionalize USES=gettext on the NLS
option.
Merge commit 6573dd3f1ae9 from llvm-project (by ShengYi Hung):
[Clang][Sema] Accept weak reference after declaration (#228809)
GCC accepts a weak reference even after there is a declaration. In here,
we use Check*Decl to do the required check and merge the NewDecl to
declaration chain.
Assisted-by: Claude # Tests ReleaseNote
Fixes: #56760
PR: 205934
MFC after: 1 week
NAS-145136 / 28.0.0-BETA.1 / Accept scoped link-local IPv6 default gateways in network.configuration.update (by creatorcary) (#20346)
Setting the IPv6 default gateway to a link-local address with its
interface, such as `fe80::1%eno1`, failed in
`network.configuration.update` with a raw `AddressValueError` instead of
saving. The gateway reachability check added in
[NAS-138027](https://ixsystems.atlassian.net/browse/NAS-138027) expands
the address first, and on the Python 3.13.5 that TrueNAS ships that
expansion rejects any address with a scope
([python/cpython#88178](https://github.com/python/cpython/issues/88178)).
This worked on 25.10. A system upgraded with such a gateway kept its
route but could no longer save the Global Configuration form at all,
because the UI sends the gateway with every save.
- A scoped gateway saves again and its default route is installed
through the named interface.
- A scoped gateway now counts as reachable only through the interface it
names, so a missing or misspelled interface gets the usual "Gateway ...
is unreachable" validation error instead of being stored and failing at
[7 lines not shown]
[DebugInfo][FLMD] Add Bitcode read/write support for !!dbgLoc
This patch adds support for reading and writing !!dbgLoc attachments to
instructions/debug records (FLDebugLoc), and also for !DIDbgLoc which
contains an FLDebugLoc argument. Besides adding the bitcode representation
itself, this adds support for converting from FLDebugLoc->DILocation in the
MetadataLoader.
security/vuxml: Amend entry for py-netutils
* The reporting entity should also be specified in full instead of using
the placeholder.
Fixes: f2cabc637ccc security/vuxml: Document py-netutils security issue
resolve lazy inputs with one persistent owner map
Adopt the design proposed in review. Loading state now lives in two
places: an owner map that has one entry per name and persists across
groups of inputs, and the lazy flag of each file.
Every input is queued when it is created, which gives it a position, and
loadInputs() scans the new files in parallel (each claims the names it
defines and keeps pointers to the entries of the names it references),
visits the references of the files that are part of the link in
parallel, and parses the files that became part of it in input order.
References that do not come from a file (-u, the entry symbol, exported
symbols, ObjC class stubs, dyld_stub_binder) are passed to the same walk
by SymbolTable::addUndefined().
Nothing loads a file on contact any more, so extract(), pendingExtracts,
the per-batch owner map and the LazyArchive and LazyObject symbols are
gone, and the symbol table only sees files that are part of the link.
[4 lines not shown]