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

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

Merge branch 'freebsd/current/main' into hardened/current/master
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

HardenedBSD/src 70c9d04usr.sbin/bsdinstall/scripts script

bsdinstall: Ensure logging retained when BSDINSTALL_LOG is not changed by preamble

Before the preamble script is sourced, initialize BSDINSTALL_LOG with the
file in $debugFile, if it is not already set.

Without this change, the bsdinstall script would assume the preamble set
BSDINSTALL_LOG to empty and the comparison with $debugFile will fail,
causing the log to be re-initialized to /dev/null.

Reviewed by:    dteske
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D25343
DeltaFile
+1-0usr.sbin/bsdinstall/scripts/script
+1-01 files

HardenedBSD/src 70ec66dsys/netgraph/bluetooth/l2cap ng_l2cap_llpi.c

bluetooth(4): Fix a typo in a kernel message in l2cap

- s/staring/starting/

(cherry picked from commit 8e968c5ff4112387c87f7afdf79d873a6f475b21)
DeltaFile
+1-1sys/netgraph/bluetooth/l2cap/ng_l2cap_llpi.c
+1-11 files

HardenedBSD/src 489f9edusr.sbin/bhyve bhyve_config.5

bhyve: document missing options in bhyve_config(5)

Document a few options that are currently supported but
not covered in bhyve_config(5):

 - vcpu.N.cpuset
 - domains.N.{size,cpus,domain_policy}
 - console (for arm64 and riscv)

MFC after:              1 week
Reviewed by:            bnovkov, jhb
Sponsored by:           The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D58399

(cherry picked from commit a257e2dc9c6ecd3db41e1aa27a5297a0f328694a)
DeltaFile
+43-2usr.sbin/bhyve/bhyve_config.5
+43-21 files

HardenedBSD/src 3481a9csys/dev/pci pci_iov.c pci_private.h

pci: Expose a VF's owning PF to bus subclasses

ofw_pcibus now uses pci_iov_get_pf() to inherit PF locality for
VFs, but the accessor was inadvertently left in an uncommited ACPI
change.  This breaks powerpc builds.

Expose the accessor from the PCI core and provide a stub when PCI_IOV
is omitted.  Record VF ownership before pci_add_child() so child added
callbacks can safely query it, and remove the later redundant
assignment.

Fixes:          f003e86335c9 ofw_pcibus: Inherit PF locality for SR-IOV VFs
MFC after:      2 weeks
Sponsored by:   BBOX.io
DeltaFile
+25-0sys/dev/pci/pci.c
+0-1sys/dev/pci/pci_iov.c
+1-0sys/dev/pci/pci_private.h
+26-13 files

HardenedBSD/src be503ddsys/dev/intel spi_pci.c

intelspi: add Lunar Lake SPI controller IDs

Add PCI device IDs for Lunar Lake-generation LPSS peripheral SPI
controllers.

Reviewed by:    adrian
Differential Revision:  https://reviews.freebsd.org/D59010
DeltaFile
+3-0sys/dev/intel/spi_pci.c
+3-01 files

HardenedBSD/src ca1a2bfsys/dev/intel spi_pci.c

intelspi: add Arrow Lake SPI controller IDs

Add PCI device IDs for Arrow Lake-generation LPSS peripheral SPI
controllers.

Reviewed by:    adrian
Differential Revision:  https://reviews.freebsd.org/D59009
DeltaFile
+3-0sys/dev/intel/spi_pci.c
+3-01 files

HardenedBSD/src 6d4b45asys/dev/intel spi_pci.c

intelspi: add Meteor Lake SPI controller IDs

Add PCI device IDs for Meteor Lake-generation LPSS peripheral SPI
controllers.

Reviewed by:    adrian
Differential Revision:  https://reviews.freebsd.org/D59008
DeltaFile
+7-0sys/dev/intel/spi_pci.c
+7-01 files

HardenedBSD/src a6d84d0sys/dev/intel spi_pci.c

intelspi: add Raptor Lake SPI controller IDs

Add PCI device IDs for Raptor Lake-generation LPSS peripheral SPI
controllers.

Reviewed by:    adrian
Differential Revision:  https://reviews.freebsd.org/D59007
DeltaFile
+4-0sys/dev/intel/spi_pci.c
+4-01 files

HardenedBSD/src 2dd4027sys/dev/intel spi_pci.c

intelspi: add Alder Lake SPI controller IDs

Add PCI device IDs for Alder Lake-generation LPSS peripheral SPI
controllers.

Reviewed by:    adrian
Differential Revision:  https://reviews.freebsd.org/D59006
DeltaFile
+10-0sys/dev/intel/spi_pci.c
+10-01 files

HardenedBSD/src bdda595sys/dev/intel spi_pci.c

intelspi: add Elkhart Lake SPI controller IDs

Add PCI device IDs for Elkhart Lake-generation LPSS peripheral SPI
controllers.

Reviewed by:    adrian
Differential Revision:  https://reviews.freebsd.org/D59005
DeltaFile
+3-0sys/dev/intel/spi_pci.c
+3-01 files

HardenedBSD/src 3ff56f8sys/dev/intel spi_pci.c

intelspi: add Tiger Lake SPI controller IDs

Add PCI device IDs for Tiger Lake-generation LPSS peripheral SPI
controllers.

Reviewed by:    adrian
Differential Revision:  https://reviews.freebsd.org/D59004
DeltaFile
+11-0sys/dev/intel/spi_pci.c
+11-01 files