[DebugInfo][SelectionDAG] Stop unsalvageable debug values from sinking (#233667)
SelectionDAG resolves dangling debug values at the end of a block. When
a
value cannot be salvaged, the poison `DBG_VALUE` currently uses the
current
`SDNodeOrder`, so it can sink past later calls and stores instead of
ending the
earlier variable location at the original debug record.
Use the saved order of the debug record, as the successful salvage paths
already do. Extend `sdag-order.ll` with an unsalvageable call result
followed
by another call and a volatile store; without the fix the location
termination
appears after both instructions.
This completes the ordering correction from #94458 for the final
unsalvageable fallback.
AI assisted with the analysis and development of the fix.
libthr: Cache recent pshared_key
For a pshare key, we can actually cache the last one as a fast path
instead of trapping into kernel directly. It makes sense as a lock and
unlock should be a pair on the same key and at the same time. For
example, lock(A) -> unlock(A) -> lock(B) -> unlock(B). Each unlock is
a hit and refresh later (50% hit).
For a single pshare lock, it is evne a 100% hit as the key never
changed.
For nested lock lock(A) -> lock(B) -> lock(C) -> unlock(C) ->
unlock(B) -> unlock(A). It only cache the last one. However, we should
really think about rewritting this logic as it is a pshare lock shared
by many processes and nested should be uncommon.
Reviewed by: kib
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D60957
security/keychain: Small updates
Point at new GH location (old redirects to new), modernize pkg-descr,
and adopt my personal preferences (the port has been around for 21
years, we can probably stop guarding against its name changing.)
Note that keychain 3.x, which has been out for a couple months, is a
Python rewrite. It needs no third-party modules, but it's definitely
a change from the "one portable shell script" ethos I recall from
decades ago. I'm working on that update, and from what I can tell it
should require basically no adjustment on the end-user side of things,
so I'm unlikely to create a keychain298 port (happy to take input on
that!).
WasmEHPrepare: Use RuntimeLibcallsInfo
Take the function type, attributes and calling convention from
RuntimeLibcallsInfo instead of constructing them by hand. Also
validate the required functions are available.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
RuntimeLibcalls: Mark vector libcall out pointers dereferenceable
The whole vector width will be written, so mark the vector width. To
maintain the element width alignment for some functions, we need to
start explicitly tracking if the element alignment is used or not.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
Tools/scripts/update-plist.py: Bugfix
Remove stale pkg-plist lines preceded by an OPTIONS_SUB. E.g.: remove
%%FOO%%include/bar.h if it is no longer packaged.
MFH: 2026Q4
(cherry picked from commit 97856031311db3350b2e1428d7a9b00f9c2e5b85)
RuntimeLibcalls: Declare vector libcall attributes in TableGen
Replace the type-based heuristics for vector math libcall attributes
with attributes declared on the libcall definitions, emitted with the
same attribute table helpers as intrinsics.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
Tools/scripts/update-plist.py: Bugfix
Remove stale pkg-plist lines preceded by an OPTIONS_SUB. E.g.: remove
%%FOO%%include/bar.h if it is no longer packaged.
MFH: 2026Q4
AtomicExpand: Use RuntimeLibcallsInfo signatures for atomic libcalls (#238972)
Take the function type and attributes of the emitted __atomic_* calls
from RuntimeLibcallsInfo instead of building them by hand.
This fixes missing extension attributes on the value operand and
result of the sized variants, which are unsigned integers of the
access size. On targets whose C ABI extends narrow integer arguments,
such as RISC-V and ARM, the callee could see unextended high bits. i8
and i16 values now get zeroext, and i32 values get signext on
RV64. Callers can also rely on the extended return value, which
removes redundant extensions after some calls.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
gve: Page-align DQO descriptor and completion rings
Currently, gve_rx_alloc_ring_dqo() and gve_tx_alloc_ring_dqo() request
CACHE_LINE_SIZE alignment when allocating DMA memory for the DQO TX/RX
descriptor and completion rings. The device requires stronger alignment
than cache line alignment, which was incidentally being met due to how
the kernel allocates memory. Explicitly meet this requirement by
requesting page aligned memory.
Signed-off-by: Tim Hostetler <thostet at google.com>
Reviewed by: markj, Jasper Tran O'Leary <jtranoleary at google.com>
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D61211
gve: Fix AdminQ buffer DMA sync directions
In gve_verify_driver_compatibility(), the driver populates the
gve_driver_info buffer for the device to read. Sync this buffer with
BUS_DMASYNC_PREWRITE instead of BUS_DMASYNC_PREREAD before issuing
the command.
In gve_adminq_describe_device(), the device populates the
gve_device_descriptor buffer for the driver to read. Sync this buffer
with BUS_DMASYNC_PREREAD instead of BUS_DMASYNC_PREWRITE before
issuing the command.
In gve_adminq_get_ptype_map_dqo(), the device populates the
gve_ptype_map buffer for the driver to read. Add the missing
BUS_DMASYNC_PREREAD and BUS_DMASYNC_POSTREAD syncs around the
command.
In normal GCP environments this did not cause a functional failure
because the underlying platforms are DMA cache-coherent and
[12 lines not shown]
ARM: Remove dead kill flag maintenance in MVETPAndVPTOptimisations
This pass runs before register allocation, and the verifier now
rejects kill flags on virtual registers.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
AArch64: Remove dead kill flag maintenance in AArch64PostCoalescer
The sources of the transposed tuple pseudos are virtual registers,
which can no longer carry kill flags.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
EarlyIfConversion: Remove dead kill flag maintenance
The verifier now rejects kill flags on virtual registers, so there are
never repeated kills of a virtual register in the two sides of a
diamond to clear.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
ioctl: Add a macro for extracting the ioctl number from a command
Sprinkle it in various drivers which hard-coded the command layout.
No functional change intended.
Reviewed by: dumbbell, emaste
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D61045
MachineVerifier: Disallow kill flags on virtual registers
Kill flags are deprecated, and nothing introduces them on virtual
registers anymore. Reject them in the verifier to prevent new uses
from creeping back in. Kill flags on physical registers are still
permitted. There are still some lingering post-RA kill flag reliance.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
www/caddy: Update to 2.11.8
This contains numerous fixes to handling broken-by-design scenarios,
such as PHP. All users should update, especially if caddy drives a
php_fastcgi backend.
Read the Changes for details.
Changes: https://github.com/caddyserver/caddy/releases/tag/v2.11.8
CodeGen: Handle uses in unreachable blocks in LiveIntervals
Previously LiveIntervals had the unenforced assumption that the
function does not contain any unreachable blocks. A register which had
a definition somewhere but also a use in an unreachable block would
hit a "Use not jointly dominated by defs" assertion.
Avoiding no-unreachable-blocks as a hard requirement avoids assertions
in some pass configuration edge cases. In particular when the
MachinePipeliner is enabled in an optimized pipeline there could still
be unreachable blocks in an optnone function which would hit the
assert. Not handling unreachable blocks was also a large problem for
llvm-reduce's MIR support and was one of the main obstacles to landing
a basic block reduction.
Give a value live into an unreachable block a phi-def at the start of
the block, using the dominator tree to identify unreachable blocks.
ConnectedVNInfoEqClasses::Classify joins a component made only of
phi-defs in unreachable blocks with a component that has a real def;
[6 lines not shown]
libsecureboot: add support for more signatures
For 2027 we need to support new, stronger signatures and hashes.
Re-work Makefile.inc and local.trust.mk to define
VE_SIGN_URL_LIST or VE_SIGNATURE_LIST (can be derrived from
VE_SIGN_URL_LIST) containing tuples of sig/method/hash/flags and
for VE_SIGN_URL_LIST the same plus /url.
From VE_SIGNATURE_LIST we derrive VE_SIGNATURE_EXT_LIST used to populate
signature_ext_list which defines the order in which we look for
signatures for a manifest.
We also populate signature_info_list which maps a signature ext to the
needed hash and flags to indicate whether that hash needs to be repeated.
verify_sig will lookup signature_info_list, no match means not
supported. For asc we just call verify_asc() otherwise we call
verify_ec() or verify_rsa() depending on the key type found in the
[15 lines not shown]
nfs_clrpcops.c: Fix typo in commit db8444c1b7e4
Reported by: markj
MFC after: 1 month
Fixes: 884ee8d6c9b4 ("nfscl: Add some glue for client side NFS over RDMA")