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
+1-1sys/dev/aq/aq_main.c
+2-0sys/dev/aq/aq_fw.h
+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

FreeBSD/src 47efa81sys/dev/sound/pcm dsp.c

sound: Handle CHN_F_MMAP_INVALID after cdev_pager_allocate()

We drop the channel lock to execute cdev_pager_allocate(). By the time
we pick up the lock again, CHN_F_MMAP_INVALID might be set, so make sure
we fail and free the vm handle.

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
+17-3sys/dev/sound/pcm/dsp.c
+17-31 files

FreeBSD/src 0c8147asys/dev/sound/pcm dsp.c

sound: Re-arrange a calculation in dsp_mmap_single()

This makes it easier to read. No functional change intended.

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
+1-1sys/dev/sound/pcm/dsp.c
+1-11 files

FreeBSD/src bbb37ddsys/dev/sound/pcm dsp.c

sound: Use and lock only the appropriate channel in dsp_mmap_single()

dsp_mmap_single() mmaps one of the channels associated with a
dsp_cdevpriv, based on the nprot argument. PROT_WRITE and
PROT_READ|PROT_WRITE select the output channel for mmaping, and
PROT_READ the input one. Instead of locking and modifying the flags of
all dsp_cdevpriv channels, do it only for the one we actually use.

While here, retire the now unused dsp_lock_chans() and
dsp_unlock_chans().

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
+17-40sys/dev/sound/pcm/dsp.c
+17-401 files

FreeBSD/src cee36a5bin/sh sh.1

sh: Improve function documentation

* Mention that the function body can be in parentheses.  It is already
  implied since the function body can be any valid statement, but it may
  not be obvious to a reader who has only ever seen functions that used
  curly brackets and assumes that they are part of the function syntax.

* Remove the incorrect claim that a local statement may only occur at
  the top of a function.

* Show that a value may be assigned to a variable in a local statement.

* While here, replace unpaired double quotes with \(dq to avoid
  confusing syntax highlighters.

PR:             296050
MFC after:      1 week
Reviewed by:    ziaee, jilles
Differential Revision:  https://reviews.freebsd.org/D57596

    [7 lines not shown]
DeltaFile
+17-10bin/sh/sh.1
+17-101 files

FreeBSD/src ea13334bin/sh sh.1

sh: Improve function documentation

* Mention that the function body can be in parentheses.  It is already
  implied since the function body can be any valid statement, but it may
  not be obvious to a reader who has only ever seen functions that used
  curly brackets and assumes that they are part of the function syntax.

* Remove the incorrect claim that a local statement may only occur at
  the top of a function.

* Show that a value may be assigned to a variable in a local statement.

* While here, replace unpaired double quotes with \(dq to avoid
  confusing syntax highlighters.

PR:             296050
MFC after:      1 week
Reviewed by:    ziaee, jilles
Differential Revision:  https://reviews.freebsd.org/D57596

    [7 lines not shown]
DeltaFile
+17-10bin/sh/sh.1
+17-101 files

FreeBSD/src 09bb0b0bin/sh sh.1

sh: Belatedly bump manual page date

Fixes:          556e793d803e ("sh: Improve function documentation")
DeltaFile
+1-1bin/sh/sh.1
+1-11 files

FreeBSD/src d8e8f92sys/fs/nfsserver nfs_nfsdport.c, sys/kern vfs_mount.c

pNFSd: Add a directory of newly created files for the pNFSd

When an NFSv4.1/4.2 server is configured as a pNFS server,
new file creation (via Open/Create from an NFS client) is
slow, due to the fact that the NFS server (MDS) must do
RPCs against the DS(s).

This patch precreates files in a directory called ".pnfshide/numfiles",
so that the NFS server can just rename them for the Open/Create.
A kernel process called a "replenisher" creates more files in
".pnfshide/numfiles" as required. (At this point, the MDS must
still do Setattr RPC(s) on the DS(s), but that will change when
the pNFS server is converted to the loosely coupled configuration.

This patch only affects the pNFS server and only if the directory
.pnfshide/numfiles exists in the exported file system.

Reviewed by:    kib
Discussed with: markj
Differential Revision:  https://reviews.freebsd.org/D57554
DeltaFile
+591-34sys/fs/nfsserver/nfs_nfsdport.c
+34-0sys/kern/vfs_mount.c
+625-342 files

FreeBSD/src e591152usr.sbin/crunch/examples really-big.conf

crunch: ldconfig and ldd are unrelated to GNU ld

Move them to the usr.bin section.

Fixes: de5663609e4c ("This is the new crunch utility for making...")
(cherry picked from commit e4c8058cf48df2d98e89a7de66d189c71bd4c3fb)
DeltaFile
+4-4usr.sbin/crunch/examples/really-big.conf
+4-41 files

FreeBSD/src 8edcb37sys/dev/efidev efirt.c

efirt(9): carefully destroy efi_lock

efi_init() might return error after initializing the mutex, in which
case MOD_UNLOAD() is not processed, and the mutex is not destroyed.
Similarly, efi_uninit() skips any processing if efi_runtime was left as
NULL, leaving mutex not destroyed.

Initialize the mutex in MOD_LOAD case, and destroy in MOD_UNLOAD, also
handling errors.

Reviewed by:    imp
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D57704
DeltaFile
+7-5sys/dev/efidev/efirt.c
+7-51 files

FreeBSD/src 3a4e049usr.sbin/efitable efitable.8 efitable.c

efitable: Fixup getopt args to reflect guid use.

Correct the manpage to reflect the preference for GUID vs UUID.
Take the long version of --guid for the -g option.
Sort the argument list while we are touching it.

Reviewed by:    imp
MFC after:      1 week
MFC to:         stable/15
Event:          BSDCan 2026
Differential Revision:  https://reviews.freebsd.org/D57695
DeltaFile
+3-3usr.sbin/efitable/efitable.8
+2-1usr.sbin/efitable/efitable.c
+5-42 files

FreeBSD/src 64b805dsys/dev/nvme nvme_if.m nvme_private.h

nvme: Move default is_storage method to nvme_private.h

Since CODE entries wind up in the nvme_if.c file, we got warnings when
it wasn't used (which is always). Move it into nvme_private and change
its name to nvme_is_storage_default to put it into the nvme_ namespace.

Fixes: 949804c81909
Sponsored by: Netflix
DeltaFile
+1-9sys/dev/nvme/nvme_if.m
+6-0sys/dev/nvme/nvme_private.h
+7-92 files

FreeBSD/src f70a687share/man/man4 pcm.4, sys/dev/sound/pcm sound.h sound.c

sound: Retire SD_F_VPC and related settings

VPC is enabled by default, and the only way to turn it off is through a
loader hint. That being said, there is no benefit to turning it off in
the first place, because VPC provides more fine-grained volume control,
as well as access to the SNDCTL_DSP_[SET|GET][REC|PLAY]VOL ioctls and
dsp_ioctl_channel().

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
DeltaFile
+1-21share/man/man4/pcm.4
+2-2sys/dev/sound/pcm/sound.h
+0-4sys/dev/sound/pcm/sound.c
+2-2sys/dev/sound/pcm/feeder_chain.c
+1-1sys/dev/sound/pcm/dsp.c
+6-305 files

FreeBSD/src f879eb3lib/libc/db/hash hash.c, lib/libc/tests/db dbm_nextkey_test.c

libc/dbm: Differentiate between uninitialized and end-of-db cursors

Commit `3a686b851f8f` fixed a `dbm_nextkey` edge case when using
the function after reaching the end of the database, but it inadvertently
broke the following `R_NEXT` behaviour:
"If the cursor is not yet set, this is the same as the R_FIRST flag."

Fix this by adding a new cursor constant that allows us to differentiate
between an unset cursor and a cursor that overflowed.

Reported by:    ae
Fixes:  3a686b851f8f
Sponsored by:   Klara, Inc.
Differential Revision:  https://reviews.freebsd.org/D57670
Reviewed by:    markj
DeltaFile
+33-0lib/libc/tests/db/dbm_nextkey_test.c
+8-4lib/libc/db/hash/hash.c
+41-42 files

FreeBSD/src 43fb5b3sys/dev/efidev efirt.c

efirt(9): in verbose mode, announce the attachment and fw spec version

Reviewed by:    emaste, imp
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D57710
DeltaFile
+8-1sys/dev/efidev/efirt.c
+8-11 files

FreeBSD/src f7b71f8sys/net if_ovpn.c

if_ovpn: Fix a lock leak in an error path

Reviewed by:    kp
MFC after:      1 week
Fixes:          04a7134c1e92 ("if_ovpn: fix use-after-free of mbuf")
Differential Revision:  https://reviews.freebsd.org/D57696
DeltaFile
+1-0sys/net/if_ovpn.c
+1-01 files

FreeBSD/src 8ed580blib/libsys adjtime.2

adjtime(2): document that delta can be NULL

The current verbiage somewhat indicates that always adjusts the time,
which hasn't been true as far back as I had the energy to `git blame`.

Reviewed by:    imp
Differential Revision:  https://reviews.freebsd.org/D57676
DeltaFile
+12-2lib/libsys/adjtime.2
+12-21 files

FreeBSD/src 57fefbesys/sys capsicum.h

rights(4): fix our representation of the unused bits

The current format seems to be a little confusing, and the version of it
for index 0 was broken by the below-referenced commit.  Break our
UNUSED macros out into one per unused bit to enumerate the entirety of
the space and make it easier to claim an unused one.

Fixes:  b165e9e3ea4e327fc ("Add fchroot(2)")
Reviewed by:    oshogbo (previous version), kib, markj
Differential Revision:  https://reviews.freebsd.org/D57505
DeltaFile
+56-8sys/sys/capsicum.h
+56-81 files

FreeBSD/src 5ec4a7busr.sbin/mixer mixer.c

mixer(8): Retire deprecated control values

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week

(cherry picked from commit de2a1366022d71c1d650832d378964c4cbe65ba7)
DeltaFile
+0-21usr.sbin/mixer/mixer.c
+0-211 files