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

Merge remote-tracking branch 'rad/hardened/current/master' into hardened/current/pledge
DeltaFile
+229-22sys/dev/e1000/if_em.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
+266-225 files

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

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+229-22sys/dev/e1000/if_em.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
+266-225 files

HardenedBSD/src ce58fb7share/man/man9 iflibdd.9 iflibdi.9, sys/dev/ixgbe ixgbe_type.h if_ixv.c

Merge branch 'freebsd/15-stable/main' into hardened/15-stable/main
DeltaFile
+43-6sys/net/iflib.c
+35-0share/man/man9/iflibdi.9
+12-1sys/dev/ixgbe/if_ixv.c
+7-4share/man/man9/iflibdd.9
+5-0sys/net/iflib.h
+2-2sys/dev/ixgbe/ixgbe_type.h
+104-131 files not shown
+107-137 files

HardenedBSD/src 27f0491sys/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.

MFC after:      2 weeks
Sponsored by:   BBOX.io
DeltaFile
+12-0sys/dev/ixgbe/if_ix.c
+12-01 files

HardenedBSD/src 915c628sys/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

    [10 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 5e56a1fsys/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.

    [21 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 30909e8sys/dev/ixgbe ixgbe_type.h

ixgbe: Correct the PFVFRSSRK index range comment

PFVFRSSRK contains ten 32-bit RSS key words, numbered 0 through 9.
The previous inclusive range incorrectly ended at 10.

Sponsored by:   BBOX.io

(cherry picked from commit f177ff939a91a3d710752438b13aff53d5afc725)
DeltaFile
+1-1sys/dev/ixgbe/ixgbe_type.h
+1-11 files

HardenedBSD/src 6550689sys/dev/ixgbe ixgbe_type.h if_ixv.c

ixv: Reject unsupported E610 Hyper-V VFs

E610 Hyper-V VFs use PCI configuration space communication instead of
the native PF/VF mailbox.  The generic E610 match currently attaches
native mailbox operations to those devices, and the imported Hyper-V
subdevice identifier is incorrect.

Correct the subdevice identifier to 0x00ff, as used by DPDK shared
ixgbe code, and reject that subtype until ixv has a complete Hyper-V
operations table.

Sponsored by:   BBOX.io

(cherry picked from commit 08c41a679b281505eb7f1fd0cb528f3c1fe87fed)
DeltaFile
+12-1sys/dev/ixgbe/if_ixv.c
+1-1sys/dev/ixgbe/ixgbe_type.h
+13-22 files

HardenedBSD/src 926bb8bshare/man/man9 Makefile iflibdd.9, sys/net iflib.h iflib.c

iflib: Support recoverable initialization failure

The ifdi_init method cannot report an error, so iflib always marks an
interface running and enables its interrupts after the callback returns.
Drivers whose hardware initialization depends on an unavailable peer can
only return early and leave a falsely running interface.

Add iflib_init_failed() so a callback can leave the interface stopped.
Also add a conditional reset request for asynchronous recovery: it is
discarded if the interface is administratively down when the admin task
runs, preventing a queued retry from resurrecting a stopped interface.

Do not restore saved driver flags after an MTU or capability change when
initialization failed.  Restoring the pre-init flags would overwrite the
stopped result with stale RUNNING state.

Document that reset requests require the caller to schedule the admin
task, that output remains blocked during recovery, and that iflib rather
than the driver owns the driver flags.

    [2 lines not shown]
DeltaFile
+43-6sys/net/iflib.c
+35-0share/man/man9/iflibdi.9
+7-4share/man/man9/iflibdd.9
+5-0sys/net/iflib.h
+3-0share/man/man9/Makefile
+93-105 files

HardenedBSD/src 7a6b84flib/libc/stdlib bsearch.3, lib/libc/tests/stdlib bsearch_b_test.c bsearch_test.c

Merge remote-tracking branch 'rad/hardened/current/master' into hardened/current/pledge
DeltaFile
+134-0lib/libc/tests/stdlib/bsearch_s_test.c
+103-5lib/libc/stdlib/bsearch.3
+92-0lib/libc/tests/stdlib/bsearch_test.c
+58-0lib/libc/tests/stdlib/bsearch_b_test.c
+42-15sys/dev/dpaa/dpaa_eth.c
+37-18usr.sbin/bhyve/pci_hda.c
+466-3812 files not shown
+619-5618 files

HardenedBSD/src 9ee7b16usr.sbin/daemon daemon.8 daemon.c

Merge branch 'freebsd/15-stable/main' into hardened/15-stable/main
DeltaFile
+23-4usr.sbin/daemon/daemon.c
+16-3usr.sbin/daemon/daemon.8
+39-72 files

HardenedBSD/src 79f020fusr.sbin/daemon daemon.8 daemon.c

daemon(8): Add option to write pidfile w/o supervising it

Co-authored-by: Michael Osipov <michaelo at FreeBSD.org>
PR:             280487
Reviewed by:    kevans, michaelo
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D46313

(cherry picked from commit fe06e383cc64fce8b604d21f8526b91fa6aecc39)
DeltaFile
+23-4usr.sbin/daemon/daemon.c
+16-3usr.sbin/daemon/daemon.8
+39-72 files

HardenedBSD/src 84ed654usr.sbin/hbsd-update hbsd-update-build

HBSD: Refer to the right branch in hbsd-update-build(8)

I forgot to switch this over to 15-STABLE as part of the branch
creation.

This is a direct commit to hardened/15-stable/main.

Signed-off-by:  Shawn Webb <shawn.webb at hardenedbsd.org>
DeltaFile
+1-1usr.sbin/hbsd-update/hbsd-update-build
+1-11 files

HardenedBSD/src c7a5561usr.sbin/hbsd-update hbsd-update-build

HBSD: Bump copyright on hbsd-update-build(8)

The last commit to hbsd-update-build was in 2026 to account for the
migration from self-hosted GitLab Enterprise to Radicle.

Signed-off-by:  Shawn Webb <shawn.webb at hardenedbsd.org>
MFC-to:         15-STABLE
See-Also:       f6cd14174c3289988d2e931862c7861e420e578a
(cherry picked from commit f115cf376fbb7564d27435c9754d773614be2eb6)
Signed-off-by: Shawn Webb <shawn.webb at hardenedbsd.org>
DeltaFile
+1-1usr.sbin/hbsd-update/hbsd-update-build
+1-11 files

HardenedBSD/src f115cf3usr.sbin/hbsd-update hbsd-update-build

HBSD: Bump copyright on hbsd-update-build(8)

The last commit to hbsd-update-build was in 2026 to account for the
migration from self-hosted GitLab Enterprise to Radicle.

Signed-off-by:  Shawn Webb <shawn.webb at hardenedbsd.org>
MFC-to:         15-STABLE
See-Also:       f6cd14174c3289988d2e931862c7861e420e578a
DeltaFile
+1-1usr.sbin/hbsd-update/hbsd-update-build
+1-11 files

HardenedBSD/src 3a0459bsys/dev/sound/pci hdspe-pcm.c

HBSD: Resolve merge conflict

Signed-off-by:  Shawn Webb <shawn.webb at hardenedbsd.org>
DeltaFile
+0-9sys/dev/sound/pci/hdspe-pcm.c
+0-91 files

HardenedBSD/src e8eba0dlib/libc/stdlib bsearch.3, lib/libc/tests/stdlib bsearch_b_test.c bsearch_test.c

Merge remote-tracking branch 'rad/freebsd/current/main' into hardened/current/master

Conflicts:
        sys/dev/sound/pci/hdspe-pcm.c (unresolved)
DeltaFile
+134-0lib/libc/tests/stdlib/bsearch_s_test.c
+103-5lib/libc/stdlib/bsearch.3
+92-0lib/libc/tests/stdlib/bsearch_test.c
+58-0lib/libc/tests/stdlib/bsearch_b_test.c
+42-15sys/dev/dpaa/dpaa_eth.c
+37-18usr.sbin/bhyve/pci_hda.c
+466-3811 files not shown
+621-4917 files

HardenedBSD/src 4c56000sys/dev/axgbe if_axgbe_pci.c

HBSD: Resolve merge conflict

Signed-off-by:  Shawn Webb <shawn.webb at hardenedbsd.org>
DeltaFile
+0-8sys/dev/axgbe/if_axgbe_pci.c
+0-81 files

HardenedBSD/src 81ab582sys/dev/axgbe if_axgbe_pci.c, sys/dev/e1000 if_em.c

Merge remote-tracking branch 'rad/freebsd/15-stable/main' into hardened/15-stable/main

Conflicts:
        sys/dev/axgbe/if_axgbe_pci.c (unresolved)
DeltaFile
+198-30sys/dev/e1000/if_em.c
+114-57sys/dev/ixgbe/if_ixv.c
+87-56sys/dev/ixgbe/if_ix.c
+68-62sys/dev/ixgbe/if_sriov.c
+37-42sys/dev/axgbe/if_axgbe_pci.c
+42-26sys/dev/enic/if_enic.c
+546-27317 files not shown
+698-32423 files

HardenedBSD/src ee81cd1sys/dev/dpaa qman.c qman_portals.c

dpaa/qman: Fix various pool allocation bugs

* Set qman_channel_base after determining if QMan is v3, otherwise this
  global stays at 0x21, which messes up the shift in
  qman_portal_static_dequeue_channel().
* Fix the base shift in qman_portal_static_dequeue_channel(), there are
  only 15 channels available, not 16, so starting at a shift of 15
  yields shifting into the portal-specific channel.
* Correct vmem pool names for QMan resource pools.
DeltaFile
+3-4sys/dev/dpaa/qman_portals.c
+3-3sys/dev/dpaa/qman.c
+6-72 files

HardenedBSD/src 1d445aesys/dev/dpaa dpaa_eth.c

dpaa/eth: fast-path single-page TX frame build

The TX SG-build loop in dpaa_eth_if_start_locked() walked page
boundaries with PAGE_MASK arithmetic even for buffers that lived
entirely within one page -- the common case, since MCLBYTES
is smaller than PAGE_SIZE.  Add a fast path that emits a single SGT
entry for wholly-in-one-page segments and skips the inner while
entirely.

Fix the following bugs while we're here:

1. "if (m->m_len == 0) continue;" in the outer loop never
   advanced m -- any zero-length mbuf hung the TX path in an
   infinite loop.  Fix this by switching to a for loop, with the
   advancement in the post-clause.

2. In the inner (page-splitting) loop, the cap
   "if (m->m_len < ssize) ssize = m->m_len;" compared against
   the mbuf's original length, not the remaining bytes.  A single mbuf

    [11 lines not shown]
DeltaFile
+42-15sys/dev/dpaa/dpaa_eth.c
+42-151 files

HardenedBSD/src d59c7ealib/libc/stdlib bsearch.c bsearch.3, lib/libc/tests/stdlib test-search.h bsearch_b_test.c

libc: Implement bsearch_s(), document bsearch_b(), and add unit tests

- Implement bsearch_s() as per §K.3.6.3.2 in C23, first specified
  in C11.  It behaves identically to bsearch(), except the callback
  is called with a third argument, context, which is passed through
  from the caller, and it also performs runtime constraint checking
  on its arguments.
- Document bsearch_b(), bsearch_s(), and add history section
- Add rudimentary unit tests for bsearch(), bsearch_b(), and bsearch_s()

Reviewed by:    dteske, fuz
Approved by:    dteske (mentor), fuz (mentor)
MFC after:      1 month
Differential Revision:  https://reviews.freebsd.org/D58876
DeltaFile
+134-0lib/libc/tests/stdlib/bsearch_s_test.c
+103-5lib/libc/stdlib/bsearch.3
+92-0lib/libc/tests/stdlib/bsearch_test.c
+58-0lib/libc/tests/stdlib/bsearch_b_test.c
+51-0lib/libc/tests/stdlib/test-search.h
+38-0lib/libc/stdlib/bsearch.c
+476-55 files not shown
+503-611 files

HardenedBSD/src b5c1ab6sys/dev/sound/pci hdspe-pcm.c hdsp-pcm.c

snd_hdsp*: malloc(9) with M_WAITOK

Perform the allocations outside the lock section so that we can use
M_WAITOK. Holding the lock here is actually not really necessary and we
could just as well remove it, but keep it for consistency.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 month
Reviewed by:    kib
Differential Revision:  https://reviews.freebsd.org/D59079
DeltaFile
+15-2sys/dev/sound/pci/hdspe-pcm.c
+15-2sys/dev/sound/pci/hdsp-pcm.c
+30-42 files

HardenedBSD/src f4d953busr.sbin/bhyve pci_hda.c

bhyve: Do not panic on invalid input in HDA emulation

The emulated HDA controller passed values taken from guest registers and
from guest memory straight into assert(), so a guest could abort bhyve
with values the emulation did not expect. Reject them instead.

In case the guest asked to start something and it failed, clear the
corresponding run/enable bit.

PR:             256379, 256381, 256382, 256383, 256384, 256385, 256386, 256498
Sponsored by:   The FreeBSD Foundation
MFC after:      2 weeks
Reviewed by:    bnovkov, jhb
Differential Revision:  https://reviews.freebsd.org/D59082
DeltaFile
+37-18usr.sbin/bhyve/pci_hda.c
+37-181 files

HardenedBSD/src b81a79flibexec/nuageinit nuageinit

Merge remote-tracking branch 'rad/hardened/current/master' into hardened/current/pledge
DeltaFile
+2-0libexec/nuageinit/nuageinit
+2-01 files

HardenedBSD/src 958206elibexec/nuageinit nuageinit

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+2-0libexec/nuageinit/nuageinit
+2-01 files

HardenedBSD/src fd7171dlibexec/rc/rc.d bgfsck

rc.d/bgfsck: use the correct variable name

The name of the script and the name used internally for rc.conf differ,
as such the hardcoded disabling of service jails for the didn't work.
Fix by using the correct name.
Fixes:          f99f0ee14e3af rc.d: add a service jails config to all base system services

(cherry picked from commit 84d8d2878a6efbb2c97a591054f1fc42b7d406ab)
DeltaFile
+1-1libexec/rc/rc.d/bgfsck
+1-11 files

HardenedBSD/src 0bee17alibexec/rc rc.subr

etc/rc.subr: svcj - use the filename for services

We have ports and basesystem services, where the internal name and the
filename differ. While the documentation recommends to keep them in
sync, the reality is different. For service jails use the basename of
the service filename.
Fixes:          2efbd48 rc: add service jails framework
Suggested by:   joneum
MFC after:      1 week
MFC to:         stable/15

(cherry picked from commit d0f0a3b89b932b776b76278fa6885f19e8b30cbb)
DeltaFile
+6-6libexec/rc/rc.subr
+6-61 files

HardenedBSD/src a209aaclibexec/nuageinit nuageinit

nuageinit: root should be allowed to log in when disable_root is false

PermitRootLogin is "no" by default and that stopped root from logging in
even though disable_root was set to false during initialization.

Reviewed by:    bapt
Sponsored by:   Chelsio Communications
Differential Revision:  https://reviews.freebsd.org/D59101
DeltaFile
+2-0libexec/nuageinit/nuageinit
+2-01 files

HardenedBSD/src 5e8206ashare/examples/jails jib, sys/dev/intel spi_pci.c

Merge remote-tracking branch 'rad/hardened/current/master' into hardened/current/pledge
DeltaFile
+74-29sys/dev/sound/pci/hdsp-pcm.c
+63-7sys/powerpc/ofw/ofw_pcibus.c
+48-0sys/dev/intel/spi_pci.c
+20-27share/examples/jails/jib
+13-13sys/dev/sound/pci/hdsp.c
+25-0sys/dev/pci/pci.c
+243-7611 files not shown
+277-10317 files