netipsec: Do not unlock the sahtree twice in ipsec6_common_input_cb()
For transport mode, ipsec6_common_input_cb() releases the sahtree read
lock before it walks the remaining header chain. The error exits of
that walk jumped to the bad label, which released the lock a second
time. A packet that exceeds net.inet6.ip6.hdrnestlimit, is truncated,
or fails the inbound policy check on its last header is enough to get
there.
The second rm_runlock() panics kernels with INVARIANTS. Without
INVARIANTS it unbalances td_pinned and removes a tracker that is no
longer queued, which may corrupt the per-CPU tracker list.
Give the header chain walk its own exit label that skips the unlock.
Reported by: llm-postcr
Reviewed by: markj, kib
Fixes: 183513d15f22 ("sys/netipsec: ensure sah stability...")
MFC after: 1 week
[2 lines not shown]
sysrc: Fix unlikely and rare edge-case
Fix 1 issue identified in post-commit review of eaf7113:
POSTCR-1.1: with -F, the "unchanged" check compares a file path
against the new value, so a value equal to the path is silently
not written
Add an ATF test to ensure we catch the edge-case possibility.
Special note: To replicate this misbehavior you'd have to do
something like: sysrc -f /etc/rc.conf foo=1 and then execute
sysrc -F -f /etc/rc.conf foo=/etc/rc.conf
Reported by: llm-postcr
Fixes: eaf7113bef8f ("sysrc: Add "unchanged" messages")
[clang][bytecode] Fix non-determinism diagnosing allocations. (#246151)
If there are multiple dynamic allocations, make sure we pick
consistently. Fixes failure on reverse-iteration bot
(https://lab.llvm.org/buildbot/#/builders/110).
[X86] canonicalizeShuffleWithOp - VZEXT_MOVL(LOGIC(X,Y)) ensure LOGIC uses integer type (#246469)
Missed in #245974 - VZEXT_MOVL nodes might have been used for fp-types,
so we must cast to an equivalent integer vector to perform the
and/or/xor op.
Fixes #246253
[analyzer][NFC] Avoid rebuilding full type ranges in the range inferrer (#246441)
SymbolicRangeInferrer::infer(QualType) built the full range of the type
for every symbol whose range was queried, and intersecting it with the
symbol's constraint built and uniqued another copy of the constraint.
Cache the full range set per integer type in RangeSet::Factory, and let
intersect return an operand directly when the other one is a single
range covering it.
On some LLVM TUs (GVN, LiveVariables, RegionStore, SemaExpr) this
reduces the instructions of the static analyzer by 1.7-3.2%.
Assisted-by: Claude Opus 5.5
Co-authored-by: Gabor Horvath <gaborh at apple.com>
[CIR] Lower constrained FP ops to typed LLVM dialect ops
Constrained FP ops were lowered to llvm.call_intrinsic with the intrinsic
name spelled as a string and the rounding mode, exception behavior and
fcmp predicate passed as metadata operands. The LLVM dialect has typed
ops for these intrinsics, which take the modes as enum attributes and
translate through IRBuilder::CreateConstrainedFPCall/CreateConstrainedFPCmp.
Use them: constrainedLLVMOp names the typed op in ODS (derived from
llvmOp where the names line up), whether it takes a rounding mode comes
from its RoundingModeOpInterface trait, and constrained fcmp reuses
convertCmpKindToFCmpPredicate. This removes the metadata helpers, the
predicate string tables and constrainedLLVMIntrinsicHasRoundingMode.
The LLVM IR now carries the strictfp call-site attribute on constrained
intrinsic calls, matching classic codegen.
Assisted-by: Claude Code (Opus 5.5).
[CIR] Call the library exp10 in a constrained FP environment
LLVM has no constrained exp10 intrinsic. Under strict FP, CIRGen still
emitted cir.exp10 with an fenv attribute, which lowered to a call to the
nonexistent llvm.experimental.constrained.exp10 and failed in translation
to LLVM IR with "could not find LLVM intrinsic". Fall back to the library
call instead, as classic codegen does, and reject fenv on cir.exp10 in its
verifier so no other producer can create the unlowerable form.
Assisted-by: Claude Code (Opus 5.5).
[libc++] Fix locale_base on generic Unix (#238740)
This re-adds an `#if` for MVS that was dropped in 182ae96a82fc, and
uses the generic linux path whenever glibc is in use.
[libc++][NFC] Fix figure captions in __vector/layout.h (#242817)
The caption of Figure 1 refers to boxes marked with `xx`, but the
diagram marks allocated-but-unused slots with `------`.
Signed-off-by: Alexander Kuleshov <kuleshovmail at gmail.com>
[GlobalsModRef] Remove leftover TLI pass dependency (NFC) (#246470)
The last use of TargetLibraryInfoWrapperPass in GlobalsAAWrapperPass was
removed on November 26, 2026 in commit
6e3568595dfd49d950b75c00be2b522455885bd1. This patch removes the
remaining analysis requirement and the unused Trip variable.
Assisted-by: Antigravity
[llvm] Remove write-only and unused members (NFC) (#246266)
This patch removes private member variables across llvm/ that are
initialized or assigned to but never read, along with their initializers
and assignments. This patch also removes two unimplemented private
member function declarations, MachOWriter::strTableSize and
XCoreTargetLowering::LowerGlobalTLSAddress.
Assisted-by: Antigravity
[CIR] Lower complex constants through CIRAttrToValue
The complex branch of the cir.const lowering rebuilt the same
llvm.mlir.constant as CIRAttrToValue::visitCirAttr(ConstComplexAttr).
Delegate to it, and drop UndefAttr checks that the earlier undef
case already makes unreachable. No output change.
Assisted-by: Claude Code (Opus 5.5).
[analyzer][NFC] Skip NumberObjectConversionChecker in TUs without number objects (#246446)
NumberObjectConversionChecker runs its AST matcher on every function
body. Every match involves a declaration named CFNumberRef,
CFBooleanRef, OSBoolean, OSNumber or NSNumber, so nothing can match if
none of these identifiers is in the identifier table, which is the case
for most C++ translation units. Skip the matching then. The lookups use
IdentifierTable::find, so that they do not create the identifiers.
Declarations deserialized from a PCH or module add their identifiers to
the table, so this works with those too.
The matcher itself is already built only once per checker; this avoids
running it. On some LLVM TUs (GVN, LiveVariables, RegionStore, SemaExpr)
this reduces the instructions of the static analyzer by 0.6-2.2% and the
cycles by 0.9-2.4%.
Assisted-by: Claude Opus 5.5
---------
Co-authored-by: Gabor Horvath <gaborh at apple.com>
[RISCV] Clear Zvl*b in getHostCPUFeatures when vector is unavailable (#244253)
The impetus for this was seeing this post
<https://lore.kernel.org/spacemit/apSYF5x1Tu7PlyL1@aurel32.net/T/#ma79474016077620f81ff0a3caeba52f7b4b85da4>
complaining that an LLVM JIT immediately fails if booting a system with
V disabled. Looking into what could cause that, I found two relevant
issues and this is the first.
For this code path we have a problem in the following scenario (as I
understand it!):
* The kernel has vector disabled, e.g. removing 'v' from the devicetree.
* JITTargetMachineBuilder::detectHost (or `-mcpu=native` for llc/lli)
takes the CPU from getHostCPUName and builds a feature string from
getHostCPUFeatures.
* getHostCPUName returns the name of a core that supports vector (say
spacemit-x60). #142745 returns the CPU name based on examining
mvendorid/marchid/mimpid as reported by hwprobe. spacemit-x60 of course
is defined as including V and Zvl256b.
[33 lines not shown]
net-p2p/autopulse: Update 1.5.0 => 2.0.0
Upstream 2.0.0 adds settings rather than replacing them: app gains
base_path, secure_cookies and trusted_proxies, opts gains the webhook
retry, timeout and interval knobs, hookshot and json webhooks are new,
and the database migrations are additive and run at startup. No 1.x
configuration key was removed, so existing configuration files keep
working.
Build with the system OpenSSL instead of the bundled copy. Patch the
library manifest and Cargo.lock to drop the vendored feature and the
openssl-src build dependency, following sysutils/eza, so CARGO_CRATES
and distinfo no longer carry openssl-src.
Ship a full sample configuration covering every setting, installed as
autopulse:autopulse 0600 because it holds credentials, and run the
daemon under daemon(8) as the autopulse user with output to
/var/log/autopulse.log. Add a newsyslog drop-in for log rotation and
create /var/db/autopulse for the sqlite database in the rc script. The
[14 lines not shown]
wpa_supplicant: Mark FreeBSD scan result levels as dBm
The FreeBSD driver wrapper converts net80211's half-dB RSSI relative
to the noise floor into an absolute signal level, but leaves
WPA_SCAN_LEVEL_DBM unset.
Without the flag, scan_snr() uses the raw level instead of subtracting
the noise floor. The scan comparator also uses uncapped raw levels
rather than its dB-based SNR calculation. This can favour a stronger
2.4 GHz BSS over a faster 5 GHz BSS.
Set the flag alongside the existing conversion in the __FreeBSD__
branch, as other driver wrappers do for levels reported in dBm.
Tested with base wpa_supplicant 2.11 on FreeBSD 15.1-RELEASE-p7,
using an Intel 8265 on a dual-band network. Three stock cold starts
selected 2.4 GHz; two starts with this change selected 5 GHz HT40.
PR: 301132
Reviewed by: emaste
[LifetimeSafety][NFC] Do not store empty loan sets (#246460)
An origin missing from the loan propagation lattice has no loans, so
remove it instead of storing an empty set when it is killed, expires or
receives no loans from a flow. This keeps the maps smaller.
On the lifetime safety benchmarks this reduces the peak memory by 8% for
the CFG merge test and 3% for the switch fan-out test, with no change in
instructions for the others.
Assisted-by: Claude Opus 5.5
---------
Co-authored-by: Gabor Horvath <gaborh at apple.com>
report bytes received in scsi_report_luns() and fail with EIO in the
impossible case
take the lun count from the smaller of the length field or bytes received
this way we avoid taking garbage from devices when we enable report luns on USB
ok miod@
[BuildLibCalls] Do not mark ctermid argument as nocapture (#241813)
Remove setDoesNotCapture flag from ctermid.
char* ctermid(char* s), according to POSIX spec returns either address
of static buffer, or its argument if non-NULL, which counts as capture.
This was detected with RTEMS tests, clang incorrectly optimized out
input to ctermid assuming nocapture.
[SandboxVec][LoadStoreVec] Factor out canUnpack and unpackIfNeeded (NFC) (#245732)
This moves the logic that unpacks each original load from the lanes it
occupies in a vector load, and the check that those lanes can be
reinterpreted as the load's type, out of `vectorizeLoads()` into two new
helpers, `canUnpack()` and `unpackIfNeeded()`.
Co-authored-by: Cursor <cursoragent at cursor.com>
[analyzer][NFC] Skip RetainSummaryManager's OSObject and ISL checks when they cannot match (#246458)
For every call it summarizes, RetainSummaryManager runs AST matchers to
check whether a record derives from OSMetaClassBase, and prints
parameter types to check for an "isl_" prefix. Neither can match if no
identifier in the translation unit is named OSMetaClassBase or starts
with "isl_", which is the case for most translation units, so skip them
then.
On some LLVM TUs (GVN, LiveVariables, RegionStore, SemaExpr) this
reduces the instructions of the static analyzer by 1.5-2.4%.
Assisted-by: Claude Opus 5.5
---------
Co-authored-by: Gabor Horvath <gaborh at apple.com>