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

HardenedBSD/src e7db9fasys/dev/intel spi_pci.c

intelspi: add Jasper Lake SPI controller IDs

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

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

HardenedBSD/src 88919d5sys/dev/intel spi_pci.c

intelspi: add Ice Lake SPI controller IDs

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

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

HardenedBSD/src 0b4ff3esys/dev/intel spi_pci.c

intelspi: add Lakefield SPI controller IDs

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

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

HardenedBSD/src 60848a0share/examples/jails jib jng

examples/jails: Allow any character in interface names

Interface names have no limitations on the allowed character set, only
a length restriction.

Widen the allowed character set for interface names to include any
printable character.

PR:     290916
Reviewed by:    dteske
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D53865
DeltaFile
+6-6share/examples/jails/jng
+4-4share/examples/jails/jib
+10-102 files

HardenedBSD/src fc7eb8cshare/examples/jails jib

examples/jails: New version of jib (9.0)

Add $Version, -h/-v, and SPDX-License-Identifier: BSD-2-Clause.
Drop the long-form license and bump the copyright to 2026.

MFC after:      1 week
DeltaFile
+18-25share/examples/jails/jib
+18-251 files

HardenedBSD/src 2a7af8esys/dev/e1000 em_txrx.c

e1000: Limit the TSO sentinel to lem(4) controllers

The TSO workaround splits the final DMA segment to create a four byte
sentinel descriptor.  Intel documents the premature descriptor writeback
erratum and this workaround in the 82540EP and 82545GM specification
updates (erratum 3) and the 82546GB specification update (erratum 1).

Limit the workaround and its preceding TSO state to the legacy PCI and
PCI-X controllers so PCIe controllers retain their natural descriptor
layout using one fewer descriptor per TSO packet, no split of the final
segment, and one less four byte DMA.

MFC after:      2 weeks
Sponsored by:   BBOX.io
DeltaFile
+6-2sys/dev/e1000/em_txrx.c
+6-21 files

HardenedBSD/src 9a8287csys/kern vfs_mount.c

dounmount(): generalize comment on covered vnode lock recursion

The need for recursion applies (in somewhat different form) to both
nullfs and unionfs, and would likely apply to any other hypothetical
stacked filesystem as well.

Reviewed by:            kib, markj
Differential Revision:  https://reviews.freebsd.org/D58858
DeltaFile
+6-5sys/kern/vfs_mount.c
+6-51 files

HardenedBSD/src b952606sys/fs/unionfs union_vnops.c

unionfs_lock(): eliminate LK_CANRECURSE special-case

As of commit 9f5c4ef328 ("dounmount(9): temporarily enable recursion
for the covered vnode lock"), the unmount path handles recursion
automatically, so there's no longer a need to handle this case
in unionfs-specific code.

Reviewed by:    kib, markj
Tested by:      pho
Differential Revision:  https://reviews.freebsd.org/D58858
DeltaFile
+0-11sys/fs/unionfs/union_vnops.c
+0-111 files

HardenedBSD/src 6b45230sys/fs/unionfs union_subr.c

unionfs_noderem(): fix typo

Reviewed by:            kib, markj
Differential Revision:  https://reviews.freebsd.org/D58858
DeltaFile
+1-1sys/fs/unionfs/union_subr.c
+1-11 files

HardenedBSD/src d7033e3tools/test/stress2/misc unionfs7.sh

unionfs7.sh: eliminate stderr redirection

The bash-ism here results in an "ambiguous output redirect"
error when run under tcsh.  Similar unionfs stress2 tests don't
do this, and unionfs7 doesn't seem to generate spurious output
when run locally, so just delete it.

Reviewed by:            pho
Differential Revision:  https://reviews.freebsd.org/D58856
DeltaFile
+1-1tools/test/stress2/misc/unionfs7.sh
+1-11 files

HardenedBSD/src 74db53dsys/dev/sound/pci hdsp.h hdsp.c

snd_hdsp: Avoid allocation in the interrupt handler

Cache PCM children instead of calling device_get_children() from the
interrupt handler.  Drain callbacks before child detach so cached
pointers cannot outlive the PCM softc.  Allocate the parent softc by
its actual size.

This mirrors snd_hdspe's interrupt dispatch and detach lifecycle.

Reported by:    christos
MFC after:      1 week
DeltaFile
+74-29sys/dev/sound/pci/hdsp-pcm.c
+13-13sys/dev/sound/pci/hdsp.c
+9-0sys/dev/sound/pci/hdsp.h
+96-423 files

HardenedBSD/src df6bbc9sys/powerpc/ofw ofw_pcibus.c, sys/powerpc/pseries plpar_pcibus.c

ofw_pcibus: Honor device proximity for DMA tags

BUS_GET_DOMAIN can report a PCI function's firmware locality, including
an SR-IOV VF's inherited PF locality, but ordinary OFW PCI functions
still use the shared bus DMA tag.  Consequently, busdma metadata and
coherent memory can be allocated from the bus's domain instead of the
function's domain.

Create and cache a child tag for each function that requests a DMA tag
and apply its reported domain without modifying the shared parent tag.
Apply the same domain to the private IOMMU tag already created by the
pSeries PCI bus.  Destroy cached tags when PCI children are removed so
VF create and destroy cycles do not leak them.

Reviewed by:    PowerPC (jhibbits)
MFC after:      2 weeks
Sponsored by:   BBOX.io
Differential Revision:  https://reviews.freebsd.org/D59065
DeltaFile
+31-0sys/powerpc/ofw/ofw_pcibus.c
+3-0sys/powerpc/pseries/plpar_pcibus.c
+34-02 files

HardenedBSD/src f003e86sys/powerpc/ofw ofw_pcibus.c

ofw_pcibus: Inherit PF locality for SR-IOV VFs

PCI VFs are allocated dynamically and have no corresponding OFW node.
The zero-filled OFW PCI devinfo currently leaves obd_node as 0, which
is not the invalid-node sentinel and can send NUMA lookup through an
unrelated firmware node.

Initialize dynamically allocated devinfo with an invalid OFW node. For
VF locality queries, use the owning PF's node when it exists. Fall back
to the PCI bus when neither the VF nor PF has a firmware node.

This preserves existing CPU-locality behavior for ordinary PCI devices
while making VF domain and interrupt placement follow their PF.

Reviewed by:    PowerPC (jhibbits)
MFC after:      2 weeks
Sponsored by:   BBOX.io
Differential Revision:  https://reviews.freebsd.org/D59064
DeltaFile
+32-7sys/powerpc/ofw/ofw_pcibus.c
+32-71 files

HardenedBSD/src 32a1a45sys/dev/e1000 e1000_hw.h e1000_api.c

e1000: Add Nova Lake I219 support

Add support for future client platform

(cherry picked from commit 698c3b0ce1e788415173639366ae89ae7b7903ca)
DeltaFile
+9-0sys/dev/e1000/if_em.c
+7-0sys/dev/e1000/e1000_ich8lan.c
+5-1sys/dev/e1000/e1000_api.c
+3-0sys/dev/e1000/e1000_hw.h
+24-14 files

HardenedBSD/src c36c27asys/dev/ixgbe if_ixv.c

ixv: Negotiate VF queue-set limits

ixv uses one queue set on 82599 and X540 VFs and assumes two on
X550-family VFs.  The PF reports the queues assigned to each VF with
GET_QUEUES after mailbox API 1.1 negotiation.

Query the PF during attach.  Bound symmetric iflib queue sets by the PF
grant and available MSI-X data vectors.  Retain one queue set per data
vector: ixgbe VFs expose at most three vectors and one is reserved for
the mailbox.  The hardware permits each pool to use a subset of its RSS
queues, so a two-queue ceiling is valid when the PF assigns four.

This enables the second data vector on 82599 and X540 while avoiding an
assumed second queue when an X550-family VF is granted only one.  Keep
the existing family limits if the mailbox is unavailable or the PF uses
an older API.

(cherry picked from commit 98fad621ed697586782e488afdc05252c060fec3)
DeltaFile
+61-9sys/dev/ixgbe/if_ixv.c
+61-91 files

HardenedBSD/src 889b421sys/dev/ixgbe if_ixv.c ixgbe.h

ix/ixv: Match Tx writeback thresholds to iflib

PTHRESH controls when the device prefetches transmit descriptors,
HTHRESH controls how many host descriptors must be ready, and WTHRESH
controls completion writeback batching.

iflib places RS on selected descriptors and reclaims through those
checkpoints.  The data sheets require WTHRESH to be zero when software
uses RS.  Clear WTHRESH while retaining the established PTHRESH 32 and
HTHRESH 1 fetch policy.

This also follows DPDK in pairing sparse RS descriptors with
WTHRESH zero.  DPDK defaults to 32/0/0, while Linux ixgbevf uses
32/1/8.  The 32/1/0 setting preserves FreeBSD's prefetch policy and the
data-sheet requirement that HTHRESH be nonzero when PTHRESH is used.

(cherry picked from commit 0baf0fabdb5e60e917458f85706707ee92683080)
DeltaFile
+4-6sys/dev/ixgbe/if_ix.c
+8-0sys/dev/ixgbe/ixgbe.h
+2-2sys/dev/ixgbe/if_ixv.c
+14-83 files

HardenedBSD/src 2b69695sys/dev/igc igc_defines.h if_igc.c

igc: Correct descriptor control programming

The transmit-ring setup was copied from the e1000 path.  On I225
and I226, bits 22 through 24 are reserved and bit 25 enables the
queue; it is not a legacy low-water threshold.  Correct the field
masks, remove the nonapplicable legacy definitions, and program only
defined fields.

Use PTHRESH=8 and HTHRESH=1.  Keep WTHRESH at zero so the hardware
honors sparse RS descriptors issued by iflib.  Linux and DPDK use a
writeback threshold of 16, but request status on every packet.  A
nonzero threshold makes hardware ignore individual RS bits and is
unsuitable for the iflib completion model.

The receive-ring setup likewise used a magic mask that left bit 20
of the five-bit WTHRESH field untouched.  Define the receive threshold
fields and replace them exactly before installing the established
PTHRESH=8, HTHRESH=8, WTHRESH=4 policy.

(cherry picked from commit e2aff50727cbe4cb5e99f825c2c6bd8a4915de67)
DeltaFile
+7-12sys/dev/igc/if_igc.c
+8-8sys/dev/igc/igc_defines.h
+15-202 files