recv(2): update description of MSG_WAITALL
Remove a note about "data of a different type". This was a bug that was
fixed in FreeBSD 15. Instead put an exact quote from SUS that lists
allowed cases of a short read with MSG_WAITALL. See discussion in D57511.
ixl: Report SR-IOV VF status
Expose cached per-VF configuration through the iflib VF status method.
Report mailbox initialization and the negotiated virtual-channel API, MAC
address, access or trunk VLAN mode, queue resources, administrator policy,
PF traffic permission, and fault containment.
Expose per-VF malicious-driver isolation and cumulative transmit and
receive event counts through a versioned driver.ixl extension.
Track successful PCI IOV attachment separately from hardware capability.
This lets a successfully attached but unconfigured PF return an empty
snapshot without claiming support when PCI IOV registration was
unavailable.
The query uses driver-cached state and does not issue AdminQ requests or
read device registers.
Sponsored by: BBOX.io
whereis(1): Respect PORTSDIR variable
Respect PORTSDIR variable for those who have the ports collection in a different
place than /usr/ports. PORTSDIR is a very common variable used in the ports
framework and in /etc/make.conf among other places.
While here, remove and old reference to CVS.
Reviewed by: delphij@, ngie@
Approved by: ngie@
Differential Revision: https://reviews.freebsd.org/D42156
ixgbe: Report SR-IOV VF status
Expose cached VF configuration, policy, and runtime state through the
iflib VF status method. Include access or trunk VLAN mode, transmit and
receive queue counts selected by the current virtualization mode,
negotiated mailbox API, PF traffic permission, fault containment, and
quarantine state.
Initialize every cached API version before VF enumeration so an
unconfigured slot cannot be mistaken for API 1.0.
The query does not issue mailbox requests or read hardware registers.
Sponsored by: BBOX.io
tcp: remove redundant assignments
Since the struct inpcb in embedded in the struct tcpcb, the
relationship can't change. So there is no need to reassign the tp
anymore.
No functional change intended.
Reported by: Hannes Elfert
Reviewed by: glebius
MFC after: 1 week
MFC to: stable/15
Differential Revision: https://reviews.freebsd.org/D59384
igb: Report SR-IOV VF status
Expose cached per-VF configuration through the iflib VF status method.
Report mailbox handshake state, MAC address, access or trunk VLAN mode,
hardware transmit and receive queue counts, administrator policy, and
fault-containment state.
The query does not issue mailbox requests or read hardware registers.
Sponsored by: BBOX.io
ifconfig: Add SR-IOV VF status output
Add NIC-specific VF status to the existing ifconfig -v output. Fetch
the data through libifconfig using a separate native route Netlink
query.
Group optional identity, initialization, resources, VLAN policy,
administrator policy, protocol, traffic-permission, and
fault containment fields. Omitted fields remain distinct from false or
zero.
Refer users to iovctl -L for device-neutral PCI attachment and
passthrough state.
This is a Netlink-native evolution of the original interface by Eric
Joyner.
Relnotes: yes
Sponsored by: Intel Corporation (initial version)
[4 lines not shown]
libifconfig: Add a native SR-IOV VF status query
Request RTEXT_FILTER_VF through route Netlink and parse the common VF
status schema into typed public structures. Preserve per-field
presence using IFLAF_VF_* attribute numbers as mask bit indices so
callers can distinguish omitted values from false or zero.
Validate required VF indices, repeated driver namespaces, and their
versioned typed fields while allowing unknown optional attributes.
Return VF records through a pointer vector so append-only growth of the
public VF structure does not change the array stride seen by existing
consumers.
Sponsored by: BBOX.io
Differential Revision: https://reviews.freebsd.org/D58777
rtnetlink: Add native SR-IOV VF status
Add a transport neutral kernel snapshot for NIC-specific SR-IOV VF
status and an optional iflib provider method. Providers gather state
under driver defined synchronization.
Honor RTEXT_FILTER_VF on RTM_GETLINK requests and encode the status as
native typed route Netlink attributes. Represent VFs, driver
namespaces, and namespace fields as directly repeated nested attributes.
Presence masks in consumers can distinguish omission from false or zero.
Drivers may add custom status under stable, versioned namespaces. The
named, typed representation lets generic transports and consumers carry
or display fields without knowing their driver-specific schemas, while
the driver retains ownership of their names and meanings.
Document the ABI and add parser and RTM_GETLINK coverage.
Reviewed by: melifaro, iflib (gallatin), kgalazka (previous version)
[2 lines not shown]
dpaa2: Make software portal holdoff time a sysctl tunable
When debugging the D59463 review, it is very handy to be able
to change the software portal holdoff time without recompiling
the kernel. This commit makes the holdoff time a sysctl tunable,
so it can be changed at runtime.
Tested by: dsl
Obtained from: flo_purplekraken.com
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D59461
Event: Berlin Hackathon 202609
rc.subr tests: service jail behaviour of run_rc_command
Twenty cases over where each rc option and each method executes for a
jailed service, the jail's lifetime, and the svcj option handling. Each
case drives the service inside a chroot built in its ATF work directory.
MFC after: 1 week
MFC to: stable/15
Assisted-by: Claude Code (Opus 5)
(cherry picked from commit b5dcd8f9d6ae702adbc1627839b5235a28839370)
rc.subr: svcj - add a setaudit option
setaudit(8) is prefixed to the command inside the jail when
${name}_audit_user is set, and needs allow.setaudit.
This is not added automatically when ${name}_audit_user is set, this
needs an administrative setting of the options on purpose.
MFC after: 1 week
MFC to: stable/15
(cherry picked from commit 9125bc0727dbbf82b1c6a5f7c380f7b8c27b74dd)
rc.conf.5: note that a negative nice value does not reach a service jail
Raising a process' priority is not permitted inside a jail, and nice(1)
warns and executes the command anyway, so the service comes up at its login
class priority.
Not changing the date, as a commit a moment before this, one changed it
already.
MFC after: 1 week
MFC to: stable/15
(cherry picked from commit be834d62e990b58eb2e67ce9b48b635b645dcea1)
rc.subr: svcj - run a service's own restart and status methods in its jail
A script that defines non-default restart_cmd or status_cmd should
execute them in the service jail. Where there is no jail to enter,
restart starts the service instead of failing.
Fixes: 2efbd480f1d3 rc: add service jails framework
MFC after: 1 week
MFC to: stable/15
Assisted-by: Claude Code (Opus 5)
(cherry picked from commit 327dae5081059eb97af0cf319a444b3937ff4db2)
rc.subr: svcj - remove the service jail when the service is not running
A service whose tracked process had died while another process of its own
kept the jail alive, therefore left svcj-${name} behind, and the next start
would fail.
Fixes: 2efbd480f1d3 rc: add service jails framework
MFC after: 1 week
MFC to: stable/15
Assisted-by: Claude Code (Opus 5)
(cherry picked from commit a70ca1ebd8add7ea99b5674de715ae5fbf389dce)
rc.subr: svcj - let svcj_all_enable enable service jails
Fix the logic for svcj_all_enable.
Fixes: 2efbd480f1d3 rc: add service jails framework
MFC after: 1 week
MFC to: stable/15
(cherry picked from commit 21e53eeaffcac0be3427b7edb3b8739344a65174)
rc.subr: svcj - send the stop signal from inside the service jail
A service running under ${name}_user was signalled from the host as that
user, which the parent of a jail may no longer do: since 8a5ceebece03 an
unprivileged process would need allow.unprivileged_parent_tampering.
Stop and reload therefore failed and left both the service and its jail
running.
MFC after: 1 week
MFC to: stable/15
(cherry picked from commit 6155e17019f6ae08c74913b7ffb9312434f33a9f)
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)
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)
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)
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)
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]
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]
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
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
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
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