HardenedBSD/src e1986e8sys/compat/linuxkpi/common/include/linux dma-mapping.h, sys/compat/linuxkpi/common/src linux_pci.c

Merge remote-tracking branch 'rad/hardened/current/master' into hardened/current/pledge
DeltaFile
+50-5sys/compat/linuxkpi/common/include/linux/dma-mapping.h
+7-7usr.sbin/pmc/view.cc
+11-0sys/compat/linuxkpi/common/src/linux_pci.c
+8-1usr.sbin/pciconf/pciconf.c
+0-5usr.sbin/pmc/headers.hh
+3-1usr.sbin/pciconf/pciconf.8
+79-191 files not shown
+81-217 files

HardenedBSD/src 2bcc4edsys/dev/e1000 if_em.h e1000_regs.h, sys/dev/ixgbe if_ix.c

Merge remote-tracking branch 'rad/hardened/15-stable/main' into hardened/15-stable/pledge
DeltaFile
+229-22sys/dev/e1000/if_em.c
+102-36sys/x86/iommu/amd_drv.c
+13-0sys/dev/e1000/e1000_defines.h
+12-0sys/dev/ixgbe/if_ix.c
+9-0sys/dev/e1000/e1000_regs.h
+3-0sys/dev/e1000/if_em.h
+368-586 files

HardenedBSD/src b191736sys/compat/linuxkpi/common/include/linux dma-mapping.h, sys/compat/linuxkpi/common/src linux_pci.c

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+50-5sys/compat/linuxkpi/common/include/linux/dma-mapping.h
+7-7usr.sbin/pmc/view.cc
+11-0sys/compat/linuxkpi/common/src/linux_pci.c
+8-1usr.sbin/pciconf/pciconf.c
+0-5usr.sbin/pmc/headers.hh
+3-1usr.sbin/pciconf/pciconf.8
+79-191 files not shown
+81-217 files

HardenedBSD/src b00eaaesys/dev/e1000 if_em.h e1000_regs.h, sys/dev/ixgbe if_ix.c

Merge branch 'freebsd/15-stable/main' into hardened/15-stable/main
DeltaFile
+229-22sys/dev/e1000/if_em.c
+102-36sys/x86/iommu/amd_drv.c
+13-0sys/dev/e1000/e1000_defines.h
+12-0sys/dev/ixgbe/if_ix.c
+9-0sys/dev/e1000/e1000_regs.h
+3-0sys/dev/e1000/if_em.h
+368-586 files

HardenedBSD/src 792307dsys/x86/iommu amd_drv.c

amd_iommu: Bound IVHD device-entry parsing

Validate the IVRS table and every subtable length before using either
to form iterator bounds. Reject truncated typed IVHD blocks instead of
passing them to a type-specific callback.

Within each IVHD payload, correct the lower-bound comparison for
extended range entries and validate fixed-size entries, paired range
terminators, the fixed HID body, and the variable HID UID before
dereferencing or advancing. Malformed firmware can no longer drive
either iterator beyond its enclosing object.

Reviewed by:    kib
Sponsored by:   BBOX.io
Differential Revision:  https://reviews.freebsd.org/D58724

(cherry picked from commit 4a2494d76ad03c755f2cb0ed5e1311b03bb2a8e2)
DeltaFile
+102-36sys/x86/iommu/amd_drv.c
+102-361 files

HardenedBSD/src 1b08c8asys/dev/ixgbe if_ix.c

ixgbe: Probe additional controller variants

The shared base code already selects and configures the 82598 BX,
82599 KR, 82599 SFP Express Module, X552 XFI, X553 QSFP, and X553 N
QSFP device IDs, but the FreeBSD probe table omits them while DPDK lists
them.

Sponsored by:   BBOX.io

(cherry picked from commit 27f0491e3648722a892558416a768dda77850ad9)
DeltaFile
+12-0sys/dev/ixgbe/if_ix.c
+12-01 files

HardenedBSD/src 589235dsys/dev/e1000 if_em.h e1000_defines.h

igb: Report 82580 memory ECC errors

82580 exposes clear-on-read, saturating corrected error counters for
the receive and transmit packet buffers.  Its two PCIe command memories
expose RW1C indications for uncorrectable ECC errors.

Sample the packet buffer counters and PCIe indications from the regular
hardware statistics update.  Fatal recovery samples the PCIe indications
from the serialized admin path rather than the interrupt filter.  Thus,
either the regular statistics pass or recovery reads and clears each
indication, but they cannot both account it.  Also preserve indications
observed while initialization is completing.

Expose the exact packet buffer error total and observed PCIe command
memory indications under the memory_errors sysctl node.  Multiple PCIe
errors between samples can collapse into one indication per memory.

Validated on an Intel I340-T2 (82580, revision 1).  A clean boot and
three down/up cycles left the packet-buffer, PCIe, and region-specific

    [11 lines not shown]
DeltaFile
+56-12sys/dev/e1000/if_em.c
+1-0sys/dev/e1000/if_em.h
+1-0sys/dev/e1000/e1000_defines.h
+58-123 files

HardenedBSD/src 5aceda2sys/dev/e1000 if_em.h e1000_regs.h

e1000: Recover from 82580 memory errors

82580 reports fatal parity and uncorrectable ECC errors through ICR.FER
and its four region PEIND hierarchy.  Region specific status registers
identify PCIe, DMA transmit, DMA receive, DMA host, and LAN port
memories that can leave traffic stopped.

Enable the documented DMA, PCIe, packet-buffer, and host-owned LAN
parity and ECC checks only after initializing queue and filter tables.
Leave the flexible filter parity controls under management firmware
ownership.  Capture read-clear and RW1C status in the interrupt filter
and keep FER masked until the admin task resolves the event.

Reset for a host-owned region or an unknown FER source.  Leave
management-only recovery to firmware.  Use CTRL.RST before master
disable because fatal 82580 memory errors can stop PCIe traffic.  Do not
use CTRL.DEV_RST: specification update item 9 declares that bit reserved
and says it must always be written as zero.  Wait for EEPROM auto read
completion; STATUS bit 21 is reserved on 82580, not PF_RST_DONE.

    [22 lines not shown]
DeltaFile
+184-21sys/dev/e1000/if_em.c
+12-0sys/dev/e1000/e1000_defines.h
+9-0sys/dev/e1000/e1000_regs.h
+2-0sys/dev/e1000/if_em.h
+207-214 files

HardenedBSD/src 2e33355usr.sbin/pmc headers.hh view.cc

pmc: avoid illegal flexible array member

Remove struct pmchdr_cpuidinfo which was just a wrapper around a
flexible array member of uint32_t.  Flexible array members are
non-standard in C++, and even in C are not allowed as the only member
of a struct.

GCC errored out on pmchdr_cpuidinfo, but did not complain about
pmchdr_pmcinfo, so I left it alone here, though it is also non-standard.

Fixes:  93da997ef759 ("pmc: new pmc log processing framework")
Reviewed by:    Ali Mashtizadeh <ali at mashtizadeh.com>
Differential Revision:  https://reviews.freebsd.org/D59355
DeltaFile
+7-7usr.sbin/pmc/view.cc
+0-5usr.sbin/pmc/headers.hh
+7-122 files

HardenedBSD/src 3581b6dusr.bin/find find.1

find.1: fix rendering of find -s example

The period here is part of the literal string in the example.  Adding a
space caused the example to be quoted wrongly.  Instead, a trailing
zero-width space keeps the linter mandoc -T happy.

Reviewed by:    ziaee
Differential Revision:  https://reviews.freebsd.org/D59353
DeltaFile
+2-2usr.bin/find/find.1
+2-21 files

HardenedBSD/src 9dec0cdsys/compat/linuxkpi/common/include/linux dma-mapping.h, sys/compat/linuxkpi/common/src linux_pci.c

LinuxKPI: implement dma_sync_sg_for_{cpu, device}()

Implement dma_sync_sg_for_{cpu, device}() and
dma_sync_sgtable_for_device().
These functions are useful for my GSoC 2026 project, udmabuf.

Reviewed by:    bz
MFC after:      3 days
Differential Revision: https://reviews.freebsd.org/D57766
DeltaFile
+48-3sys/compat/linuxkpi/common/include/linux/dma-mapping.h
+11-0sys/compat/linuxkpi/common/src/linux_pci.c
+59-32 files

HardenedBSD/src 33574d4sys/compat/linuxkpi/common/include/linux dma-mapping.h

LinuxKPI: Correct nents passed to dma_{un,}map_sg_attrs()

According to Linux documentation the nents argument to dma_unmap_sg()
must be the number one passed in, not the number of DMA addresses.

In LinuxKPI this means orig_nents and not nents, so adjust this.

Given nents and orig_nents should always be the same in LinuxKPI,
this should only be a NOP for correctness.

Reviewed by:    bz, aokblast (LGTM)
MFC after:      3 days
Differential Revision: https://reviews.freebsd.org/D57842
DeltaFile
+2-2sys/compat/linuxkpi/common/include/linux/dma-mapping.h
+2-21 files

HardenedBSD/src 4dc810busr.sbin/pciconf pciconf.8 pciconf.c

pciconf: extend tree mode to also print numerical IDs

Also print the vendor/device and subvendor/subdevice IDs in addition
to any strings from the database found if the -v flag is given more
than once.
This helps with device identification if the strings resolve to
identical values for entire product families as well as when the
exact card cannot be determined from the string.
In theory a second call to pciconf could present that information in
non-tree mode but that kind-of defeats the purpose.

Reviewed by:    jhb
MFC after:      3 days
Differential Revision: https://reviews.freebsd.org/D56248
DeltaFile
+8-1usr.sbin/pciconf/pciconf.c
+3-1usr.sbin/pciconf/pciconf.8
+11-22 files

HardenedBSD/src 721b39clibexec/rtld-elf/amd64 rtld_machdep.h rtld_start.S, libexec/rtld-elf/i386 rtld_machdep.h rtld_start.S

Merge remote-tracking branch 'rad/hardened/current/master' into hardened/current/pledge
DeltaFile
+95-3libexec/rtld-elf/i386/reloc.c
+92-2libexec/rtld-elf/amd64/reloc.c
+65-0libexec/rtld-elf/amd64/rtld_start.S
+36-0libexec/rtld-elf/i386/rtld_start.S
+33-2libexec/rtld-elf/i386/rtld_machdep.h
+34-1libexec/rtld-elf/amd64/rtld_machdep.h
+355-812 files not shown
+409-2218 files

HardenedBSD/src 8b521c9usr.sbin/mixer mixer.c

Merge remote-tracking branch 'rad/hardened/15-stable/main' into hardened/15-stable/pledge
DeltaFile
+3-1usr.sbin/mixer/mixer.c
+3-11 files

HardenedBSD/src d0084b9libexec/rtld-elf/amd64 rtld_machdep.h rtld_start.S, libexec/rtld-elf/i386 rtld_machdep.h rtld_start.S

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+95-3libexec/rtld-elf/i386/reloc.c
+92-2libexec/rtld-elf/amd64/reloc.c
+65-0libexec/rtld-elf/amd64/rtld_start.S
+36-0libexec/rtld-elf/i386/rtld_start.S
+33-2libexec/rtld-elf/i386/rtld_machdep.h
+34-1libexec/rtld-elf/amd64/rtld_machdep.h
+355-812 files not shown
+409-2218 files

HardenedBSD/src b4c54ffusr.sbin/mixer mixer.c

Merge branch 'freebsd/15-stable/main' into hardened/15-stable/main
DeltaFile
+3-1usr.sbin/mixer/mixer.c
+3-11 files

HardenedBSD/src 8929675lib/libmagic Makefile

libmagic: Add swap.c and magic.h to SRCS.

file 5.48 added swap.c and swap.h for byte-swapping operations, which are
required on hosts that lack <byteswap.h> or <sys/bswap.h> (e.g. macOS cross-building
or older FreeBSD bootstrap environments).

Also add magic.h to SRCS so object files depend on the generated header
before compiling, avoiding falling back to the host's /usr/include/magic.h
during parallel builds.

Reported by:    wosch
MFC after:      1 week
Fixes:          7af41682a96b ("MFV: file 5.48")
DeltaFile
+4-2lib/libmagic/Makefile
+4-21 files

HardenedBSD/src d45d7aelibexec/rtld-elf/amd64 rtld_start.S, libexec/rtld-elf/i386 rtld_machdep.h rtld_start.S

i386 rtld: implement support for TLSDESC relocation

Discussed with: jrtc27
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D59269
DeltaFile
+94-1libexec/rtld-elf/i386/reloc.c
+36-0libexec/rtld-elf/i386/rtld_start.S
+28-3libexec/rtld-elf/i386/rtld_machdep.h
+25-0libexec/rtld-elf/amd64/rtld_start.S
+183-44 files

HardenedBSD/src 76f5fcclibexec/rtld-elf/amd64 rtld_machdep.h rtld_start.S

amd64 rtld: implement support for TLSDESC relocation

Discussed with: jrtc27
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D59269
DeltaFile
+92-2libexec/rtld-elf/amd64/reloc.c
+41-1libexec/rtld-elf/amd64/rtld_start.S
+33-3libexec/rtld-elf/amd64/rtld_machdep.h
+166-63 files

HardenedBSD/src 5d9e5f4libexec/rtld-elf rtld.c

rtld: explain the use of rtld_bind_lock in rtld_get_addr_slow()

Discussed with: jrtc27
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D59269
DeltaFile
+5-0libexec/rtld-elf/rtld.c
+5-01 files

HardenedBSD/src fb63a60libexec/rtld-elf/i386 reloc.c rtld_machdep.h

rtld i386: use macro for the 'GNU ABI' calling convention of TLS resolver

Discussed with: jrtc27
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D59269
DeltaFile
+4-1libexec/rtld-elf/i386/rtld_machdep.h
+1-2libexec/rtld-elf/i386/reloc.c
+5-32 files

HardenedBSD/src 6a69d28libexec/rtld-elf/aarch64 rtld_machdep.h, libexec/rtld-elf/amd64 rtld_machdep.h

rtld: allow arches to initialize/finalize objects

Discussed with: jrtc27
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D59269
DeltaFile
+3-0libexec/rtld-elf/powerpc64/rtld_machdep.h
+3-0libexec/rtld-elf/powerpc/rtld_machdep.h
+3-0libexec/rtld-elf/i386/rtld_machdep.h
+3-0libexec/rtld-elf/arm/rtld_machdep.h
+3-0libexec/rtld-elf/amd64/rtld_machdep.h
+3-0libexec/rtld-elf/aarch64/rtld_machdep.h
+18-02 files not shown
+23-08 files

HardenedBSD/src 7c73fdbsys/sys param.h

video: bump __FreeBSD_version for V4L2 camera class renumbering

The camera control IDs in videoio.h changed numeric values; ports
consuming V4L2 camera controls need to be rebuilt.

Reviewed by:    thierry
Differential Revision:  https://reviews.freebsd.org/D59460
DeltaFile
+1-1sys/sys/param.h
+1-11 files

HardenedBSD/src ea7c31bsys/sys videoio.h

video(4): fix camera control class ABI and add missing V4L2 constants

Renumbered the camera class to match the reference ABI and added the
constants ported applications expect:

Reviewed by:    thierry
Differential Revision:  https://reviews.freebsd.org/D59459
DeltaFile
+26-3sys/sys/videoio.h
+26-31 files

HardenedBSD/src e8c1931usr.sbin/mixer mixer.c

mixer: Improve error messages

Use better diagnostic messages when unit numbers are wrong.

Reviewed by:    arrowd@, christos@, kevans@
Approved by:    christos@
Differential Revision:  https://reviews.freebsd.org/D56845

(cherry picked from commit 9f5cfe625e9e8153599105458650e5fcecfd6281)
DeltaFile
+3-1usr.sbin/mixer/mixer.c
+3-11 files

HardenedBSD/src f1fa2f7sys/amd64/amd64 mp_machdep.c

amd64: initialize IPI scoreboard earlier

The initializer just needs working malloc(9) and two constants that
are set at hammer_time().

Fixes:  648fa3558c161a1d8564626d21047710c3fbfdf6

Reviewed by:            avg, markj
Differential Revision:  https://reviews.freebsd.org/D58714
DeltaFile
+1-1sys/amd64/amd64/mp_machdep.c
+1-11 files

HardenedBSD/src d13ee10sys/kern kern_intr.c

random: don't collect entropy when scheduling software interrupt handlers

The entropy will be collected in intr_event_schedule_thread() for event
handlers that are marked as entropy sources.  The quality of entropy
provided by SWI wasn't great anyway.

Reviewed by:            cem, ngie
Differential Revision:  https://reviews.freebsd.org/D58829
DeltaFile
+0-7sys/kern/kern_intr.c
+0-71 files

HardenedBSD/src 062db6csbin/hastd control.c, sbin/hastd/tests hastd_test.sh

Merge remote-tracking branch 'rad/hardened/current/master' into hardened/current/pledge
DeltaFile
+23-23sys/kern/kern_descrip.c
+23-23share/man/man4/tws.4
+36-0sbin/hastd/tests/hastd_test.sh
+6-15share/man/man4/tun.4
+10-10sys/kern/vfs_syscalls.c
+17-0sbin/hastd/control.c
+115-7110 files not shown
+157-8516 files

HardenedBSD/src e623f76sys/compat/freebsd32 freebsd32_misc.c, sys/dev/asmc asmcmmio.c asmcvar.h

Merge remote-tracking branch 'rad/hardened/15-stable/main' into hardened/15-stable/pledge
DeltaFile
+1,536-654sys/dev/asmc/asmc.c
+131-916sys/dev/asmc/asmcvar.h
+275-188sys/kern/tty.c
+402-0sys/dev/asmc/asmcmmio.c
+162-72sys/kern/sys_process.c
+90-66sys/compat/freebsd32/freebsd32_misc.c
+2,596-1,89660 files not shown
+3,400-1,99266 files