FreeBSD git weekly: 2026-02-23 to 2026-03-01

Introduction

This is a display of mostly-automatically-classified git commits from 2026-02-23 to 2026-03-01.

Table of contents and commits per category:

(2) Highlighted commits (these are copies, not in stats)
10 8.7% Userland programs
7 6.1% Documentation
26 22.6% Hardware support
15 13.0% Networking
13 11.3% System administration
8 7.0% Libraries
2 1.7% Filesystems
19 16.5% Kernel
8 7.0% Build system
2 1.7% Internal organizational stuff
2 1.7% Testing
3 2.6% Style, typos, and comments
0 0.0% Contrib code
0 0.0% Reverted commits
0 0.0% Unclassified commits
115 100% total
Technical notes about this page

Highlighted commits

For extra visibility, these are copies of commits found in other sections. Most (if not all) come from the commit message containing "Relnotes:", or commits modifying UPDATING.

asmc(4): pull 32-bit support for the driver
The asmc(4) driver should work for 32-bit Intel-based Macs, in theory, if
the model details were added to the detection list. That being said,
32-bit Intel Macs were only released and available to the general public
for 8 months [1], so the value in maintaining i386 support in the driver is
reduced due to limited hardware access.

Remove 32-bit support for the driver officially to make it clear its use is
not supported.

This should fix building `NOTES.i386` by proxy as well.

Relnotes:       yes
MFC after:      2 weeks
Fixes:          https://cgit.freebsd.org/src/commit/?id=f224591746b ("Add ASMC_DEBUG make option")
Fixes:          https://cgit.freebsd.org/src/commit/?id=8342d9f7b5f ("asmc(4): Stop building it on i386, as...")
Differential Revision:  https://reviews.freebsd.org/D55544
1f2f5eba24aa53e180a4eb46b772410e5a782469 Enji Cooper 2026-01-05 03:36:55
ipfw: add support for masked ip-address lookups
Current radix-based implementation of lookup tables in ipfw does
not support non-contiguous prefixes while this type of lookup is
needed to write CPU-effective firewall configurations.

For some of the cases we can reach the goal using a masked table
lookup by adding masked (e.g. zero non-significant bits) records
into a table and then zero non-significant bits in lookup key
prior to making a table lookup.

Obtained from:  Yandex LLC
MFC after:      3 weeks
Relnotes:       yes
Sponsored by:   Yandex LLC
Differential Revision:  https://reviews.freebsd.org/D53694
32cd3ee5901ea33d41ff550e5f40ce743c8d4165 Boris Lytochkin 2026-03-01 18:54:24

Userland programs

Commits about commands found in man section 1 (other than networking).

lesspipe: Allow zstd to operate on a symlink
By default zstd refuses to operate on symlinks, so for example
`zless /var/crash/vmcore.last.zst` failed to view the uncompressed core
file.  Add -f to the zstd command line to allow operation on symlinks.

Reviewed by:    delphij
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55101
b4305c90a3be7e1a40b76545b8b761fdbda5c309 Ed Maste 2026-02-04 16:56:37
procstat: CID 1593951: Resource leak
Summary: A trivial resource leak fix; free the allocated memory before return.

Test Plan: Code inspection, run command.

I built a simple program that waits for a signal on a kqueue, then ran
that. The standard procstat displays:

```
fbsd-dev% Waiting for SIGTERM...
procstat -a kqueue
    PID       KQFD   FILTER      IDENT      FLAGS     FFLAGS       DATA      UDATA     STATUS
  84352          3   SIGNAL         15          C          -          0        0x0          -
```

The revised procstat displays:
```
fbsd-dev% sudo LD_LIBRARY_PATH=/usr/obj/usr/home/dab/git/freebsd/src/arm64.aarch64/lib/libutil /usr/obj/usr/home/dab/git/freebsd/src/arm64.aarch64/usr.bin/procstat/procstat -a kqueue
    PID       KQFD   FILTER      IDENT      FLAGS     FFLAGS       DATA      UDATA     STATUS
  84352          3   SIGNAL         15          C          -          0        0x0          -
fbsd-dev%
```

As expected, the two displays are identical. This doesn't prove that
the leak is gone, but it does prove that the revised command still
operates correctly. I think it can clearly be seen from inspection of
the change that the leak has been remedied.

Reviewed-bys: vangyzen
Differential Revision: https://reviews.freebsd.org/D55422
42ab99095b7dc2243629574e1c627cf5e6a9070c David Bright 2026-02-21 22:47:00
diff3: Code cleanup
* Order includes.

* Turn the diff type into an enum.

* Turn an unreachable error message into an assertion.

* Remove unused debugging code.

* Remove some dead assignments.

* Consistently use 1 instead of EXIT_FAILURE.

* Turn a return from main() into an exit().

MFC after:      1 week
Sponsored by:   Klara, Inc.
Reviewed by:    bapt
Differential Revision:  https://reviews.freebsd.org/D55517
c2dee7786bf32cb66cedec226e42e79e06457c51 Dag-Erling Smørgrav 2026-02-28 18:15:23
ed: add unicode support for the l (list) command
Use mbrtowc()/iswprint()/wcwidth() in put_tty_line() so that
the l command displays valid multibyte characters as-is instead
of escaping each byte as octal.

Column wrapping now correctly accounts for character display
width (including double-width CJK characters).

Invalid or incomplete UTF-8 sequences and non-printable
characters are still escaped as octal.

Differential Revision:  https://reviews.freebsd.org/D55365
5df6aca10906f669bc7095ff735eba6b8fe95ff0 Baptiste Daroussin 2026-02-17 15:25:46
diff3: bump version to the date when the GNU diff3 compat was reached
5ddfd1db271cc675997a942da599c342ccb53afa Baptiste Daroussin 2026-03-01 11:37:24
Commit group #0: paste(1)
paste(1): Utilise STAILQ from <sys/queue.h> in lieu of the home-rolled linked-list

Signed-off-by: Faraz Vahedi <kfv@kfv.io>
Reviewed by: imp, oshogbo
Pull Request: https://github.com/freebsd/freebsd-src/pull/1443
4ba5c9d015f02eb1fda30de26c23690dd41731fc Faraz Vahedi 2024-10-08 09:41:42

paste(1): Make small modifications to improve readability

Signed-off-by: Faraz Vahedi <kfv@kfv.io>
Reviewed by: imp, oshogbo
Pull Request: https://github.com/freebsd/freebsd-src/pull/1443
2e01fc43f23f0e960dc08984ffaff2d1e6ad5cea Faraz Vahedi 2024-10-08 18:09:39

paste(1): Capsicumise

Signed-off-by: Faraz Vahedi <kfv@kfv.io>
Reviewed by: imp, oshogbo
Pull Request: https://github.com/freebsd/freebsd-src/pull/1443
452ee04d62e22fe923a0b616076715dad0166c98 Faraz Vahedi 2025-08-06 13:31:06
from(1): Replace magic exit codes with standard macros
Signed-off-by: Faraz Vahedi <kfv@kfv.io>

With minor changes from committer.

Reviewed by: imp, oshogbo, markj (previous version)
Pull Request: https://github.com/freebsd/freebsd-src/pull/1491
dde5113f470af34bf917ca2690d89c94dc8d6db0 Faraz Vahedi 2024-10-26 15:28:07
from(1): Capsicumise
Signed-off-by: Faraz Vahedi <kfv@kfv.io>
Reviewed by: imp, oshogbo, markj (previous version)
Pull Request: https://github.com/freebsd/freebsd-src/pull/1491
4a4c88533712f98a6b8fa04acb319f26aecccc3c Faraz Vahedi 2024-11-01 11:03:56

Documentation

Man pages, release notes, etc.

sh.1: Add .sh_history and .shrc to FILES
MFC after:            3 days
Reviewed by:            bapt (previous), jilles, tembun@bk.ru
Differential Revision:  https://reviews.freebsd.org/D55295
9a20515bc9ce3fe6d7f09fd6bdece0dd45bdbc87 Alexander Ziaee 2026-02-23 08:16:33
ngctl.8: fix incorrect synopsis
Tiny manpage bug I caused in D50241
I left a line in the manpage that shouldn't be there.

MFC after:      3 days
Fixes:          https://cgit.freebsd.org/src/commit/?id=72d01e62b082 ("netgraph: teach ngctl to attach and run itself in a jail")
Reviewed by:    des, markj
Differential Revision:  https://reviews.freebsd.org/D55485
9ed56cd8d6929e3ee733e1e61d2e0c6b81122983 David Marker 2026-02-24 14:27:52
efibootmgr.8: capitalize examples section header
MFC after:    3 days
fac9ae3db4e6a28dfd467369e262f636e10a3b01 Ahmad Khalifa 2026-02-24 20:11:26
system(3): Clarify return values
Our manual page currently states that system() will return 127 if it
fails to execute the shell.  The actual return value is, to quote POSIX,
“as if the command language interpreter had terminated using exit(127)
or _exit(127)”.

MFC after:      1 week
Sponsored by:   Klara, Inc.
Reviewed by:    bnovkov, kevans
Differential Revision:  https://reviews.freebsd.org/D55483
7305604b29d3db29c9bb5de6e7a25829fb541d1e Dag-Erling Smørgrav 2026-02-25 21:12:36
rge.4: correct media types in the manual page
Correct media types for 1000Mbit/s, 2500Mbit/s, 5000Mbit/s and 10Gbit/s.

Reviewed by:    adrian
Differential Revision:  https://reviews.freebsd.org/D55496
25e89051df7ace23ae4953c21402e568cfce78b4 Kevin Lo 2026-02-26 02:52:14
newgrp.1: Provide examples
"These examples appear to be originally noted thirteen years ago by
Mark Saad, contributed by eadler, put into a patch by Felix Johnson,
and made into mdoc by myself. Finally, put this bug to rest." ~ziaee

PR:                     https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=167742
Co-authored-by:         eadler, ziaee, Mark Saad
Differential Revision:  https://reviews.freebsd.org/D48877
86dc5dd0b2a861cf9d8cad18fc17c17dbbfc4465 Felix Johnson 2026-02-27 00:45:03
nuageinit.7: Fix a couple of minor errors
Use the correct key name in the chpasswd section.
Remove a stray line to fix the description of 'password'.

MFC after:      1 week
Sponsored by:   Chelsio Communications
Reviewed by:    maxim
Differential Revision:  https://reviews.freebsd.org/D55547
df5014f71cff2c02f46afa8823370d7f61494bdb Navdeep Parhar 2026-02-26 23:01:47

Hardware support

Hardware drivers and architecture-specific code.

acpi_panasonic: Clear wireless RF_KILL on boot and resume
On Panasonic FZ-Y1 and similar models, the EC latches RF_KILL on
shutdown and suspend when battery is at certain level, causing wireless
to boot with hard block.

Call WLSW.SHRF during attach and resume to clear the block.

Tested on Panasonic FZ-Y1 with Intel Wireless 7265.

Reviewed by:    adrian, obiwac
Approved by:    adrian, obiwac
Differential Revision:  https://reviews.freebsd.org/D55265
16822dac32ab8955539ffa4eda05145df8638154 Abdelkader Boudih 2026-02-23 16:11:10
sdiob: Forward-declare struct sdio_func
Currently this happens as a side effect of the return type of
sdio_get_function() in the expansion of __BUS_ACCESSOR, but this is
fragile and can break if __BUS_ACCESSOR changes to define other
functions first.

Reviewed by:    imp
Differential Revision:  https://reviews.freebsd.org/D55351
82b293ea6987ebcadf1142acd2218f50ab5e3fc8 John Baldwin 2026-02-24 20:26:55
acpi: Use __BUS_ACCESSOR_DEFAULT and __BUS_ACCESSOR for IVARs
- Use __BUS_ACCESSOR_DEFAULT for the global handle IVAR to preserve
  existing behavior for acpi_get_handle.

- Use __BUS_ACCESSOR for the private ACPI IVARs as these are only used
  with direct children of acpi0.

Reviewed by:    imp
Differential Revision:  https://reviews.freebsd.org/D55355
591127bd4839d00fc218d74096ca07088ad30703 John Baldwin 2026-02-24 20:30:36
qoriq: fix spelling in device_set_desc()
The product series is called NXP QorIQ Layerscape.  Remove the extra 'e.

MFC after:      3 days
Reviewed by:    mmel, emaste
Differential Revision: https://reviews.freebsd.org/D55388
a4e30909ec983f7986954e6c509ea21422561d84 Bjoern A. Zeeb 2026-02-19 23:10:34
qoriq / nxp: Fix spelling take II
Fix spelling of NXP, which is not NPX, in two places.

Improves:       a4e30909ec98
Reported by:    Kevin Bowling (kevin.bowling kev009.com), qoriq_dw_pci.c
MFC after:      3 days
c3ed2f3e414497ab3cf6ade17e52a87f07a547e6 Bjoern A. Zeeb 2026-02-24 23:12:46
sys: Declare 'end' as an extern char[]
While here, remove an unused declaration.

Reviewed by:    jrtc27
Sponsored by:   AFRL, DARPA
Differential Revision:  https://reviews.freebsd.org/D53898
6513c2845f8912c30749cf64704d3dfeeeb9a47a John Baldwin 2026-02-25 02:20:59
cxgbe tom: Use the same WRs as iSCSI to send PDUs for NVMe
Reviewed by:  np (earlier version)
Sponsored by:   Chelsio Communications
Differential Revision:  https://reviews.freebsd.org/D55470
e43730e585fab3385c5b774b83e95e16c984dacc John Baldwin 2026-02-25 02:23:39
chore: replace {0, 0} with {DEV,KOBJ}METHOD_END
Both of the aforementioned macros have been present in FreeBSD
for well over a decade: 2009 for `KOBJMETHOD_END`; 2011 for
`DEVMETHOD_END`.

Adapt all hardcoded references of `{0, 0}` with `DEVMETHOD_END`
and `KOBJMETHOD_END` as appropriate. This helps ensure that
future adaptations to drivers following patterns documented
in driver(9) can be made more easily/without issue.

MFC after:      1 week
Differential Revision:   https://reviews.freebsd.org/D55414
0fc6c3f731a2cca3120798806c330a3081c9424b Enji Cooper 2026-02-21 06:14:46
asmc: add Wake-on-LAN control via sysctl
Apple Mac systems support Wake-on-LAN from powered-off state (S5/G2) via
the AUPO SMC key.

This change adds a convenience sysctl, `dev.asmc.0.wol`. This can be
disabled if set to 0 and enabled if set to 1.

The AUPO key is volatile and resets to 0x00 on every boot, so WoL must
be manually enabled before each shutdown to work from powered-off state.
Users need to run: `sysctl dev.asmc.0.wol=1` before shutting down the
system. The sysctl is best set to persist in `/etc/sysctl.conf`.

MFC after:      1 week
Reviewed By:    markj, ngie
Differential Revision:  https://reviews.freebsd.org/D54439
94db365042d35ff7e3ee7365a87a89bab1560030 Abdelkader Boudih 2026-02-25 06:32:42
asmc: introduce the concept of generic models
Having to enter in each of the models for Apple hardware, recompiling,
etc, is tedious. Provide generic models so end-users can leverage some
of the capabilities provided by the driver, i.e., common features like
minimal fans and lights (if present on the generic model) support.

The generic models are as follows:
- Macmini
- MacBookAir
- MacBookPro
- MacPro

This sort of follows the pattern established by the `applesmc` driver in
Linux.

MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D55395
3023bb49e115b4149f9fc0683dabde172ecb1336 Enji Cooper 2026-02-20 06:37:05
mlx5: report IPSEC offload capabilities whenever IPSEC_OFFLOAD is configured
Do it always for bootverbose if offload was enabled in the kernel
config, not only if the device actually supports all required
capabilities to do the offload. Otherwise, having the code to print the
caps is pointless.

Reviewed by:    slavash
Tested by:      Wafa Hamzah <wafah@nvidia.com>
Sponsored by:   NVidia networking
MFC after:      1 week
de29fd0322254127c3ebaedbc91ee4f9620f5fdf Konstantin Belousov 2026-01-28 05:32:53
mlx5: convert GET_TRUNK_IF() to function
Reviewed by:  slavash
Tested by:      Wafa Hamzah <wafah@nvidia.com>
Sponsored by:   Nvidia networking
MFC after:      1 week
87ca74de89e0ae96774674f7ae14d303fad5b780 Konstantin Belousov 2026-01-29 00:25:01
ath: migrate to new net80211 encryption key API
Migrate to the new encryption key API rather than poking at the
key struct directly.

Differential Revision:  https://reviews.freebsd.org/D54479
a54a36c40f07092ace706ccec8c3db6f6a1877c1 Adrian Chadd 2026-02-26 03:49:27
ipw: migrate to new net80211 encryption key API
Migrate to the new encryption key API rather than poking at the
key struct directly.

Differential Revision:  https://reviews.freebsd.org/D54480
fec9453dcea41f2716baa350c7e0fe33cdeb4d4b Adrian Chadd 2026-02-26 03:49:34
iwi: migrate to new net80211 encryption key API
Migrate to the new encryption key API rather than poking at the
key struct directly.

Differential Revision:  https://reviews.freebsd.org/D54481
76a20323fcfb9df34cd8529129cad0c4317115fb Adrian Chadd 2026-02-26 03:49:38
wpi: migrate to new net80211 encryption key API
Migrate to the new encryption key API rather than poking at the
key struct directly.

Differential Revision:  https://reviews.freebsd.org/D54482
70786de406b62bed55566ec95c932e150c25c3b3 Adrian Chadd 2026-02-26 03:49:43
mwl: migrate to new net80211 encryption key API
Migrate to the new encryption key API rather than poking at the
key struct directly.

Notably this driver was very clear about its expectation the net80211
key layout w/ key, TX MIC and RX MIC matches the firmware layout
and just memcpy()'ed it.  That has been refactored.

Differential Revision:  https://reviews.freebsd.org/D54484
8ebc054acacc70de6b95fc171ff724f344374172 Adrian Chadd 2026-02-26 03:49:59
xen/acpi: implement hook to notify Xen about entering sleep state
This is required so that ACPI power-off (entering S5) works as expected, as
the ACPI PM1a and PM1b blocks might not be accessible by dom0 directly.
Additionally, Xen also needs to do cleanup before entering a sleep state,
so it needs to be notified about it.

With this patch FreeBSD dom0 now powers off the host correctly:

acpi0: Powering system off...
(XEN) [   85.686598] arch/x86/hvm/emulate.c:415:d0v0 fixup p2m mapping for page fedc6 added
(XEN) [   85.687606] arch/x86/hvm/emulate.c:415:d0v0 fixup p2m mapping for page fbc10 added
(XEN) [   85.692357] Preparing system for ACPI S5 state.
(XEN) [   85.692702] Disabling non-boot CPUs ...
(XEN) [   85.694471] Broke affinity for IRQ9, new: {0-7}
[...]
(XEN) [   85.903118] Entering ACPI S5 state.

Should be a non-functional change when not running as a Xen dom0.

Reviewed by: kib
Sponsored by: Citrix Systems R&D
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D55504
db16856110cbdbdfdc3c8d44edae1b3a7463198e Roger Pau Monné 2026-02-24 20:23:08
dpaa2: improve error messages and log requested cluster size
If m_getjcl() fails we want to know the size we requested in order to
have a chance to evaluate the problem better.

MFC after:      3 days
Reviewed by:    tuexen
Differential Revision: https://reviews.freebsd.org/D55555
c3577fcf3fd0494cc992021d4debbca09241a49e Bjoern A. Zeeb 2025-08-20 21:04:49
asmc(4): pull 32-bit support for the driver
The asmc(4) driver should work for 32-bit Intel-based Macs, in theory, if
the model details were added to the detection list. That being said,
32-bit Intel Macs were only released and available to the general public
for 8 months [1], so the value in maintaining i386 support in the driver is
reduced due to limited hardware access.

Remove 32-bit support for the driver officially to make it clear its use is
not supported.

This should fix building `NOTES.i386` by proxy as well.

Relnotes:       yes
MFC after:      2 weeks
Fixes:          https://cgit.freebsd.org/src/commit/?id=f224591746b ("Add ASMC_DEBUG make option")
Fixes:          https://cgit.freebsd.org/src/commit/?id=8342d9f7b5f ("asmc(4): Stop building it on i386, as...")
Differential Revision:  https://reviews.freebsd.org/D55544
1f2f5eba24aa53e180a4eb46b772410e5a782469 Enji Cooper 2026-01-05 03:36:55
hwpmc: Fix PMC flags for AMD Zen cores
The PMC flags available for DF and L3 counters were not all implemented.
More importantly, the field encodings for the L3 counters changed in an
incompatible way between Family 17h and Family 19h.  Similarly, the
field encodings for the DF coutners changed between Family 19h and 1Ah.
I also added the precise retire flag for the 3rd core counter.

Lastly, I added a warning in the jevent parser because ignoring the
unknown fields results in counters incorrectly programmed.  We should
not just ignore that.

Sponsored by: Netflix

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/2040
00c0a1f0bf6c07e63384a389060dfc10924c0ed6 Ali Mashtizadeh 2026-02-21 19:07:26
hwpmc: Initial support for AMD IBS
This patch adds support for AMD IBS.  It adds a new class of performance
counter that cotains two events: ibs-fetch and ibs-op events. Unlike
most existing sampled events, IBS events provide a number of values
containing extra information regarding the sample.  To support this we
use the existing callchain event, and introduce a new flag for multipart
payloads.  The first 8 bytes of the pc_sample contains a header that
defines up to four payloads.

Sponsored by: Netflix

Reviewed by: imp,mhorne
Pull Request: https://github.com/freebsd/freebsd-src/pull/2022
e51ef8ae490fc9f73191f33e7ad388c2511c454a Ali Mashtizadeh 2026-01-30 09:12:17
libpmc: Update event definitions for AMD Zen
The pmu event definitions for AMD Zen 5 was updated since it was
imported into the tree.  As a bonus I also updated the recommended json
counters for Zen 1-3 even though we do not use that file yet.

Sponsored by: Netflix

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/2048
3ce3e896acf6cd504514ee44fc3aedcdc48a199c Ali Mashtizadeh 2026-02-24 15:36:03
libpmc: Import AMD Zen 6 PMU events.
Sponsored by: Netflix

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/2049
178d0b5b8da7480f455273aedf40dd8f1e785d3f Ali Mashtizadeh 2026-02-24 15:52:00
amd64 initializecpu(): use 64bit type for rcr4() result
Right now %cr4 defined bits fit into the low word, but this is not true
with FRED.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
6099b4600256552fc6f664c82b7dd0325a4b5b19 Konstantin Belousov 2026-03-01 01:00:28
asmc: output the SMC firmware revision on attach
The SMC firmware revision can prove helpful when determining why the
behavior of a given controller varies from the maintainers' expected
behavior.

This should be a sysctl (eventually), but for now dumping out the
information via `device_printf(..)` suffices, given that only one
asmc(4) compatible device can exist in an Apple platform at any
given point in time. This will become a sysctl in the future after
additional improvements are incorporated from OpenBSD and NetBSD.

MFC after:      1 week
Obtained from:  https://github.com/openbsd/src/ (sys/dev/acpi/asmc.c @ 142d064)
Differential Revision: https://reviews.freebsd.org/D55577
e81e724358e43dcf951e244a9df9df3eaa983fe9 Enji Cooper 2026-03-01 18:54:56

Networking

Network-related commands, library, and kernel.

rtsock: Fix stack overflow
Approved by:  so
Security:       FreeBSD-SA-26:05.route
Security:       CVE-2026-3038
Fixes:          https://cgit.freebsd.org/src/commit/?id=92be2847e845 ("rtsock: Avoid copying uninitialized padding bytes")
f3be7df50f01d9a6ead9f27b55bb4dfd7dc4f9d2 Mark Johnston 2026-02-23 15:52:50
Mitigate a case where TCP rack can send an extra ack.
Rack will in theory send an extra rate limited ack when we get to a closing state (sending a FIN) so that
if we have only 1 packet outstanding we might encourage the connection to close out. However it does this
always which is not always wise. Change it so that it only does that if its been more than an srtt since
we have had some activity i.e. a send or a receive of a packet.
Reviewed by:tuexen, rscheff
Differential Revision:<https://reviews.freebsd.org/D55459>
9063968e8e394b8062a855592e12607b143c1b0f Randall Stewart 2026-02-24 16:47:36
When TCP ECN decides it wants to assure an ACK is sent it needs to do it correctly and with some limits.
So in testing I have found two interesting cases where ECN is going
to make it so that an ack will be sent right away. These cases need
to be limited to being in the ESTABLISHED state. You don't want ECN
sending ACK's when we are transitioning in front or end states.
Also we don't start a delayed ack timer <and> at the same time set
the ACKNOW flag, thats just plain wrong.

Reviewed by: tuexen, rscheff
Differential Revision:<https://reviews.freebsd.org/D55460>
4e28874a6048f3c5a72a42b5bcfcfc7e71cad8a6 Randall Stewart 2026-02-25 12:59:04
tcp: BBLog incoming packets in TCPS_TIME_WAIT
PR:                   https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292293
Reviewed by:            rrs, rscheff, pouria, Nick Banks, Peter Lei
MFC after:              3 days
Sponsored by:           Netflix, Inc.
Differential Revision:  https://reviews.freebsd.org/D5546
8d2f910ceb0f1c366bcf2146a5ba1d1074d07933 Michael Tuexen 2026-02-25 13:01:50
tcp: improve handling of segments in TIME WAIT
The check for excluding duplicate ACKs needs to consider only TH_SYN
and TH_FIN. We know that TH_ACK is set and TH_RST is cleared. All
other flags, in particular TH_ECE, TH_CWR, and TH_AE needs to be
ignored for the check.

PR:                     https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292293
Reviewed by:            rrs
MFC after:              3 days
Sponsored by:           Netflix, Inc.
Differential Revision:  https://reviews.freebsd.org/D55489
f3364d3c8c876074a9a6f68168e5eb8bd60207de Michael Tuexen 2026-02-25 13:06:15
netipsec/ipsec_offload.c: handle failures to install SA nicely
If driver refused to install SA, record rejected handle for SA on the
interface always, not only for EOPNOTSUPP case.  The
ipsec_accel_output() function did the right thing if there is no
rejection handle, but not having the handle allows further attempts to
install the SA on the interface.

If driver installed the SA, but ipsec_accel_handle_sav() returned error,
uninstall the SA from the interface.  Hardware must not be set up to
process packets for which kernel expects no processing is done.

In both cases, free the drv_spi if a handle was not installed.  But keep
drv_spi allocated if the deinstall returned an error from the driver.

Reviewed by:    slavash
Tested by:      Wafa Hamzah <wafah@nvidia.com>
Sponsored by:   NVidia networking
MFC after:      1 week
477f020c7b5453bcd3bff7f1491e9830027b271e Konstantin Belousov 2026-01-27 01:00:36
ipsec_offload: add comment stating why ipsec_accel_sa_newkey_cb() returns 0
Reviewed by:  slavash
Tested by:      Wafa Hamzah <wafah@nvidia.com>
Sponsored by:   NVidia networking
MFC after:      1 week
0e5caac7d543687d540fa83a7125726c7c9e6e58 Konstantin Belousov 2026-02-04 02:34:59
rtnetlink: Add support for nexthop expiration in new/get route
Before this change, netlink only shows nexthop
expire value if route is not multipath.
Now it can set expire time during route creation.
Also, show expire time of multipath nexthops.

Reviewed by: glebius
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D55442
ff6d1faa65a1a77d04746b43023feb457cfa27b8 Pouria Mousavizadeh Tehrani 2026-02-22 17:46:12
netstat(1): Fix expire column in -r flag using netlink
Reviewed by: glebius
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D55440
2f7cfeebcc4356d3bb85e953900ba5d3f75831ff Pouria Mousavizadeh Tehrani 2026-02-22 16:35:23
divert: Use a better source identifier for netisr_queue_src() calls
These opaque IDs are used by netisr to distribute work among threads.
The mapping function is simply SourceID % numthreads, so using socket
addresses as source IDs isn't going to distribute packets well due to
alignment.

Use the divert socket's generation number instead, as that suits this
purpose much better.

Reviewed by:    zlei, glebius
MFC after:      1 week
Sponsored by:   OPNsense
Sponsored by:   Klara, Inc.
Differential Revision:  https://reviews.freebsd.org/D55537
5547a7bb39accd8f151b53e90b41d13b55f84c95 Mark Johnston 2026-02-26 20:25:35
divert: unbreak the LINT-NOIP build
Only expose `dcb` when either `INET` or `INET6` is defined.

Reported by:    clang (`-Wunused`)
MFC after:      1 week
Fixes 5547a7bb39 ("divert: Use a better source identifier...")
Differential Revision: https://reviews.freebsd.org/D55548
bd758ebac3272f720c051570e043e4bc653dcd48 Enji Cooper 2026-02-26 23:06:36
gre: unbreak LINT-NOINET
- Move some of the braces under their respective conditionals to make the
statements more self-encapsulated and only define the `aliasreq` union
in the event either INET or INET6 is defined.

- Fix a copy-paste error: `in_gre_ioctl` should be `in6_gre_ioctl` in the
  INET6 case.

Reported by:    tinderbox
Fixes:          https://cgit.freebsd.org/src/commit/?id=e1e18cc12e68 ("if_gre: Add netlink support with tests")
Differential Revision: https://reviews.freebsd.org/D55546
afbfc2a617ee16b4c3bafef869690b594f812690 Enji Cooper 2026-02-26 21:31:25
snl: Remove duplicate rta_expires member in route parser
There is no user for `rta_expires` member and it's
duplicate of `rta_expire`.

Reviewed By: melifaro
Differential Revision: https://reviews.freebsd.org/D55445
82069fae3ff956ecf833d239864e34a3efc3356e Pouria Mousavizadeh Tehrani 2026-02-27 20:41:51
vnet: Ensure the space allocated by vnet_data_alloc() is sufficent aligned
Some 32-bit architectures, e.g., armv7, require strict 8-byte
alignment while doing atomic 64-bit access. Hence aligning to the
pointer type (4-byte alignment) does not meet the requirement on
those architectures.

Make the space allocated by vnet_data_alloc() sufficent aligned to
avoid unaligned access.

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=265639
Diagnosed by:   markj
Reviewed by:    jhb, markj
Co-authored-by: jhb
MFC after:      5 days
Differential Revision:  https://reviews.freebsd.org/D55560
32beb3ae71cb320dbe4190a01c036943d99083b3 Zhenlei Huang 2026-02-28 11:35:42
ipfw: add support for masked ip-address lookups
Current radix-based implementation of lookup tables in ipfw does
not support non-contiguous prefixes while this type of lookup is
needed to write CPU-effective firewall configurations.

For some of the cases we can reach the goal using a masked table
lookup by adding masked (e.g. zero non-significant bits) records
into a table and then zero non-significant bits in lookup key
prior to making a table lookup.

Obtained from:  Yandex LLC
MFC after:      3 weeks
Relnotes:       yes
Sponsored by:   Yandex LLC
Differential Revision:  https://reviews.freebsd.org/D53694
32cd3ee5901ea33d41ff550e5f40ce743c8d4165 Boris Lytochkin 2026-03-01 18:54:24

System administration

Stuff in man section 8 (other than networking).

virtual_oss: use hw.snd.default_unit by default
Reviewed by:  christos
MFC after:      1 week
Signed-off-by:  Quentin Thébault <quentin.thebault@defenso.fr>
Sponsored by:   Defenso
PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=293130
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2043
06b466526a7fc35cc6fc5bf6f6269e7f3a0a7aea Quentin Thébault 2026-02-23 12:33:33
ngctl: Fix getline loop
I misremembered when I wrote this code: getline() returns -1 on EOF, not
zero, so the loop condition and the error check are both incorrect
(though in practice getline() will never return 0).

MFC after:      3 days
Fixes:          https://cgit.freebsd.org/src/commit/?id=3cbdcabf714d ("ngctl: Modernize code somewhat")
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D55487
6c4777c59325c2cfefcce0c466b3bf475404a550 Dag-Erling Smørgrav 2026-02-24 14:23:39
camcontrol: Print 'transport revision'
As described in Serial ATA Revision 3.5a

Reviewed by:    mav
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2044
f4f9054dc47b430872d38c7a75fea753c6fe796f Dmitry Lukhtionov 2026-02-23 14:42:59
bhyve: Fix truncate_iov()
The implementation was simply wrong.  It would always just return the
first entry in the iovec, even if the requested length is larger than
that first entry.

Note, this function will be removed soon, see D53468.

Reported by:    Vinod p n <vinod272@gmail.com>
Reviewed by:    des, emaste, Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org>
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D55438
d7d4da91de201841c57a6b8f89b450754b9b8696 Mark Johnston 2026-02-24 15:14:39
bsdinstall: fix EFI boot entry creation
update_uefi_bootentry assumes that the caller sets FREEBSD_BOOTNAME and
mntpt, which isn't the case anymore. The result is that there is no
"FreeBSD" boot entry created/updated after install. Most machines manage
to boot from the removable media path (if the loader is installed there
too), but some don't.

Take the loader's path as an argument and rename the variable used in
the ZFS mirror loop so mntpt can be reused below.

Also mark nentries as a local variable so it doesn't leak out of the
function.

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=293385
Fixes:          https://cgit.freebsd.org/src/commit/?id=494de51bc0074472d1b01604f085daea0844f240
MFC after:      2 days
Reviewed by:    imp
Differential Revision:  https://reviews.freebsd.org/D55469
0fd91c489134643ac9e38c0f55ba7464fe892c5e Ahmad Khalifa 2026-02-24 20:11:32
lpd: Improve robustness
* Check for integer overflow when receiving file sizes.

* Check for buffer overflow when receiving file names, and fully
  validate the names.

* Check for integer overflow when checking for available disk space.

* Check for I/O errors when sending status codes.

* Enforce one job per connection and one control file per job (see
  code comments for additional details).

* Simplify readfile(), avoiding constructs vulnerable to integer
  overflow.

* Don't delete files we didn't create.

* Rename read_number() to read_minfree() since that's all it's used
  for, and move all the minfree logic into it.

* Fix a few style issues.

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=293278
MFC after:      1 week
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D55399
9065be0a5902e058d25a42bd9b3fbe9dc28b189d Dag-Erling Smørgrav 2026-02-26 06:15:06
lpd: Add timeout option
Set a 120-second receive timeout on all client connections, and add a
command-line option to change that value.

MFC after:      1 week
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D55400
56fbfd1ecdc78fc99b3a2e381c355ce8980de39d Dag-Erling Smørgrav 2026-02-26 06:15:14
route(8): Fix -expire argument when using netlink
Also fixes nexthop expire value on route get using netlink.

Reviewed by: glebius
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D55444
8230cf1aa18d9215ee17fec743fc7c7c8fa2da13 Pouria Mousavizadeh Tehrani 2026-02-22 18:41:31
route(8): show expire time of each nexthop in monitor
Reviewed by: glebius
Differential Revision: https://reviews.freebsd.org/D55514
b5366f8e138e223d85d7c9b71f0a0384f5d55f29 Pouria Mousavizadeh Tehrani 2026-02-25 16:45:36
loader.efi: try all ZFS pools found by efi_zfs_probe()
Remove global uint64_t pool_guid and instead iterate over all pools that
efizfs_get_zfsinfo_list() provides.

The global pool_guid used to mark that we have constructed a ZFS pool and
the pool label that was used for that was stored on a partition that is
the EFI image device handle.

First problem here is that it is too restrictive.  If the very first
device to probe is a spare member of a pool, it will be used to
instantiate a pool but (pd->pd_handle == boot_img->DeviceHandle) won't be
true, thus global pool_guid won't be populated and ZFS boot won't be
tried.

Second problem is that potentially we may find several pools, and all
should be tried to boot.  Note that the code for that is already here -
efizfs_get_zfsinfo_list() is imported by efizfs.h but was not used until
now.

Reviewed by: imp
Differential Revision:  https://reviews.freebsd.org/D55094
d69fc3a9dc71768e125e83d35274f0820063e42d Gleb Smirnoff 2026-02-27 00:57:26
stand/efi: Allow RELAXED or STRICT boot policies
The RELAXED boot policy will automatically search for any root
filesystem (currently zfs only) on any device. STRICT policy only
searches on the boot device. RELEAXED will still prefer the device we
booted from, which is the smallest behavior change we should do. STRICT
may be needed for releases, though.

Sponsored by:           Netflix
Reviewed by:            glebius
Differential Revision:  https://reviews.freebsd.org/D55107
784150fd25351f4a38f4d983882f4a26cc5d3272 Warner Losh 2026-02-27 00:57:39
bsdinstall: remove ftp.at.freebsd.org
After ~13 years of running the ftp.at.freebsd.org community mirror is
shutting down at the end of March.  Remove it from the mirrorselect
script.

Reported by:    Klaus P. Ohrhallinger <k@7he.at>
d44d79e577eab3e66b993c783b969b82678792d1 Philip Paeps 2026-02-28 09:56:23
bhyveload: simplify cb_open() and eliminate minor TOCTOU
It's not at all clear why I wrote it like this, but we can do better.

I wouldn't think this really has any meaningful security implications
since the hierarchy in question can't really be modified by the guest
scripts, but it would seem to make it a little more robust.

Fixes:  https://cgit.freebsd.org/src/commit/?id=6779d44bd878e3c ("bhyveload: use a dirfd to support -h")
Reviewed by:    bnovkov, markj
Differential Revision:  https://reviews.freebsd.org/D55379
6da9d465c54bf2e3496e83db025c5d22f3b3cc17 Kyle Evans 2026-03-01 03:23:59

Libraries

libjail: avoid a double-free in the MAC label bits
As written, we'll repeatedly jps_free() the first element, which is
obviously bogus.  Fix it to index appropriately.

Fixes:  https://cgit.freebsd.org/src/commit/?id=db3b39f063d9f ("libjail: extend struct handlers [...]")
686280c0fdc4807676c3e8b896a1816ce62d4457 Kyle Evans 2026-02-24 05:55:12
mpool/mpool_get.c: Avoid clobbering 'errno' when handling 'pread' errors
POSIX.1-2024 states that the 'free' function "shall not modify errno if
ptr is a null pointer or a pointer previously returned as if by malloc()
and not yet deallocated". However this is a fairly recent addition
and non-compliant allocators might still clobber 'errno', causing
'mpool_get' to return the wrong error code. Fix this by saving
and restoring 'errno' after calling 'free'.

Sponsored by:   Klara, Inc.
Reviewed by:    obiwac
Differential Revision:  https://reviews.freebsd.org/D55463
MFC after:      1 week
bce0c14fe19defeef4f02cfebc018e9adf979783 Bojan Novković 2026-02-23 15:30:26
system(3): Improve signal handling
Ignore SIGINT and SIGQUIT and block SIGCHLD, as POSIX requires.

To deal with the concurrency problem described in POSIX, we keep track
of the count of concurrent invocations.  We ignore and block signals
only when the counter was zero before we incremented it, and restore
them only when the counter reaches zero after we decrement it.

Note that this does not address the issue of thread cancellation.

MFC after:      1 week
Sponsored by:   Klara, Inc.
Reviewed by:    bnovkov, sef, kevans
Differential Revision:  https://reviews.freebsd.org/D55471
6e589e6e8e64793adb437c561ec084dbb6ad1ced Dag-Erling Smørgrav 2026-02-25 21:12:21
system(3): Fix null case
Our manual page states that if given a null pointer, system() returns
non-zero if the shell is available and zero if it is not.  This is
consistent with the C standard's description of system(), but it is not
what we actually do.  What we actually do is always return non-zero, as
required by POSIX.

As the POSIX rationale explains, implementing the logic required by the
C standard does not violate POSIX, since a conforming system always has
a shell, therefore the logic will always return non-zero.

Since our libc is commonly used in non-conforming situations such as
chroots or thin jails, we should implement the full logic required by
the C standard.

MFC after:      1 week
Sponsored by:   Klara, Inc.
Reviewed by:    obiwac, bnovkov, kevans
Differential Revision:  https://reviews.freebsd.org/D55484
8ae3f44991948cc97b09adc248a9a46db71bf9e0 Dag-Erling Smørgrav 2026-02-25 21:12:42
libnetbsd: add math.h and sys/time.h
- `math.h`: `isinff(..)`
- `sys/time.h`: `timespec*(x)`

These two headers are used by tests in newer snapshots of
`contrib/netbsd-tests`.

MFC after:      1 week
2a6c2d9c38dc421025b6c18cac68fe9965c574c0 Enji Cooper 2026-02-25 23:19:56
Refinements to the output when the EXTERROR_VERBOSE environment is set
When kernel external errors are available they are included in the
err(3) library function messages. In addition to the extended error
itself, the kernel also tracks the kernel file and line number at
which the error was generated. This additional information is not
included in the err(3) messages unless the EXTERROR_VERBOSE environment
variable is present. Currently, when EXTERROR_VERBOSE is present,
all the internal extended error information associated with the
error is printed most of which is redundant with the formatted error
message printed by err(3). This change will add only the kernel
file and line number to the err(3) message when EXTERROR_VERBOSE
is present and set to "brief".

Sample output with bad protection bits to mmap:

guest_16 % ./Example bigfile
Example: mmap bigfile: Invalid argument (unknown PROT bits 0x8)

guest_16 % setenv EXTERROR_VERBOSE
guest_16 % ./Example bigfile
Example: mmap bigfile: Invalid argument (unknown PROT bits 0x8 errno 22 category 1 (src sys/vm/vm_mmap.c:200) p1 0x8 p2 0)

guest_16 % setenv EXTERROR_VERBOSE brief
guest_16 % ./Example bigfile
Example: mmap bigfile: Invalid argument (unknown PROT bits 0x8 (src sys/vm/vm_mmap.c:200))

Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D55494
MFC-after:    1 week
Sponsored-by: Netflix
6fd98877de633f5ec6f028e78d5a2d94527d63d0 Kirk McKusick 2026-02-26 06:20:12
lib/libnetbsd: bring in `__type_m{ax,in}*` macro family
These macros are used by some of the NetBSD tests which calculate the
size of types, e.g., `__type_max(time_t)`.

This wraps up the set of macros needed in order to update to the a
netbsd-tests snapshot from this past month.

Obtained from:  https://github.com/netbsd/src (55b4b44)
MFC after:      1 week
db5344a7445f1a796bc3cacd32a46e88e3e589a7 Enji Cooper 2026-02-26 02:29:49
libiscsiutil: Record dependency on libmd
MFC after:    3 days
Fixes:          https://cgit.freebsd.org/src/commit/?id=6378393308bc ("Add an internal libiscsiutil library.")
Sponsored by:   Klara, Inc.
Sponsored by:   NetApp, Inc.
Reviewed by:    kevans
Differential Revision:  https://reviews.freebsd.org/D55596
05ca4837a3e9a413aabcf005abb14fff35088476 Dag-Erling Smørgrav 2026-02-28 18:11:10

Filesystems

nullfs: Fix handling of doomed vnodes in nullfs_unlink_lowervp()
nullfs_unlink_lowervp() is called with the lower vnode locked, so the
nullfs vnode is locked too.  The following can occur:
1. the vunref() call decrements the usecount 2->1,
2. a different thread calls vrele() on the vnode, decrements the
   usecount 0->1, then blocks on the vnode lock,
3. the first thread tests vp->v_usecount == 0 and observes that it is
   true,
4. the first thread incorrectly unlocks the lower vnode.

Fix this by testing VN_IS_DOOMED directly.  Since
nullfs_unlink_lowervp() holds the vnode lock, the value of the
VIRF_DOOMED flag is stable.

Thanks to leres@ for patiently helping to track this down.

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=288345
MFC after:      1 week
Reviewed by:    kib
Differential Revision:  https://reviews.freebsd.org/D55446
8b64d46fab87af3ae062901312187f3a04ad2d67 Mark Johnston 2026-02-25 15:31:30
ffs snapshots: pass valid args to vn_start_write
If the initial no-wait vn_start_write fails, we pass the old
PCATCH flag to the following sleepable vn_start_write.
Following a75d1ddd74, that flag should be V_PCATCH.

Sponsored by:           Dell Inc.
Differential Revision:  https://reviews.freebsd.org/D55512
722fbfef0abb4de31fb91fd35f9b85fd534725c4 Eric van Gyzen 2026-02-25 16:26:06

Kernel

Kernel stuff (other than networking, filesystems, and drivers).

sys/_offsetof.h: pacify GCC 12's macro redefinition check
GCC 12 has a strict definition of identity (all characters including
whitespace must be identical) when comparing "redefined" macros. Make
our definition exactly match the stddef.h that comes with GCC to fix
test-includes of netlink/netlink_snl.h.  (Note: later versions of GCC
are a bit more flexible and don't have this problem.)

Reported by:    des
Sponsored by:   DARPA, AFRL
Fixes:          https://cgit.freebsd.org/src/commit/?id=2adc3f0db187 ("stddef.h: centralize definition of offsetof()")
0076f6d1ad05e80d372bef1caf15615cd639fb5c Brooks Davis 2026-02-23 09:45:58
sys: Restore sorting in sys/elf_common.h
These various definitions are meant to be kept sorted by machine prefix.

Fixes:  https://cgit.freebsd.org/src/commit/?id=2bb61497ca76 ("elf_common.h: Add definitions for LoongArch ELF files")
b7ef4f4b230f01968473269f280bd7e4e86a3ec9 Jessica Clarke 2026-02-24 13:52:21
elf_common.h: Sort SHT_ entries
Reviewed by:  jrtc27
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55488
0ff08b8c402b3c555125e4c72df0b80b4d084d56 Ed Maste 2026-02-24 14:26:55
__builtin_align_down: Cast value to __uintptr_t in the fallback
This matches the behavior of the fallbacks for __builtin_align_up
and __builtin_is_aligned.

Reviewed by:    arichardson, ngie, kib
Differential Revision:  https://reviews.freebsd.org/D55161
5faceb84142f3c9886f38a03dd5214785ac6961f John Baldwin 2026-02-24 20:24:17
ccp: Don't name anonymous structure and union types
Keep the dword labels as comments instead.  Anonymous structs and
unions don't have type names in C11+.

Differential Revision:  https://reviews.freebsd.org/D55144
8d3f41dbcb2a949b52660501d7efc6bb12850b09 John Baldwin 2026-02-24 20:25:45
bus: Add a new IVAR accessor to check for the existence of an IVAR
<varp>_has_<var> returns true if the given IVAR can be read.

Reviewed by:    imp
Differential Revision:  https://reviews.freebsd.org/D55352
cb5a0eb05310d06e9853a01a542be55b9adee038 John Baldwin 2026-02-24 20:28:28
bus: Add __BUS_ACCESSOR_DEFAULT
This macro is similar to __BUS_ACCESSOR in that it creates three
helper routines for an ivar, but the "get" wrapper returns a default
value if BUS_READ_IVAR does not return a value.

Reviewed by:    imp
Differential Revision:  https://reviews.freebsd.org/D55353
b937f9bf750907602606691dd92fb6d70e9f88da John Baldwin 2026-02-24 20:29:40
acpi: Split ACPI IVARs into global and private sets
ACPI_IVAR_HANDLE is the only true "global" IVAR that can be used
across multiple bus drivers.  The other IVARs are private to direct
children of acpi0.  However, they need to be numbered after ISA IVARs
as ACPI mimics an ISA bus device.  To ensure this remains true, add an
ISA_IVAR_LAST to use in assert that the private ACPI IVARs do not
overlap with ISA IVARs.

Reviewed by:    imp
Differential Revision:  https://reviews.freebsd.org/D55354
0bb867e9f56500e30948ea7c440dd1166097df7f John Baldwin 2026-02-24 20:30:06
ofed: reduce usage of struct dma_attrs *dma_attrs
ib_verbs.h still uses struct dma_attrs *dma_attrs everywhere.
It is beyond my knowledge when that struct got deprecated upstream but
it is still supported by our LinuxKPI.  The problem is that the
functions called with that argument (dma_map_single_attrs,
dma_unmap_single_attrs, dma_map_sg_attrs, dma_unmap_sg_attrs) so far
are #defines in LinuxKPI and drop the last argument (attrs) so it was
never a problem.

In preparation to pass the attrs to the actual implementation in LinuxKPI,
which has gained support for them, we now pass dma_sttrs->flags which
is the expected unsigned long bit field.

If anyone has serious interest in updating our ofed implementation they
could look into this some more and remove the usage of struct dma_attrs
entirely.

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
Reviewed by:    kib
Differential Revision: https://reviews.freebsd.org/D55390
5edf24aac1d0978d37d62594f42d87c9f118622b Bjoern A. Zeeb 2026-02-19 23:12:29
LinuxKPI: 802.11: do not leak BA sessions when tearing down state
In certain cases we may tear down state of a node with 'ongoing'
BA sessions.  This can trigger a firmware crash with iwlwifi as
reported in [1] when trying to remove the sta from the firmware.

   0x2010303A | ADVANCED_SYSASSERT
   ..
   0x00000000 | umac data1 (sta id=0)
   ..
   0x0088030C | last host cmd (STA_RM)

[1] https://lists.freebsd.org/archives/freebsd-wireless/2025-November/003901.html

I hit the same problem while running regression tests after
reworking some LinuxKPI 802.11 sta state machine bits.

Add the missing calls to lkpi_sta_run_to_assoc() and lkpi_sta_run_to_init()
to make sure (through net80211) we call (*ampdu_action) with
IEEE80211_AMPDU_RX_STOP to avoid the firmware crash.

Note: this specific patch was not excessively tested.  The upcoming
change to the state machine including this fix has seen more testing
but also only needed the change in one place.
The reason for putting this in upfront is to document the case well.

Reported by:    Mohammad Amin (the.madamin20 gmail.com) [1]
Sponsored by:   The FreeBSSD Foundation
MFC after:      3 days
fc9369abef6b6993e79b08de832e1d49f81a17b9 Bjoern A. Zeeb 2026-02-24 12:55:48
kern/sched_shims.c: back to ifunc
Reported by:  kevans
Reviewed by:    kevans, mhorne
Fixes:  https://cgit.freebsd.org/src/commit/?id=0d3652f67d246348e2c017205c6782caf4484449
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differrential revision: https://reviews.freebsd.org/D55490
ef1218add1d3d2baca9d3b8bcfb57e05ef6fc503 Konstantin Belousov 2026-02-24 15:36:26
Do not fail 'devctl clear driver' if another driver is not found
Detaching the bhyve(4) ppt driver from an unsupported PCI device
should not raise a "Device not configured" error.  We do not expect
that a new driver must take over the device in this case.

Reviewed by:    imp, jhb
Differential Revision:  https://reviews.freebsd.org/D52050
fba56be09f1c344cc5805b898fbfef6066950942 Marcin Cieslak 2026-02-25 01:58:59
Commit group #1: LinuxKPI
LinuxKPI: 802.11: adjust assoc check before key deletion

There is a discrepancy between the vif assoc state and the sta state
(see comment in lkpi_sta_run_to_init()).
Adjust the check in lkpi_iv_key_delete() and add it to
lkpi_sta_del_keys() so that we can take way the keys after whatever
comes first: the sta went away from AUTHORIZED (RUN) or if the vif is
no longer marked assoc.
This is needed as we may only take the sta down partially back to
State 2 (cf. 802.11-2024, Figure 11-23) and key material is no longer
valid before the vif gets cleaned up and the sta is removed entirely.

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
96a57fc4bf4edca9a579cc47f9058253c11f8313 Bjoern A. Zeeb 2026-02-24 23:51:43

LinuxKPI: 802.11: improve crypto debug logging

Add a log entry to lkpi_ieee80211_iterate_keys() in order to be able
to determine if there are still keys available when a driver calls
into this (e.g., iwlwifi does before removing the sta to make sure
the keys are gone).

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
acba7a62b92ff62ca4ae831e9c28fc6ed4f6455a Bjoern A. Zeeb 2026-02-25 00:05:36

LinuxKPI: 802.11: fold the sta state machine again

In and around d9f59799fc3e7 we adjusted the initial sta state machine
implementation and unfolded some functions, duplicating code.
This version tries to undo some of that as it seems that we can get
away with doing it more cleanly these days.

There are 5 main functions for the path from INIT to RUN (UP1,2,3.1,3.2,4)
and 4 main functions for the path from RUN to INIT (DOWN1,2,3,4).
The reason there is one more on the patch up is that we can go directly
from AUTH to RUN without going through ASSOC first.
In addition there are further functions relying only on these 9 base
state change functions in order to implement the remaining possible
state transitions net80211 can do (without CSA and SLEEP).

Another change is that we no longer take a sta always through INIT/SCAN
first and then back up to AUTH, that is, we are no longer deleting the
sta from the firmware unless net80211 would also take us down to that
state and in a follow-up back up.

This is a preparation for another fix to come in order to import a
newer version of iwlwifi (v6.19).

I have run a few days of mlme_assoc (see tools) and some other basic
regression tests.  The only thing I managed was to deadlock net80211
for other reasons (ieee80211_waitfor_parent()).  But this will need
excessive user testing as the various options which may have an
effect on the subtle details are great as we learnt in the past years.

Sponsored by:   The FreeBSD Foundation
MFC after:      5 days
48f55a49a1d142c616edbc7ee6745dd6b83393e4 Bjoern A. Zeeb 2026-02-25 00:13:22
Commit group #2: sctp: fix so_proto when peeling off a socket
sctp: fix so_proto when peeling off a socket

Reported by:            glebius
Reviewed by:            rrs
Fixes:                  https://cgit.freebsd.org/src/commit/?id=d195b3783fa4 ("sctp: fix socket type created by sctp_peeloff()")
Differential Revision:  https://reviews.freebsd.org/D55454
454212b9718b55b43781f81bef252658e20e0fd3 Michael Tuexen 2026-02-25 12:55:54

sctp: fix NOINET build

Reported by:            ngie
Fixes:                  https://cgit.freebsd.org/src/commit/?id=454212b9718b ("sctp: fix so_proto when peeling off a socket")
MFC after:              3 days
6bd97e9e01ff159eef49b2521fdbe67d5db10d95 Michael Tuexen 2026-02-27 07:51:29
elf_common.h: Add AArch64 Memtag ABI constants
Obtained from the Memtag ABI Extension to ELF for the Arm® 64-bit
Architecture (AArch64) [1]

[1] https://github.com/ARM-software/abi-aa/blob/main/memtagabielf64/memtagabielf64.rst#dynamic-section

Reviewed by:    andrew
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55486
d971bc5220f7adb8a2bdfadc8e3ca7ffcf9ca843 Ed Maste 2026-02-23 21:23:49
LinuxKPI: remove dumm header now in common
page_pool/helpers.h does exist in common/include/net/page_pool/helpers.h
so we can remove the dummy header file.

Sponosred by:   The FreeBSD Foundation
MFC after:      3 days
c944960a5bd7725e4d5e6805ec1e55b7de147c35 Bjoern A. Zeeb 2026-02-26 22:46:08

Build system

ffs.4: Mlink to ufs.4
PR:           https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=293423
MFC after:      3 days
Requested by:   bms
f0b8355db6ba57a0849c41722e0a09f312d9eef5 Alexander Ziaee 2026-02-24 13:24:16
tools/build/stddef.h: fix stock clang/gcc headers
Both clang and gcc's stddef.h are designed to be included multiple times
with different combinations of __need_* macros defined (e.g
__need_size_t). Remove the #pragma once to accommodate this, ptraddr_t
is guarded by _PTRADDR_T_DECLARED anyways.

Also use __SIZE_TYPE__ instead of size_t since it's not guaranteed to be
defined.

Reviewed by:    brooks, imp, kib
Differential Revision:  https://reviews.freebsd.org/D55453
0c075db78a98de8e3a255597d045bcd24ba27be7 Ahmad Khalifa 2026-02-24 20:11:12
Use NO_SHARED instead of explicitly using -static flag
NO_SHARED is the proper way to declare linking a program without
shared libraries.

Obtained from:  Hewlett Packard Enterprise
MFC after:      1 week
Reviewed by:    emaste
Differential Revision:  https://reviews.freebsd.org/D44761
de773bcc2ffb8472f68283985bf4b7b698c57914 Stephen J. Kiernan 2026-02-25 05:25:08
syscall_timing: add Makefile.depend
This was part of review D44761. It was separated into another commit for
better clarity.

Obtained from:  Hewlett Packard Enterprise
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D44761
0ac5cddebe1e98d7d29493f0e6e829021be7fcef Ka Ho Ng 2026-02-25 05:33:34
tests/kern: put ssl_sendfile under MK_OPENSSL != no
Reported by:  wosch
73d9153fc57bcfb665a4867cb1adc8fa0a8aaa84 Gleb Smirnoff 2026-02-26 20:30:18
rc.8: Add rc.suspend as an alias
Make it consistent with the other lifecycle scripts, thus making it
more findable.

Reviewed by:    ziaee
Signed-off-by:  Pat Maddox <pat@patmaddox.com>
Closes:         https://github.com/freebsd/freebsd-src/pull/2047
77dc773ecfcfd177c26dde4e858feb9a35fd970f Pat Maddox 2026-02-24 20:25:15
vmimage.subr: skip -dbg sets for WITHOUT_DEBUG_FILES/WITHOUT_KERNEL_SYMBOLS
This matches non-pkgbase behavior as installworld/installkernel skip the
debug bits if these knobs are set.

MFC after:      1 week
Sponsored by:   Chelsio Communications
Reviewed by:    cperciva
Differential Revision:  https://reviews.freebsd.org/D55572
960409d660486c823615dc4cb2ff91793337ef20 Navdeep Parhar 2026-02-27 02:04:16
share/mk/src.libnames.mk: Sort _DP entries
Requested by: des
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D55598
5d9b185c33ae137d4690a02504d94c3315c71a60 Joseph Mingrone 2026-02-28 22:40:45

Internal organizational stuff

Add records about new ports committer (nxjoseph)
Update Mentor and Mentee Information to follow step
5 of the Committers Guide.

Reviewed by:    osa, vvd (mentors)
Approved by:    osa (mentor)
Differential Revision:  https://reviews.freebsd.org/D55457
477ab960440c5284fb5819c63c6f03aa15606def Yusuf Yaman 2026-02-23 16:04:02
sanitize.lua: A tool to extract interfaces from files
This is a simple too to remove all comments, extra whitespace and other
unnecessary things that may have creative content. What remains can be
just the minimal interface described by the header file. When used with
care, this can mechanically sanitize files, like some device tree
bindings file, that are only #defines that are meant to be used in
multiple context (the dts files and in C code to interpret the resulting
dtb).

Sponsored by:           Netflix
Reviewed by:            kevans
Differential Revision:  https://reviews.freebsd.org/D55087
7951411672fab14367d9e785bfc6fe7d9a29668c Warner Losh 2026-02-27 00:40:10

Testing

system(3): Write our own tests
Replace the somewhat perfunctory NetBSD tests with our own.

MFC after:      1 week
Sponsored by:   Klara, Inc.
Reviewed by:    bnovkov, kevans
Differential Revision:  https://reviews.freebsd.org/D55482
7a1ade5109ac57d1f59eaa75b5d0f13fabecf6ba Dag-Erling Smørgrav 2026-02-25 21:12:29
ed: add unicode test cases to ATF test suite
Including examples in Cyrillic suggested by kib@

Differential Revusion:  https://reviews.freebsd.org/D55364
7c2c2c2a2253370c88fe428cf1c0ecebd68fe864 Baptiste Daroussin 2026-02-17 16:38:29

Style, typos, and comments

These could go in other categories, but it's more clear if they're here instead.

debug.sh: Fix a typo
MFC after:            3 days
Reviewed by:            emaste, guest-seuros, sjg, ziaee
Differential Revision:  https://reviews.freebsd.org/D55416
ab835b37075e6478ef82f8c807a2335f5d19edaf Artem Bunichev 2026-02-23 08:31:31
style.mdoc: Add example manuals to FILES
This is the OG meat and potatoes.

MFC after:              3 days
Reviewed by:            0mp, carlavilla
Differential Revision:  https://reviews.freebsd.org/D55301
2abdbe9d796419e8149705ffb4c81f0c0cdea05f Alexander Ziaee 2026-02-26 07:07:09
from(1): style fixes
No functional changes.
ffe7d45d295c553ed90ad3b5cc67111450063741 Mariusz Zaborski 2026-03-01 16:56:37

Contrib code

-- no commits in this category this week --

Reverted commits

-- no commits in this category this week --

Unclassified commits

Not classified automatically, and waiting for manual attention.

-- no commits in this category this week --

Technical notes

Dates:

Automatic grouping:

Automatic categories:

Source code:


Generated with commits-periodical 0.20 at 2026-04-06 17:21:55+00:00.

This work is supported by Tarsnap Backup Inc.

Alternate version: 2026-02-23 (debug) (contains info about the classification)