HardenedBSD/src f8b8171sys/net bpf.c bpfdesc.h

Merge remote-tracking branch 'origin/hardened/current/master' into hardened/current/cross-dso-cfi
DeltaFile
+35-34sys/net/bpf.c
+7-7sys/net/bpfdesc.h
+42-412 files

HardenedBSD/src 73fa941sys/net bpf.c bpfdesc.h

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+35-34sys/net/bpf.c
+7-7sys/net/bpfdesc.h
+42-412 files

HardenedBSD/src c42bce2sys/net bpf.c bpfdesc.h

bpf: convert several boolean natured fields of bpf_d to flags

This shrinks the structure a bit.  Should be no functional change.

Differential Revision:  https://reviews.freebsd.org/D53870
DeltaFile
+35-34sys/net/bpf.c
+7-7sys/net/bpfdesc.h
+42-412 files

HardenedBSD/src 267759f. RELNOTES, etc/mtree BSD.include.dist

Merge remote-tracking branch 'origin/hardened/current/master' into hardened/current/cross-dso-cfi
DeltaFile
+1,079-233share/misc/pci_vendors
+1-461RELNOTES
+0-42sys/netinet/tcp_timewait.c
+0-6sys/dev/xilinx/if_xae.c
+1-1etc/mtree/BSD.include.dist
+1,081-7435 files

HardenedBSD/src 915e089. RELNOTES, etc/mtree BSD.include.dist

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+1,079-233share/misc/pci_vendors
+1-461RELNOTES
+0-42sys/netinet/tcp_timewait.c
+0-6sys/dev/xilinx/if_xae.c
+1-1etc/mtree/BSD.include.dist
+1,081-7435 files

HardenedBSD/src e7d294fsys/dev/vt vt_core.c

Merge branch 'freebsd/14-stable/main' into hardened/14-stable/master
DeltaFile
+3-3sys/dev/vt/vt_core.c
+3-31 files

HardenedBSD/src e1c985csys/dev/vt vt_core.c

vt: Allow VT_SETMODE with frsig=0

Linux does not check that any of the signals in vt_mode VT_SETMODE ioctl
(relsig, acqsig, frsig) are valid, but FreeBSD required that all three
are valid.  frsig is unusued in both Linux and FreeBSD, and software
typically leaves it unset.  To improve portability, allow frsig to be
set to zero.

PR:             289812
Reported by:    Dušan Gvozdenović
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D52835

(cherry picked from commit 5198c32210039d8dc92554647384eee75688848c)
(cherry picked from commit 224d65015465d085f2e07edccef1f23a8c217b88)
DeltaFile
+3-3sys/dev/vt/vt_core.c
+3-31 files

HardenedBSD/src a16fdef. RELNOTES

RELNOTES: Truncate for 16.0

Differential Revision:  https://reviews.freebsd.org/D54195
DeltaFile
+1-461RELNOTES
+1-4611 files

HardenedBSD/src 929338dsys/netinet tcp_timewait.c

tpc: retire net.inet.tcp.nolocaltimewait

See c3fc0db3bc50df18a724e6e6b12ea4e060fd9255 for details.
DeltaFile
+0-42sys/netinet/tcp_timewait.c
+0-421 files

HardenedBSD/src 945884dsys/dts/arm/overlays spigen-rpi-b.dtso, sys/fs/unionfs union_vnops.c union_vfsops.c

Merge remote-tracking branch 'internal/hardened/current/master' into hardened/current/cross-dso-cfi
DeltaFile
+45-0sys/fs/unionfs/union_vnops.c
+0-30sys/dts/arm/overlays/spigen-rpi-b.dtso
+25-2sys/fs/unionfs/union_vfsops.c
+2-2tools/test/stress2/misc/pg_zero.sh
+1-2sys/kern/vfs_default.c
+1-1sys/kern/vnode_if.src
+74-373 files not shown
+76-399 files

HardenedBSD/src ef2d586etc/mtree BSD.include.dist

etc/mtree/BSD.include.dist: Remove libmilter-dev

When building with WITHOUT_SENDMAIL this result in a FreeBSD-libmilter-dev
package with only this directory and a dependacy on FreeBSD-libmilter which
doesn't exists.

Differential Revision:  https://reviews.freebsd.org/D54193
Fixes:          436618a427b4 ("etc/mtree: Add package tags for /usr/include")
Reviewed by:    ivy
Sponsored by:   Beckhoff Automation GMbH & Co. KG
DeltaFile
+1-1etc/mtree/BSD.include.dist
+1-11 files

HardenedBSD/src c522532sys/dev/xilinx if_xae.c

xae(4): remove unused function.

Sponsored by: CHERI Research Centre
DeltaFile
+0-6sys/dev/xilinx/if_xae.c
+0-61 files

HardenedBSD/src 3b8e13cshare/misc pci_vendors

pci_vendors: update to version 2025-12-12
DeltaFile
+1,079-233share/misc/pci_vendors
+1,079-2331 files

HardenedBSD/src a38f09asys/dts/arm/overlays spigen-rpi-b.dtso, sys/modules/dtb/rpi Makefile

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+0-30sys/dts/arm/overlays/spigen-rpi-b.dtso
+2-2tools/test/stress2/misc/pg_zero.sh
+0-1sys/modules/dtb/rpi/Makefile
+2-333 files

HardenedBSD/src 5eb6085lib/libc/stdlib recallocarray.c memalignment.3, lib/libopenbsd recallocarray.c

Merge branch 'freebsd/15-stable/main' into hardened/15-stable/main
DeltaFile
+82-0lib/libc/stdlib/recallocarray.c
+0-82lib/libopenbsd/recallocarray.c
+53-0lib/libc/stdlib/memalignment.3
+27-17sys/kern/uipc_socket.c
+36-1lib/libc/stdlib/reallocarray.3
+28-0lib/libc/stdlib/memalignment.c
+226-1008 files not shown
+253-11014 files

HardenedBSD/src f14ca37sys/kern uipc_socket.c

splice: Fix leaks that can happen when initiating a splice

- change the state to SPLICE_EXCEPTION to allow so_unsplice() to work
  to cleanup failed splices (fixes socket reference leak)
- NULL out sp->dst when unsplicing from so_splice() before so2 has been
   been referenced.
- Deal with a null sp->dst / so2 in so_unsplice
- Fix asserts that talked about sp->state == SPLICE_INIT; that state
  is not possible here.

Differential Revision: https://reviews.freebsd.org/D54157
Reviewed by: markj
Sponsored by: Netflix
Fixes: c0c5d01e5374 ("so_splice: Synchronize so_unsplice() with so_splice()")
MFC after: 3 days

(cherry picked from commit a837d1fe49e0255d81c670dc271ff245ae960097)
DeltaFile
+27-17sys/kern/uipc_socket.c
+27-171 files

HardenedBSD/src f2cb620sys/dts/arm/overlays spigen-rpi-b.dtso, sys/modules/dtb/rpi Makefile

Remove: sys/dts/arm/overlays/spigen-rpi-b.dtso

Remove SPIGEN device tree overlay used with rpi-b (BCM2835/armv6)

Approved by: manu (mentor)
Differential revision: https://reviews.freebsd.org/D54188
DeltaFile
+0-30sys/dts/arm/overlays/spigen-rpi-b.dtso
+0-1sys/modules/dtb/rpi/Makefile
+0-312 files

HardenedBSD/src cd79149lib/libdiff Makefile, lib/libfido2 Makefile

*/*: remove recallocarray() compat shims following import into libc

libopenbsd retains recallocarray() during bootstrapping for now
as it is needed for mandoc.

Reviewed by:    kib
Differential Revision: https://reviews.freebsd.org/D52864

(cherry picked from commit acd546f01e58354af049455472980c6c4a52e18b)
DeltaFile
+1-2usr.bin/mandoc/Makefile
+1-1lib/libdiff/Makefile
+0-1tests/oclo/Makefile
+0-1lib/libfido2/Makefile
+2-54 files

HardenedBSD/src 24ea810include stdlib.h, lib/libc/stdlib memalignment.3 memalignment.c

lib/libc: implement C23 memalignment()

This new function computes the alignment of a pointer.
It is part of ISO/IEC 9899:2024, the new C standard.
If the pointer is a null pointer, null is returned.
I have tried to write an implementation that can cope
with traditional address-based architectures, even if
size_t and uintptr_t are of different length.  Adjustments
may be needed for CHERI though.

A man page is provided, too.  No unit test for now.

Reviewed by:    kib, imp, ziaee (manpages), pauamma at gundo.com
Approved by:    markj (mentor)
MFC after:      1 month
Relnotes:       yes
Differential Revision:  https://reviews.freebsd.org/D53673

(cherry picked from commit 6c57e368eb1777f6097158eeca2fcc175d068dba)
DeltaFile
+53-0lib/libc/stdlib/memalignment.3
+28-0lib/libc/stdlib/memalignment.c
+8-0include/stdlib.h
+2-2lib/libc/stdlib/Makefile.inc
+1-0lib/libc/stdlib/Symbol.map
+92-25 files

HardenedBSD/src e72536alib/libc/stdlib recallocarray.c reallocarray.3, lib/libopenbsd recallocarray.c Makefile

lib/libc: add recallocarray()

This function from OpenBSD is a hybrid of reallocarray() and calloc().
It reallocates an array, clearing any newly allocated items.
reallocarray() ultimately originates from OpenBSD.

The source is taken from lib/libopenbsd, which now no longer has the
function unless when bootstrapping (needed for mandoc).

Reviewed by:    kib
Differential Revision:  https://reviews.freebsd.org/D52863

(cherry picked from commit 42664610795bc0a728851ba6223fcf9b93801167)
DeltaFile
+0-82lib/libopenbsd/recallocarray.c
+82-0lib/libc/stdlib/recallocarray.c
+36-1lib/libc/stdlib/reallocarray.3
+6-2lib/libopenbsd/Makefile
+4-0lib/libc/stdlib/Symbol.map
+2-1lib/libc/stdlib/Makefile.inc
+130-861 files not shown
+132-867 files

HardenedBSD/src 9d2981ftools/test/stress2/misc pg_zero.sh

stress2: Fix looping at exit and fix the cleanup
DeltaFile
+2-2tools/test/stress2/misc/pg_zero.sh
+2-21 files

HardenedBSD/src faedcddsys/cam/scsi scsi_xpt.c, sys/fs/unionfs union_vnops.c union_vfsops.c

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+45-0sys/fs/unionfs/union_vnops.c
+25-2sys/fs/unionfs/union_vfsops.c
+1-2sys/kern/vfs_default.c
+1-1sys/cam/scsi/scsi_xpt.c
+1-1sys/kern/vnode_if.src
+1-0sys/sys/vnode.h
+74-66 files

HardenedBSD/src 0247b40sys/fs/unionfs union_vfsops.c

unionfs: detect common deadlock-producing mount misconfigurations

When creating a unionfs mount, it's fairly easy to shoot oneself
in the foot by specifying upper and lower file hierarchies that
resolve back to the same vnodes.  This is fairly easy to do if
the sameness is not obvious due to aliasing through nullfs or other
unionfs mounts (as in the associated PR), and will produce either
deadlock or failed locking assertions on any attempt to use the
resulting unionfs mount.

Leverage VOP_GETLOWVNODE() to detect the most common cases of
foot-shooting at mount time and fail the mount with EDEADLK.
This is not meant to be an exhaustive check for all possible
deadlock-producing scenarios, but it is an extremely cheap and
simple approach that, unlike previous proposed fixes, also works
in the presence of nullfs aliases.

PR:             172334
Reported by:    ngie, Karlo Miličević <karlo98.m at gmail.com>

    [4 lines not shown]
DeltaFile
+25-2sys/fs/unionfs/union_vfsops.c
+25-21 files

HardenedBSD/src 5c02597sys/fs/unionfs union_vnops.c, sys/kern vfs_default.c

unionfs: Implement VOP_GETLOWVNODE

This function returns the vnode that will be used to resolve the
access type specified in the 'flags' argument, and is useful for
optimal behavior of vn_copy_file_range(). While most filesystems
can simply use the default implementation which returns the passed-
in vnode, unionfs (like nullfs) ideally should resolve the access
request to whichever base layer vnode will be used for the I/O.

For unionfs, write accesses must be resolved through the upper vnode,
while read accesses will be resolved through the upper vnode if
present or the lower vnode otherwise.  Provide a simple
unionfs_getlowvnode() implementation that reflects this policy.

Reviewed by:    kib, olce
Tested by:      pho
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D53988
DeltaFile
+45-0sys/fs/unionfs/union_vnops.c
+1-2sys/kern/vfs_default.c
+1-0sys/sys/vnode.h
+47-23 files

HardenedBSD/src 38d60d4sys/kern vnode_if.src

vnode_if.src: fix function name in locking annotation

getwritevnode->getlowvnode

Reviewed by:    kib, olce
Tested by:      pho
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D53988
DeltaFile
+1-1sys/kern/vnode_if.src
+1-11 files

HardenedBSD/src 478ac7dsys/cam/scsi scsi_xpt.c

cam: Also reduce timeout for wlun probing

wlun probing was added after my initial work on this and was overlooked
in merging forward. Add the timeout here too, for the same reasons as
for REPORT LUNS. This doesn't change the default.

Fixes: 8ac7a3801c6a cam: Reduce overly long timeout values for initial device probing
Sponsored by:           Netflix
Reviewed by:            jaeyoon
Differential Revision:  https://reviews.freebsd.org/D54184
DeltaFile
+1-1sys/cam/scsi/scsi_xpt.c
+1-11 files

HardenedBSD/src 6482678cddl/sbin/zfs Makefile, cddl/sbin/zpool Makefile

HBSD: Resolve merge conflicts

Signed-off-by:  Shawn Webb <shawn.webb at hardenedbsd.org>
DeltaFile
+2-7cddl/sbin/zpool/Makefile
+1-4cddl/sbin/zfs/Makefile
+3-112 files

HardenedBSD/src 9eda86eshare/colldef_unicode zh_CN.UTF-8.src ko_KR.UTF-8.src, share/ctypedef C.UTF-8.src

Merge remote-tracking branch 'internal/hardened/current/master' into hardened/current/cross-dso-cfi

Conflicts:
        cddl/lib/libtpool/Makefile (deleted)
        cddl/sbin/zfs/Makefile (unresolved)
        cddl/sbin/zpool/Makefile (unresolved)
DeltaFile
+42,569-43,804share/colldef_unicode/zh_CN.UTF-8.src
+20,031-20,027share/colldef_unicode/ko_KR.UTF-8.src
+8,521-8,521share/colldef_unicode/ja_JP.UTF-8.src
+9,988-0tools/tools/locale/etc/final-maps/map.UTF-8
+5,765-6share/ctypedef/C.UTF-8.src
+2,842-2,827share/colldef_unicode/hu_HU.UTF-8.src
+89,716-75,185473 files not shown
+157,487-150,047479 files

HardenedBSD/src 9756ad5. UPDATING, share/man/man4 scsi.4

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+33-1share/man/man4/scsi.4
+22-6sys/cam/scsi/scsi_xpt.c
+11-0UPDATING
+66-73 files

HardenedBSD/src 2af01eelib/libpmc/pmu-events/arch/x86/emeraldrapids uncore-cache.json uncore-interconnect.json

Merge branch 'freebsd/14-stable/main' into hardened/14-stable/master
DeltaFile
+6,248-0lib/libpmc/pmu-events/arch/x86/emeraldrapids/uncore-cache.json
+6,199-0lib/libpmc/pmu-events/arch/x86/emeraldrapids/uncore-interconnect.json
+3,617-0lib/libpmc/pmu-events/arch/x86/emeraldrapids/uncore-io.json
+3,308-0lib/libpmc/pmu-events/arch/x86/emeraldrapids/uncore-memory.json
+962-0lib/libpmc/pmu-events/arch/x86/emeraldrapids/pipeline.json
+888-0lib/libpmc/pmu-events/arch/x86/emeraldrapids/cache.json
+21,222-022 files not shown
+25,182-228 files