FreeBSD/src 9f9f0d3lib/libc/net protocols

protocols: Update with IANA list

- Update /etc/protocols with IANA list updated 2026-03-09.
- Document that 240 (pfsync) is not assigned by IANA.
- Document deprecated protocols.

PR:             295739
Reviewed by:    des
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D57445

(cherry picked from commit e3fa020202d8e040242016bda275dde83c058549)
DeltaFile
+11-6lib/libc/net/protocols
+11-61 files

FreeBSD/src d661121lib/libc/net protocols

protocols: Update with IANA list

- Update /etc/protocols with IANA list updated 2026-03-09.
- Document that 240 (pfsync) is not assigned by IANA.
- Document deprecated protocols.

PR:             295739
Reviewed by:    des
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D57445

(cherry picked from commit e3fa020202d8e040242016bda275dde83c058549)
DeltaFile
+11-6lib/libc/net/protocols
+11-61 files

FreeBSD/src 9d43654sys/sys vnode.h rangelock.h

struct vnode: assign v_rl.resv1 as v_type and v_rl.resv2 as v_state

(cherry picked from commit da6aa0648c0265d6f7bcba44a26f13ed0453dd7a)
DeltaFile
+8-2sys/sys/vnode.h
+4-0sys/sys/rangelock.h
+12-22 files

FreeBSD/src b8044a0sys/kern vfs_subr.c, sys/sys vnode.h mount.h

vnode: move VIRF_KNOTE to v_v2flag

(cherry picked from commit 64467d2ec3ede11430554fea68b317d27bf4b5c3)
DeltaFile
+4-3sys/sys/vnode.h
+2-3sys/kern/vfs_subr.c
+2-2sys/sys/mount.h
+8-83 files

FreeBSD/src ce6cc3bsys/sys mount.h

sys/mount.h: restore KNF_NOKQLOCK in VFS_KNOTE_{,UN}LOCKED() call to KNOTE()

(cherry picked from commit 43a8585cb2bb0e284df672174a57780e53107d27)
DeltaFile
+4-4sys/sys/mount.h
+4-41 files

FreeBSD/src eb810besys/sys rangelock.h

sys/rangelock.h: explicitly enumerate padding at the end of the structure

(cherry picked from commit 3d505310b1bb259c3e5f39d8c88a465cf1403934)
DeltaFile
+6-0sys/sys/rangelock.h
+6-01 files

FreeBSD/src d56df1fsys/sys vnode.h

sys/vnode.h: remove stale comment

(cherry picked from commit 5e4947f7e08a90ba50f9e8cea9ae5e128717cb5f)
DeltaFile
+0-1sys/sys/vnode.h
+0-11 files

FreeBSD/src c20d129sys/amd64/amd64 genassym.c, sys/i386/i386 genassym.c

x86: remove sys/mount.h from genassym.c

(cherry picked from commit 72ab129799a231e322b119de3f9c1263e76527b8)
DeltaFile
+0-3sys/amd64/amd64/genassym.c
+0-3sys/i386/i386/genassym.c
+0-62 files

FreeBSD/src 18c08fdsys/kern vfs_subr.c

vop_read_pgcache_post(): the vnode is unlocked

(cherry picked from commit 0c85df0065146516d5bacfc80d52d9ee6b33b96d)
DeltaFile
+1-1sys/kern/vfs_subr.c
+1-11 files

FreeBSD/src 5c4e88csys/sys mount.h

vfs: convert VFS_OPs from macros to static inlines

(cherry picked from commit a57420b214b04de3d066236b555925ffbcb93daa)
DeltaFile
+109-97sys/sys/mount.h
+109-971 files

FreeBSD/src e076ee2sys/kern vfs_subr.c

vop_read_pgcache_post(): report inotify IN_ACCESS same as for vop_read_post()

(cherry picked from commit e9a5eb0e5e44e79d0f8dc71274b0183926abd562)
DeltaFile
+4-2sys/kern/vfs_subr.c
+4-21 files

FreeBSD/src fb73898sys/kern vfs_subr.c, sys/sys vnode.h mount.h

vnode: add VIRF_KNOTE flag

(cherry picked from commit 1d5e4020e36e1cc9e906200c9c3c784ef43d977e)
DeltaFile
+12-17sys/sys/vnode.h
+10-4sys/kern/vfs_subr.c
+10-2sys/sys/mount.h
+32-233 files

FreeBSD/src ef9f11asys/kern vfs_subr.c

vfs: work around the race between vget() and vnlru

PR:     281749

(cherry picked from commit 36b155a2b3baa747c1968a9094df9fa7fb0d02b3)
DeltaFile
+6-1sys/kern/vfs_subr.c
+6-11 files

FreeBSD/src 049c784sys/kern vfs_mount.c vfs_subr.c, sys/sys mount.h

vfs: convert vfs_op_thread_* macros to static inlines

(cherry picked from commit 32cf4514cad66ff69ffc96ede20d8debc9b96790)
DeltaFile
+55-36sys/sys/mount.h
+3-3sys/kern/vfs_mount.c
+3-3sys/kern/vfs_subr.c
+2-2sys/kern/vfs_cache.c
+2-2sys/kern/vfs_vnops.c
+65-465 files

FreeBSD/src a4ed783sys/dev/hid hid.c, sys/dev/ichiic ig4_iic.c

ig4: unconditionally un-idle the controller core on resume

On controllers with the LPSS "additional registers" (Skylake and later,
IG4_HAS_ADDREGS), ig4iic_suspend() places the controller in the device
idle state (IG4_DEVICE_IDLE) and asserts core reset.  While idle the
DesignWare core is power-gated: its register bank reads back as zero and
writes are dropped until the core is taken out of the idle state again.

ig4iic_set_config(), called from ig4iic_resume(), only performs that
un-idle handshake when it observes IG4_RESTORE_REQUIRED set in
DEVIDLE_CTRL.  Some platforms (e.g. Intel Alder Lake-P) do not raise
that status across suspend-to-idle (S0ix).  The core is then left gated:
set_config()'s register writes have no effect, it nevertheless returns
success, and every subsequent transfer fails with IIC_ETIMEOUT, leaving
child I2C-HID devices (touchpad, touchscreen) dead after resume.

Give ig4iic_set_config() a force_restore argument and pass it from
ig4iic_resume() so the un-idle handshake runs unconditionally for
IG4_HAS_ADDREGS controllers, regardless of the RESTORE_REQUIRED status.

    [22 lines not shown]
DeltaFile
+46-6sys/dev/ichiic/ig4_iic.c
+1-1sys/dev/hid/hid.c
+47-72 files

FreeBSD/src fa515f6sys/fs/nfsserver nfs_nfsdport.c

nfs_nfsdport.c: One more unnecessary initialization for gcc

Fixes:  d8e8f9251975 ("pNFSd: Add a directory of newly created files for the pNFSd")
DeltaFile
+1-1sys/fs/nfsserver/nfs_nfsdport.c
+1-11 files

FreeBSD/src 52ad4f8lib/msun/tests nan_test.c

lib/msun/tests: re-enable nan_test on riscv

Commit 1e25cda7f06923d05e28dac8eb1c1c428a5c92dc fixed it.

MFC after:      3 days
Sponsored by:   The FreeBSD Foundation
DeltaFile
+0-3lib/msun/tests/nan_test.c
+0-31 files

FreeBSD/src 61152dfsys/fs/nfsserver nfs_nfsdport.c

nfs_nfsdport.c: Do unnecessary initializations to quiet gcc

Fixes:  d8e8f9251975 ("pNFSd: Add a directory of newly created files for the pNFSd")
DeltaFile
+7-6sys/fs/nfsserver/nfs_nfsdport.c
+7-61 files

FreeBSD/src eafa181sys/cam/scsi scsi_da.c

da: Put the SYNC CACHE probing behind bootverbose

These have turned out to be too noisy, so put them behind bootverbose

Event: BSDCan 2026 (noticed during UFS demo)
Sponsored by: Netflix
MFC After: 2 weeks
DeltaFile
+22-15sys/cam/scsi/scsi_da.c
+22-151 files

FreeBSD/src 6a7c8c9share/man/man5 periodic.conf.5, usr.sbin/periodic/etc/security 800.loginfail

periodic/security: Introduce $security_status_loginfail_ignore for 800.loginfail

Introduce a new variable "security_status_loginfail_ignore" to filter unwanted
login failure messages from the daily security checks.

Co-authored-by: Michael Osipov <michaelo at FreeBSD.org>
Co-authored-by: Joseph Mingrone <jrm at FreeBSD.org>
PR:             295191
Reviewed by:    jrm
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D57671
DeltaFile
+5-1share/man/man5/periodic.conf.5
+1-0usr.sbin/periodic/etc/security/800.loginfail
+6-12 files

FreeBSD/src a10151fsys/dev/aq aq_fw2x.c

aq(4): take F/W statistics off the iflib core lock (kick-and-read)

The once-per-second statistics refresh ran the whole F/W-mailbox
transaction under iflib's CTX (sx) lock: fw2x_get_stats toggled the MPI
STATISTICS control bit and busy-polled the state register for the
acknowledgement (up to ~25 ms) before downloading the counters, so a slow
F/W response blocked datapath reconfigure / ioctls for the duration.

The per-cast and error counters have no direct-register source -- the
reference Linux atlantic driver and our port both read them out of the
F/W mailbox, and the MSM registers the chip exposes are never used for the
periodic counters.  So rather than poll, adopt the kick-and-read shape the
iflib peer with the same constraint uses (vmxnet3): consume the snapshot
the F/W produced for the *previous* request, then toggle the bit to
request the next one -- no wait.  The F/W finished that previous refresh
~1 s ago, so the download needs no poll, and the toggle write stays
serialized against set_mode by the CTX lock exactly as before.  This
removes the 25 ms poll (and the toggle_mpi_ctrl_and_wait_ helper) from
under the lock; only the fast 16-dword download remains.

    [10 lines not shown]
DeltaFile
+7-54sys/dev/aq/aq_fw2x.c
+7-541 files

FreeBSD/src e44579esys/dev/aq aq_fw2x.c aq_fw.c

aq(4): naming and exposure

Reviewed by:    adrian
Differential Revision:  https://reviews.freebsd.org/D57656
DeltaFile
+26-26sys/dev/aq/aq_fw2x.c
+18-22sys/dev/aq/aq_fw.c
+16-16sys/dev/aq/aq_fw1x.c
+2-0sys/dev/aq/aq_fw.h
+1-1sys/dev/aq/aq_main.c
+63-655 files

FreeBSD/src 5409e03sys/dev/aq aq_hw.c aq_main.c

aq(4): modernize and de-Linuxify the vendor driver

Dead-code removal, device_printf(9) logging, style(9) de-Linuxification,
const F/W-ops tables, and readability cleanups.  No change for valid
traffic.

Dead code and logging:
- Remove the sub-gigabit TSO-masking block in the link-state ISR: it
  cleared IFCAP_TSO from the static isc_capabilities record (read only at
  attach / SIOCSIFCAP, never on the datapath), so it never gated TSO and
  only corrupted the validation mask.  The Atlantic has no sub-gigabit TSO
  erratum.
- Tidy the RX buffer-size handling: drop the dead switch(MCLBYTES) in
  aq_if_rx_queues_alloc, rename rx_max_frame_size -> rx_buf_size, and bound
  the per-fragment length from the wb.pkt_len writeback (EBADMSG on
  underflow or a final fragment longer than the RX buffer).
- Drop every __FreeBSD__/__FreeBSD_version branch (FreeBSD 14.0 baseline);
  the pre-13 arms used pre-opaque-if_t APIs since removed and one never
  built.

    [31 lines not shown]
DeltaFile
+70-87sys/dev/aq/aq_hw.c
+19-85sys/dev/aq/aq_main.c
+39-49sys/dev/aq/aq_ring.c
+43-43sys/dev/aq/aq_hw_llh.c
+40-40sys/dev/aq/aq_fw2x.c
+28-28sys/dev/aq/aq_fw1x.c
+239-33210 files not shown
+328-45116 files

FreeBSD/src 76d0a25sys/dev/aq aq_dbg.h aq_main.c

aq(4): add a runtime dev.aq.N.debug trace control

The trace_* family (trace/trace_error/trace_warn/trace_detail, used in the
F/W and init/config paths) was gated behind the compile-time
AQ_CFG_DEBUG_LVL, which is 0, so the dbg_level_/dbg_categories_ runtime
variables were dead and tracing could only be enabled by recompiling.

Decouple trace_base_ from AQ_CFG_DEBUG_LVL so it is always compiled and
gated purely at runtime on dbg_level_/dbg_categories_, make those two
variables writable (no longer const, default level 0 = off), and expose
them as dev.aq.N.debug (verbosity) and dev.aq.N.debug_categories
(subsystem mask) sysctls.

The datapath-heavy AQ_DBG_ENTER/PRINT/DUMP macros and the trace_aq_*_descr
descriptor dumps stay behind AQ_CFG_DEBUG_LVL (still 0), so the per-packet
paths are untouched -- trace_* is only used off the datapath.  The two
variables are global (the trace macros reference them directly), so the
per-device sysctls share one backing store, which is fine for a debug
knob.

    [8 lines not shown]
DeltaFile
+3-7sys/dev/aq/aq_dbg.h
+8-0sys/dev/aq/aq_main.c
+2-2sys/dev/aq/aq_dbg.c
+13-93 files

FreeBSD/src b644083sys/dev/aq aq_main.c aq_ring.c

aq(4): enable jumbo frames, software LRO, and suspend/resume

- Configure the RX buffer size from the interface MTU and enable jumbo
  frames up to 9000 bytes, replacing the fixed standard-frame setup.

- Advertise IFCAP_LRO so iflib coalesces received TCP segments with its
  software tcp_lro(9), like every other in-tree iflib driver
  (ix/igc/em/vmxnet3); aq does no hardware LRO.  iflib builds the
  per-RX-queue LRO context unconditionally, so the capability bit is all
  that is required; enabled by default via isc_capenable, toggle at
  runtime with ifconfig.

- Add suspend/shutdown/resume handlers, replacing the unimplemented-
  function placeholders.  aq_if_shutdown/aq_if_suspend stop the interface
  and deinitialize the hardware; aq_if_resume re-resets the F/W, re-reads
  the mailbox address and re-selects fw_ops via aq_hw_mpi_create() before
  iflib re-inits, because the runtime init path (aq_hw_init) reuses the
  cached mailbox/fw_ops and a D3 power cycle can clear them.  iflib calls
  IFDI_RESUME unconditionally, so this also covers resuming while the

    [4 lines not shown]
DeltaFile
+30-19sys/dev/aq/aq_main.c
+1-1sys/dev/aq/aq_ring.c
+31-202 files

FreeBSD/src b065af1sys/dev/aq aq_main.c aq_hw.c

aq(4): interrupt model and queue-count correctness

Rework the MSI-X and queue-count handling to use the standard iflib
interrupt model and to keep every ring serviced.

- Cap isc_n{tx,rx}qsets_max at the RSS indirection-table size
  (HW_ATL_RSS_INDIRECTION_QUEUES_MAX, 8) instead of HW_ATL_B0_RINGS_MAX.
  RSS only steers RX traffic to eight rings, so on hosts with more CPUs
  the surplus TX rings never make progress: iflib flowid-steers TCP
  flows across every TX ring, and a flow landing on a surplus ring has
  its segments queued but never transmitted, hanging the connection.

- Add a TX-specific ifdi_tx_queue_intr_enable that reads
  tx_rings[txqid]->msix.  It was wired to the RX handler, which indexes
  rx_rings[] with the qid; safe only while tx_rings_count ==
  rx_rings_count, otherwise the lookup walks past rx_rings[] and feeds a
  garbage msix value into the IRQ mask register.

- Fix three MSI-X / admin-IRQ bugs: the TX softirq was attached to

    [14 lines not shown]
DeltaFile
+27-9sys/dev/aq/aq_main.c
+19-14sys/dev/aq/aq_hw.c
+7-0sys/dev/aq/aq_hw.h
+1-1sys/dev/aq/aq_irq.c
+54-244 files

FreeBSD/src 40accc7sys/dev/aq aq_hw.c aq_fw2x.c

aq(4): adopt native FreeBSD errno convention

Convert the driver's internal error-handling chain from the Linux
negative-errno convention to FreeBSD positive errno everywhere.

- All `return (-EXXX)` become `return (EXXX)`, `int err = -EXXX` loses
  the sign, and `if (err < 0)` checks become `if (err != 0)` across
  aq_fw.c, aq_fw1x.c, aq_fw2x.c and aq_hw.c.
- mac_soft_reset_flb_ returns ETIMEDOUT/0 instead of a bool so it
  matches its RBL sibling.
- The ETIME and EOK aliases in aq_common.h are removed; all sites use
  ETIMEDOUT and 0 directly, and the `rc = -rc` sign flips in
  aq_if_attach_pre are dropped.

Turn AQ_HW_WAIT_FOR into a statement expression evaluating to 0 on
success or ETIMEDOUT on timeout, assigned explicitly at all seven call
sites, instead of silently assigning ETIMEDOUT to a variable named err
in the caller scope.  A statement expression rather than an inline
function because every call must re-evaluate its condition each

    [24 lines not shown]
DeltaFile
+28-36sys/dev/aq/aq_hw.c
+17-17sys/dev/aq/aq_fw2x.c
+16-16sys/dev/aq/aq_fw.c
+12-12sys/dev/aq/aq_fw1x.c
+13-8sys/dev/aq/aq_main.c
+5-12sys/dev/aq/aq_common.h
+91-1016 files

FreeBSD/src 57f5252sys/dev/aq aq_hw.c aq_main.c

aq(4): Fix RSS indirection table OOB write and queue distribution

Two related fixes to `aq(4)`'s RSS indirection table handling:

1. Fix an out-of-bounds stack write in `aq_hw_rss_set()`.  RSS table entries are 3 bits (8 queues max), but with more than 8 RX rings `rss_table[]` holds larger values; the 32-bit write then spills one `uint16_t` past `bitary[]` and corrupts the stack, so the NIC never links or the kernel panics.  Mask each value to 3 bits and pack 16 bits at a time to keep the write in bounds.

2. Build the indirection table in `aq_if_attach_post()` with a modulo over `min(rx_rings_count, HW_ATL_RSS_INDIRECTION_QUEUES_MAX)` instead of `i & (rx_rings_count - 1)`, which assumed a power-of-two ring count.

Reviewed by:    adrian
Differential Revision:  https://reviews.freebsd.org/D57240
DeltaFile
+10-2sys/dev/aq/aq_hw.c
+2-1sys/dev/aq/aq_main.c
+2-0sys/dev/aq/aq_hw.h
+14-33 files

FreeBSD/src 619934asys/dev/aq aq_main.c aq_ring.c

aq(4): RX/TX and HW-path correctness and hardening

Independent correctness fixes, plus robustness against a non-responding
device, malformed descriptor writeback, and torn MMIO reads, and the move
to the FreeBSD bus_space(9) register abstraction.

Correctness:
- aq_hw_ver_match returned true if any of major/minor/build was >=
  expected; compare lexicographically so e.g. 2.0.1 is correctly seen as
  older than 2.1.0.
- The VLAN hardware-filter iteration used the vlan tag directly as the
  bitstring index; use vlan_tag + 1 so the active-VLAN bookkeeping lines
  up with the table.
- aq_initmedia only registered IFM_AUTO in full-duplex/pause variants, so
  a bare "ifconfig aq0 media autoselect" matched no entry and returned
  ENXIO.  Add the bare IFM_ETHER|IFM_AUTO entry, matching ix/em/igc/ixv.
- Convert the per-ring diagnostic counters to counter(9): per-CPU,
  tear-free, no atomics on the increment path, fixing a data race and a
  32-bit torn read against the locklessly-read sysctls.  Drop three

    [30 lines not shown]
DeltaFile
+63-14sys/dev/aq/aq_main.c
+20-15sys/dev/aq/aq_ring.c
+21-9sys/dev/aq/aq_hw.c
+8-9sys/dev/aq/aq_ring.h
+13-3sys/dev/aq/aq_hw.h
+9-2sys/dev/aq/aq_fw2x.c
+134-522 files not shown
+138-568 files

FreeBSD/src 730eaf4tests/sys/sound mmap.c

sound tests: Add PROT_EXEC rejection test

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    markj, kib
Pull-Request:   https://ron-dev.freebsd.org/FreeBSD/src/pulls/30
DeltaFile
+28-0tests/sys/sound/mmap.c
+28-01 files