tcp: count only the SACK blocks that fit in tcp_maxseg()
tcp_addoptions() sends only the SACK blocks that fit in TCP_MAXOLEN.
tcp_maxseg() counted every pending block and clamped the total, so
without timestamps and with five or more blocks pending it came out 4
bytes below the segment tcp_output() sends. Limited transmit after an
RTO then sent one full segment and failed the "sent too much" KASSERT.
PR: 282605
Approved by: adrian (mentor)
Signed-off-by: Nick Price <nprice at FreeBSD.org>
Reviewed by: tuexen, glebius, adrian
Differential Revision: https://reviews.freebsd.org/D60460
(cherry picked from commit d3b02115d4b373c719d9a716da38d94511de3f07)
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>
tcp: count only the SACK blocks that fit in tcp_maxseg()
tcp_addoptions() sends only the SACK blocks that fit in TCP_MAXOLEN.
tcp_maxseg() counted every pending block and clamped the total, so
without timestamps and with five or more blocks pending it came out 4
bytes below the segment tcp_output() sends. Limited transmit after an
RTO then sent one full segment and failed the "sent too much" KASSERT.
PR: 282605
Approved by: adrian (mentor)
Signed-off-by: Nick Price <nprice at FreeBSD.org>
Reviewed by: tuexen, glebius, adrian
Differential Revision: https://reviews.freebsd.org/D60460
(cherry picked from commit d3b02115d4b373c719d9a716da38d94511de3f07)
[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]