HardenedBSD/src a097bab — sys/netinet/tcp_stacks rack.c, tests/sys/netinet6 ndp.sh

Merge remote-tracking branch 'rad/hardened/current/master' into hardened/current/pledge
DeltaFile
+409-1tests/sys/netinet6/ndp.sh
+81-0usr.sbin/sysrc/tests/sysrc_test.sh
+61-17usr.sbin/arp/arp.c
+61-8sys/netinet/tcp_stacks/rack.c
+17-28usr.sbin/sysrc/sysrc
+30-1usr.sbin/arp/arp.8
+659-5517 files not shown
+778-9123 files

HardenedBSD/src 00f7e4a — sys/netinet/tcp_stacks rack.c, tests/sys/netinet6 ndp.sh

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+409-1tests/sys/netinet6/ndp.sh
+81-0usr.sbin/sysrc/tests/sysrc_test.sh
+61-17usr.sbin/arp/arp.c
+61-8sys/netinet/tcp_stacks/rack.c
+17-28usr.sbin/sysrc/sysrc
+30-1usr.sbin/arp/arp.8
+659-5517 files not shown
+778-9123 files

HardenedBSD/src 4b248b5 — share/man/man4 fdescfs.4, sys/dev/pci pcireg.h pci.c

Merge branch 'freebsd/15-stable/main' into hardened/15-stable/main
DeltaFile
+302-0tests/sys/fs/fdescfs/fdescfs_test.c
+49-0sys/dev/pci/pci.c
+16-1sys/fs/fdescfs/fdesc_vnops.c
+6-3sys/netinet/tcp_subr.c
+9-0sys/dev/pci/pcireg.h
+6-1share/man/man4/fdescfs.4
+388-53 files not shown
+395-59 files

HardenedBSD/ports 6202b44 — astro/qmapshack pkg-plist, misc/paseo-desktop/files/packagejsons package-lock.json

Merge branch 'freebsd/main' into hardenedbsd/main
DeltaFile
+43,175-0misc/paseo-desktop/files/packagejsons/package-lock.json
+9,580-0misc/paseo-hub/files/packagejsons/package-lock.json
+4,494-0misc/paseo/files/packagejsons/package-lock.json
+559-381net-p2p/autopulse/distinfo
+530-2astro/qmapshack/pkg-plist
+278-189net-p2p/autopulse/Makefile.crates
+58,616-572172 files not shown
+62,713-1,483178 files

FreeBSD/src d05d660 — sys/netinet tcp_subr.c

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.

Approved by:    re (cperciva)
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)
(cherry picked from commit aacae7b35a22a56e187a0a41db231d63ca9cefb6)
DeltaFile
+6-3sys/netinet/tcp_subr.c
+6-31 files

FreeBSD/src 8d4a8d1 — sys/netinet tcp_input.c, sys/netinet/tcp_stacks bbr.c rack.c

tcp: improve ISS checking for ghost ACKs

The check in tcp_adapt_iss_check() depends on SND.UNA and therefore
should be performed whenever SND.UNA is incremented.

Approved by:    re (cperciva)
PR:                     298560
Reviewed by:            Peter Lei
Sponsored by:           Netflix, Inc.
Differential Revision:  https://reviews.freebsd.org/D61749

(cherry picked from commit 9e345ca583f702e7472f836136e766d3346c049d)
(cherry picked from commit ce78b5a3d47574fafbe86d1ce9dcef7c19360e95)
DeltaFile
+4-1sys/netinet/tcp_stacks/rack.c
+2-1sys/netinet/tcp_stacks/bbr.c
+2-1sys/netinet/tcp_input.c
+8-33 files

FreeBSD/src c52b45e — sys/netinet tcp_input.c tcp_var.h, sys/netinet/tcp_stacks rack.c bbr.c

tcp: improve consistency

Use an inline function tcp_adapt_iss_check() to perform the check
consistently instead of replicating the code multiple times. These
checks already became inconsistent.
A fix for PR 298560 requires more calls to tcp_adapt_iss_check().

Approved by:    re (cperciva)
Reviewed by:            Peter Lei
Fixes:                  fa2ad70a4511 ("tcp: make ghost ACK handling more conformant")
Sponsored by:           Netflix, Inc.
Differential Revision:  https://reviews.freebsd.org/D61685

(cherry picked from commit e3483dbc91b59b5b2c73a4bc792fbb834c3dc111)
(cherry picked from commit 73929d1dc3b4116ca12cc3fe08fa3a9b66bf3318)
DeltaFile
+10-0sys/netinet/tcp_var.h
+1-4sys/netinet/tcp_stacks/rack.c
+1-4sys/netinet/tcp_stacks/bbr.c
+1-4sys/netinet/tcp_input.c
+13-124 files

FreeBSD/src 202f628 — sys/netinet tcp_input.c

tcp: make ghost ACK handling more conformant

The latest version of draft-ietf-tcpm-tcp-ghost-acks changed
a condition. This should make no substantial difference, but makei
it compliant to the latest version of the specification.

Approved by:    re (cperciva)
Reviewed by:            rscheff, Peter Lei
Sponsored by:           Netflix, Inc.
Differential Revision:  https://reviews.freebsd.org/D58411

(cherry picked from commit fa2ad70a4511e7b379e81de82c9e51b2e0994295)
(cherry picked from commit a170546cb8d13a67ee3062114228d3df4744bbee)
DeltaFile
+1-1sys/netinet/tcp_input.c
+1-11 files

FreeBSD/src 6a3f0ed — sys/netinet tcp_output.c

tcp: improve sender side SWS avoidance

When checking for a full sized segment, take all TCP options that will
be included into account. This fixes a bug which can trigger the
"sent too much" KASSERT related to limited transmit.

Approved by:    re (cperciva)
Reported by:            olivier
Reviewed by:            rscheff, Peter Lei
Sponsored by:           Netflix, Inc.
Differential Revision:  https://reviews.freebsd.org/D61605

(cherry picked from commit d174085f9f895ed444bd95120da3eff481a58f1a)
(cherry picked from commit 13357c1ee34f9f8655375714c60da8bf4881493a)
DeltaFile
+1-13sys/netinet/tcp_output.c
+1-131 files

FreeBSD/src 480ff19 — sys/netinet/tcp_stacks bbr.c

tcp bbr: improve handling of retransmissions in LAST-ACK

When performing a timer based retransmission, clear the
BBR_RWND_COLLAPSED flag. If it sticks, t_rxtshift is never incremented
resulting in unlimited retransmissions in the LAST-ACK state.

Approved by:    re (cperciva)
Reported by:            Illia Vynohradov
Reviewed by:            Peter Lei
Sponsored by:           Netflix, Inc.
Differential Revision:  https://reviews.freebsd.org/D61586

(cherry picked from commit 3c6fd437b1824caeddb5f0d4570d43cf0c999c14)
(cherry picked from commit cbd17b66e64e9bdf025200c4993b8aeae6a0ebe9)
DeltaFile
+1-1sys/netinet/tcp_stacks/bbr.c
+1-11 files

FreeBSD/src 1b9c494 — sys/netinet/tcp_stacks bbr.c

tcp bbr: improve persits timeout computation

t_srtt and t_rttvar use different lengths of fractions, therefore use
the appropriate shift value.

Approved by:    re (cperciva)
Reviewed by:            Peter Lei
Sponsored by:           Netflix, Inc.
Differential Revision:  https://reviews.freebsd.org/D61600

(cherry picked from commit 751882926dc0bb1f7a4834c4b5e8d951cee61c7c)
(cherry picked from commit 3e74519d5136d4eb0fee56148ff30c66607a3eac)
DeltaFile
+1-1sys/netinet/tcp_stacks/bbr.c
+1-11 files

FreeBSD/src 1180c43 — sys/netinet/tcp_stacks bbr.c

tcp bbr: improve retransmit timout calculation

The retransmission timeout should the srtt + 4 * rttvar.
The srtt is using 5 bits of fractions and rttvar is using 4 bits of
fractions, some specific shifting is required.

Approved by:    re (cperciva)
Reviewed by:            Peter Lei
Sponsored by:           Netflix, Inc.
Differential Revision:  https://reviews.freebsd.org/D61581

(cherry picked from commit 2f98793a13fe3e69cf6b698fa469550b4ba0fea1)
(cherry picked from commit ccf8e3762c3948446263ae3ef0dd98391ef9f97e)
DeltaFile
+1-2sys/netinet/tcp_stacks/bbr.c
+1-21 files

FreeBSD/src 8c4970f — sys/netinet/tcp_stacks bbr.c

tcp bbr: improve invalidating rtt

Invalidate the rtt based on t_rxtshift instead of resetting t_srtt to 0,
because using the latter also affects the retransmission timeout.

Approved by:    re (cperciva)
Reviewed by:            Peter Lei
Sponsored by:           Netflix, Inc.
Differential Revision:  https://reviews.freebsd.org/D61585

(cherry picked from commit 8018d75601dfe804a8d70f4f08bdb0e4e3a8c5c9)
(cherry picked from commit 158dcb8e415d84caf6ebc30841ed4bfc3148bc32)
DeltaFile
+2-4sys/netinet/tcp_stacks/bbr.c
+2-41 files

FreeBSD/src 476b507 — sys/netinet/tcp_stacks bbr.c

tcp bbr: cleanup

No functional change intended.

Approved by:    re (cperciva)
Sponsored by:   Netflix, Inc.

(cherry picked from commit 34436bb7cf971dba1c0dcdb1d45f22fff1a4b6c1)
(cherry picked from commit c8ca5fa512fbbd04c69438cde86e6e2dd1c4597b)
DeltaFile
+3-4sys/netinet/tcp_stacks/bbr.c
+3-41 files

FreeBSD/src a4875f2 — sys/dev/acpica acpi_pxm.c

acpica: Fix SRAT memory region insertion sort

The SRAT table can list memory regions in any order, but we need them
sorted.  There is an insertion sort to accomplish this when building
the mem_info array, but instead of inserting the new region before
the *first* higher-base-address region, it was inserting the new
region before the *last* higher-base-address region; i.e. if the array
already held "1 3 4" then inserting "2" would produce "1 3 2 4".

Break out of the insertion-location-finding loop when we find the right
spot to insert the new memory region into the list, rather than looking
further.

Approved by:    re (cperciva)
Reviewed by:    jhb
Fixes:  dd540b46236b ("Add a parser for the ACPI SRAT table...")
MFC after:      1 day
Sponsored by:   Amazon
Tested on:      c5n.9xlarge, c6a.24xlarge, c6a.metal, c7a.metal-48xl

    [7 lines not shown]
DeltaFile
+1-0sys/dev/acpica/acpi_pxm.c
+1-01 files

FreeBSD/src c3f47d8 — release/tools ec2.conf

EC2: Set hw.dmar.enable="1"

Large EC2 "bare metal" instances route interrupts to APIC IDs > 255,
and unlike the "virtualized" instances, don't support extended APIC
destination IDs (since that's a hypervisor feature, and bare metal
instances have no hypervisor).

Enable the IOMMU for interrupt remapping; this unbreaks booting on
m8i.metal-96xl and variants thereof (e.g. c8in).

Approved by:    re (cperciva)
MFC after:      1 day
Sponsored by:   Amazon
Tested on:      c5n.9xlarge, c6a.24xlarge, c8in.96xlarge, c5.metal,
                c6in.metal, c6a.metal, c7a.metal-48xl, c7i.metal-24xl,
                c7i.metal-48xl, c8a.metal-24xl, c8a.metal-48xl,
                c8i.metal-48xl, c8i.metal-96xl, c8in.metal-48xl,
                c8in.metal-96xl, m5.metal, m8azn.metal-24xl


    [2 lines not shown]
DeltaFile
+4-0release/tools/ec2.conf
+4-01 files

FreeBSD/src 2b8445d — sys/compat/freebsd32 freebsd32_misc.c

procctl: Zero the output structure for the compat32 syscall

Otherwise the freebsd32 implementation of PROC_REAP_STATUS leaks
uninitialized kernel stack memory.

Approved by:    re (cperciva)
Reviewed by:    kib
Reported by:    Dennys Kaluzny Pereira <dennyskaluzny at gmail.com>
MFC after:      1 week
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D61510

(cherry picked from commit 5a834ad15f1f09d43a6840c74da194db6f890aa2)
(cherry picked from commit 42e71f0bafc23c0707752381d0b25649d12ae8c4)
DeltaFile
+1-0sys/compat/freebsd32/freebsd32_misc.c
+1-01 files

FreeBSD/src cff4d5d — sys/arm64/arm64 elf_machdep.c, sys/kern imgact_elf.c

imgact_elf: Pass program headers to the sv_protect hook

We handle program headers beyond the first page of the file, but
arm64_exec_protect() wasn't updated to handle this.  Pass the program
header array directly to the sv_protect hook.

Also fix a pre-existing bug: imgp->et_dyn_addr isn't the right base
address to use for the SV_INTERP case.

Approved by:    re (cperciva)
Reported by:    alc
Reviewed by:    alc, kib
Fixes:          804daf166406 ("imgact_elf: read program headers if not contained in the first page")
Fixes:          670af174e27b ("arm64: Enable BTI in the kernel ELF loader")
MFC after:      3 days
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D61999

(cherry picked from commit 884e1a00151d181e5dd1ba9d83c1adcffd25e5e8)
DeltaFile
+6-4sys/arm64/arm64/elf_machdep.c
+2-2sys/kern/imgact_elf.c
+2-1sys/sys/sysent.h
+10-73 files

LLVM/project 51a9189 — bolt/test/X86 dwarf4-duplicate-file-names.s

[BOLT][DWARF] Add a DWARF 4 test for duplicate file names (#246122)

PR #241862 made BOLT keep the file name entries of CU line tables at
their input numbers, duplicates included, and added a new test that
covers DWARF 5 only.

This is to add a test for DWARF 4 line tables. Besides the file list, it
also checks that every row and the DW_AT_decl_file/DW_AT_call_file
values name the right files, both for functions that BOLT emits and for
those whose rows are copied from the input (--skip-funcs). The test
would fail without the fix in #241862.

Assisted-by: opus-5.5
DeltaFile
+542-0bolt/test/X86/dwarf4-duplicate-file-names.s
+542-01 files

LLVM/project d892487 — bolt/lib/Passes LongJmp.cpp, bolt/test/AArch64/legacy-longjmp long-jmp-split-cold-section.s long-jmp-tentative-pseudo-island.s

[BOLT] Match LongJmp tentative layout to emitted code sections (#241429)

In relocation mode, the emitter places each function fragment in the
code section named by BinaryFunction::getCodeSectionName(), in output
order, and RewriteInstance::mapCodeSections() then allocates those
sections in the order given by BinaryContext::compareSectionNames(),
each aligned to its section alignment. LongJmp's tentative layout
instead modeled only one hot and one cold sequence of fragments, and
differed from the emitted layout in these ways:

All cold fragments were put at the first function without a valid index,
assuming that marks the end of hot code. When functions are split
without a profile, e.g. with --split-strategy=random2, no function has
an index, so cold fragments were placed before the .text section rather
than after it, and branches to them could miss a stub.

Thunks have no index either, so if any were present among hot functions
when the tentative layout is computed, they would also be mistaken for
the end of hot code.

    [18 lines not shown]
DeltaFile
+145-115bolt/lib/Passes/LongJmp.cpp
+83-0bolt/test/AArch64/legacy-longjmp/long-jmp-tentative-instrument.s
+79-0bolt/test/AArch64/legacy-longjmp/long-jmp-tentative-use-old-text.s
+60-0bolt/test/AArch64/legacy-longjmp/long-jmp-tentative-hot-functions-at-end.s
+52-0bolt/test/AArch64/legacy-longjmp/long-jmp-tentative-pseudo-island.s
+44-0bolt/test/AArch64/legacy-longjmp/long-jmp-split-cold-section.s
+463-1153 files not shown
+487-1349 files

FreeBSD/src 68d4c95 — usr.sbin/sysrc sysrc sysrc.subr, usr.sbin/sysrc/tests sysrc_test.sh

sysrc: Restore alignment with rc(8) boot process

Fix 1 issue identified in post-commit review of d0a1676:

POSTCR-d0a167652278ed81d259a1b77620b0c1cb9f72c8-1:
set -f around source_rc_confs stops glob expansion of rc_conf_files,
so sysrc no longer sees files that rc(8) sources

Partially "revert" d0a167652278 with respect to RC_CONFS, `-f file`,
rc_conf_files handling, and source_rc_confs invocation.

Add an ATF test to ensure we maintain rc(8) alignment.

Reported by:    llm-postcr
Fixes:          d0a167652278 ("sysrc: Support special characters in file names")
DeltaFile
+43-0usr.sbin/sysrc/tests/sysrc_test.sh
+19-9usr.sbin/sysrc/sysrc.subr
+7-10usr.sbin/sysrc/sysrc
+69-193 files

HardenedBSD/src 68d4c95 — usr.sbin/sysrc sysrc sysrc.subr, usr.sbin/sysrc/tests sysrc_test.sh

sysrc: Restore alignment with rc(8) boot process

Fix 1 issue identified in post-commit review of d0a1676:

POSTCR-d0a167652278ed81d259a1b77620b0c1cb9f72c8-1:
set -f around source_rc_confs stops glob expansion of rc_conf_files,
so sysrc no longer sees files that rc(8) sources

Partially "revert" d0a167652278 with respect to RC_CONFS, `-f file`,
rc_conf_files handling, and source_rc_confs invocation.

Add an ATF test to ensure we maintain rc(8) alignment.

Reported by:    llm-postcr
Fixes:          d0a167652278 ("sysrc: Support special characters in file names")
DeltaFile
+43-0usr.sbin/sysrc/tests/sysrc_test.sh
+19-9usr.sbin/sysrc/sysrc.subr
+7-10usr.sbin/sysrc/sysrc
+69-193 files

LLVM/project d55fcfa — clang/include/clang/Analysis/Analyses Dominators.h

[analyzer] Remove unused CFGDominatorTreeImpl::releaseMemory (NFC) (#246525)

This function was added on December 5, 2011 in commit
02a1fc1da63f1aad88a5e80460f4f829870ec51a without any callers.  Commit
e23ba6925310549157076bb44b734acf56db029e dropped the virtual keyword on
November 25, 2026.

Assisted-by: Antigravity
DeltaFile
+0-3clang/include/clang/Analysis/Analyses/Dominators.h
+0-31 files

HardenedBSD/src ecb4794 — contrib/tzcode localtime.c

tzcode: Avoid integer truncation resulting in wrong weekday

From a report[1] on the tz mailing list:

In timesub() the weekday is stored in (int) tm_wday before reduction
modulo seven (DAYSPERWEEK).  Previously this could overflow a 32-bit
int, resulting in an incorrect weekday calculation.

Calculate two additional intermediate terms modulo seven to avoid an
intermediate value that does not fit in 32 bits.

We're committing this patch now so we can have something in place for
FreeBSD 15.2.  If a different change is committed upstream we will
replace this.

[1] https://lists.iana.org/hyperkitty/list/tz@iana.org/thread/O3RZGBKSO5GXBFDZKW2JXO3OQIIGYBF3/

PR:             300977
Requested by:   re (cperciva)

    [2 lines not shown]
DeltaFile
+2-2contrib/tzcode/localtime.c
+2-21 files

FreeBSD/src ecb4794 — contrib/tzcode localtime.c

tzcode: Avoid integer truncation resulting in wrong weekday

From a report[1] on the tz mailing list:

In timesub() the weekday is stored in (int) tm_wday before reduction
modulo seven (DAYSPERWEEK).  Previously this could overflow a 32-bit
int, resulting in an incorrect weekday calculation.

Calculate two additional intermediate terms modulo seven to avoid an
intermediate value that does not fit in 32 bits.

We're committing this patch now so we can have something in place for
FreeBSD 15.2.  If a different change is committed upstream we will
replace this.

[1] https://lists.iana.org/hyperkitty/list/tz@iana.org/thread/O3RZGBKSO5GXBFDZKW2JXO3OQIIGYBF3/

PR:             300977
Requested by:   re (cperciva)

    [2 lines not shown]
DeltaFile
+2-2contrib/tzcode/localtime.c
+2-21 files

LLVM/project 9022855 — clang/lib/StaticAnalyzer/Core RegionStore.cpp

[analyzer] Remove unused ClusterAnalysis::VisitCluster overload (NFC) (#246527)

The last caller of the three-parameter overload was removed on
September 24, 2013 in commit 424ad95fa73cfe7c917c63fd94977b7c13a2b036.
The last reference was removed on November 26, 2026 in commit
ce3f5808fcc8957e5125bd39393b7615aa6aa255.

Assisted-by: Antigravity
DeltaFile
+0-5clang/lib/StaticAnalyzer/Core/RegionStore.cpp
+0-51 files

FreeBSD/src 329b13f — sys/conf files, sys/modules Makefile

nfsclrdma: Add build glue for nfsclrdma sources

Commit 80bee4d836 added the sources for client side NFS
over RDMA.

This patch adds the code to build these sources as a
module called nfsclrdma.ko or in the kernel when
kernel options NFSCL and OFED are specified.

Reviewed by:    markj
MFC after:      1 month
Differential Revision:  https://reviews.freebsd.org/D61926
Fixes:  80bee4d83637 ("nfsclrdma: Add code to support client side NFS over RDMA")
DeltaFile
+16-0sys/modules/nfsclrdma/Makefile
+5-0sys/conf/files
+2-0sys/modules/Makefile
+23-03 files

HardenedBSD/src 329b13f — sys/conf files, sys/modules Makefile

nfsclrdma: Add build glue for nfsclrdma sources

Commit 80bee4d836 added the sources for client side NFS
over RDMA.

This patch adds the code to build these sources as a
module called nfsclrdma.ko or in the kernel when
kernel options NFSCL and OFED are specified.

Reviewed by:    markj
MFC after:      1 month
Differential Revision:  https://reviews.freebsd.org/D61926
Fixes:  80bee4d83637 ("nfsclrdma: Add code to support client side NFS over RDMA")
DeltaFile
+16-0sys/modules/nfsclrdma/Makefile
+5-0sys/conf/files
+2-0sys/modules/Makefile
+23-03 files

NetBSD/src 472Fce2 — sys/ufs/lfs lfs_vnops.c

   Check for dirty blocks, in addition to checking for IN_MODIFIED, when
   inactivating a vnode.  Should address PR kern/61000.
VersionDeltaFile
1.358+14-5sys/ufs/lfs/lfs_vnops.c
+14-51 files

NetBSD/src PsuIo0i — sys/ufs/lfs lfs_segment.c

   Reorganize the logic in lfs_writevnodes_selector to make it more clear
   that we always select a vnode with IS_FLUSHING set.
VersionDeltaFile
1.320+10-4sys/ufs/lfs/lfs_segment.c
+10-41 files