FreeBSD git weekly: 2026-04-20 to 2026-04-26

Introduction

This is a display of mostly-automatically-classified git commits from 2026-04-20 to 2026-04-26.

This report is still in progress.

DEBUG: This version of the report is primarily for checking the classifiers, and therefore contains extra information (in this colour).

Table of contents and commits per category:

(0) Highlighted commits (these are copies, not in stats)
1 2.2% Userland programs
5 11.1% Documentation
6 13.3% Hardware support
12 26.7% Networking
3 6.7% System administration
3 6.7% Libraries
2 4.4% Filesystems
6 13.3% Kernel
1 2.2% Build system
0 0.0% Internal organizational stuff
3 6.7% Testing
1 2.2% Style, typos, and comments
2 4.4% Contrib code
0 0.0% Reverted commits
0 0.0% Unclassified commits
45 100% total
Technical notes about this page

debug: info about the automatic classification

num % num changed stage
1 2.2% 0 01-style
5 11.1% 0 02-filenames_wildcards
3 6.7% 0 02b-filenames_wildcards2
26 57.8% 0 03-filenames_plain1
8 17.8% 0 04-filenames_plain2
1 2.2% 0 05-summary-prefix
1 2.2% 0 Manually-classified commits
0 0.0% 0 Unclassified commits

debug: more stats

num % stage
0 0.0% Misclassified commits
44 97.8% Classified commits, no corrections

debug: groups

0 0.0% num in revert
0 0.0% num in fixes
0 0.0% num in consecutive
0 0.0% Commits in groups

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.

-- no commits in this category this week --

Userland programs

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

caesar: Add SPDX-License-Identifier tags
Reviewed by:  imp
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55461
3cc113c94fb9635ba9f11f5dd797530b9231ca58 Tuukka Pasanen 2026-04-21 14:43:35

debug: classified in 04-filenames_plain2 by 'usr.bin/'

Documentation

Man pages, release notes, etc.

pfctl: clarify usage of load option flags
`pfctl -A`, `-N`, `-O`, and `-R` restrict which rule types and options
are loaded. The man page language ("Load only...") does not make it
clear that these options can be combined to (re)load multiple rule types
and/or options without reloading the entire packet filter.

Add language to make it explicitly clear that these flags combine.

Reviewed by:    kp
Signed-off-by:  Ross Williams <ross@ross-williams.net>
19eecf94fa16aac6f90a4610d2f342f70060674a Ross Williams 2026-04-17 15:19:23

debug: classified in 02-filenames_wildcards by '.*\.[1-9]'

membarrier.2: document MEMBARRIER_CMD_GET_REGISTRATIONS
Reviewed by:  markj, Ricardo Branco <rbranco@suse.com>
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D56507
324b3c2892a53e5fd9b1d8795a31a59ee835c5de Konstantin Belousov 2026-04-18 18:47:02

debug: classified in 02-filenames_wildcards by '.*\.[1-9]'

geom manuals: Clarify units
The gpart manual says that sizes are specified in blocks, unless an SI
unit suffix is provided. This confuses new operators because GEOM uses
binary bytes, a large difference at modern storage pool sizes. Rewrite
suffixes in all GEOM manuals to consistently clarify this, matching what
we and the rest of the industry have been doing in other documentation.
While here, use non-breaking spaces between numbers and units, unless
they are already written with a hyphen.

MFC after:              3 days
Reviewed by:            fuz
Reported by:            bbaovanc <bbaovanc@bbaovanc.com>
Differential Revision:  https://reviews.freebsd.org/D56534
975e3605ebb15cbaf5a25c1c9d1f51aed41291d0 Alexander Ziaee 2026-04-20 17:21:23

debug: classified in 02-filenames_wildcards by '.*\.[1-9]'

bsdinstall.8: Document DISTRIBUTIONS defaults correctly
Some targets override the default value of DISTRIBUTIONS.
Document that in the manual page.

Reported by:    Nia Alarie <nia@NetBSD.org>
Reviewed by:    jlduran
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D56528
4029e765436ff1633139c1afe1bc25185a0f4ef1 Mateusz Piotrowski 2026-04-20 15:52:25

debug: classified in 02-filenames_wildcards by '.*\.[1-9]'

src.conf.5: Regenerate
Last time I generated this, there were many copies of WITH_CASPER for
reasons unknown.

Sponsored by:           Netflix
e8156a7e5fffd0bf8dc09df542d9329b19bffecc Warner Losh 2026-04-21 15:23:58

debug: classified in 02-filenames_wildcards by '.*\.[1-9]'

Hardware support

Hardware drivers and architecture-specific code.

nvmf_che: Don't leak a socket if an error occurs finalizing the socket
If soreserve() or sosetopt() (to set TCP_NODELAY) fails after claiming
the socket from the file descriptor, explicitly close the socket
before returning failure.

Sponsored by:   Chelsio Communications
Differential Revision:  https://reviews.freebsd.org/D55493
505f381cb96ee25bcf0df11cfaf15a601d969500 John Baldwin 2026-04-20 17:18:04

debug: classified in 03-filenames_plain1 by 'sys/dev/'

amd64: fix INVLPGB range invalidation
AMD64 Architecture Programmer's Manual Volume 3 says the following:

> ECX[15:0] contains a count of the number of sequential pages to
> invalidate in addition to the original virtual address, starting from
> the virtual address specified in rAX. A count of 0 invalidates a
> single page. ECX[31]=0 indicates to increment the virtual address at
> the 4K boundary. ECX[31]=1 indicates to increment the virtual address
> at the 2M boundary. The maximum count supported is reported in
> CPUID function 8000_0008h, EDX[15:0].

ECX[31] being what we call INVLPGB_2M_CNT, signaling to increment the
VA by 2M.

> This instruction invalidates the TLB entry or entries, regardless of
> the page size (4 Kbytes, 2 Mbytes, 4 Mbytes, or 1 Gbyte). [...]

Combined with this, my interpretation of the current code is: if
<va> is aligned on a PDE boundary, we'll use INVLPGB_2M_CNT to try and
invalidate <cnt> PDEs with a single call, but that only works if <va> is
the start of at least <cnt> 2M pages.  Otherwise, if <va> or any of the
subsequent PDEs isn't actually a superpage, then we would actually only
invalidate the *first* page within the PDE before skipping to the next
PDE, leaving the remainder of the 4K pages in between as they were.

The implication would seem to be that we would need to inspect the range
that we're trying to invalidate if we're planning on using
INVLPGB_2M_CNT at all, so this patch just simplifies it to a series of
4K invalidations.  My gut feeling is that we likely still come out on
top vs. the TLB shootdown we're avoiding.

This seems to explain some issues we've seen lately with fdgrowtable()
and kqueue on recent Zen4/Zen5 EPYC hardware, where we'd experience
corruption that we can't explain.

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=293382
Reviewed by:    alc, kib, markj
Differential Revision:  https://reviews.freebsd.org/D56458
1b8e5c02f5c07521129e06ff8ab7c660238fd75c Kyle Evans 2026-04-20 20:18:17

debug: classified in 03-filenames_plain1 by 'sys/amd64/'

dpaa2: ni: add more stats and link information
In addition to the locally generated statistics counters, dpaa2 ni
provides a larger set of counters than we currently export via
sysctl.  Add (most of) the missing counters and descriptions.
Around Page 3/4 there are some things left to do if we want.
Also the manual was not clear on the descriptions of 3/0 and 3/1.

The second half of the change adds another sysctl note which exports
the link-state, speed, and capabilities set as a text-blob.  This is
especially interesting in case the "ni" stops passing packets.
From what I have found in that case the (internal) link state of the
ni goes DOWN but we do not see an interrupt for a link-state change.

Being able to diagnose the state helps to (manually) fix it for now
by changing the media status to 10BaseT or none and then back to auto.
That usually brings the internal link state back UP.

MFC after:      3 days
PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=279352
Reviewed by:    dsl, tuexen
Differential Revision: https://reviews.freebsd.org/D55321
c8cd633d78d04ff535960002ac9d1ab20f74b201 Bjoern A. Zeeb 2026-02-17 03:04:41

debug: classified in 03-filenames_plain1 by 'sys/dev/'

hwpmc: Implement IBS process sampling
This change enables process-wide sampling to work with IBS by ensuring
that read/write only gets or sets the current counter.

Reviewed by:    mhorne
Sponsored by:   Netflix
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2131
fd45987f1f66fe01b0cecede9e90c8aea5cae87e Ali Mashtizadeh 2026-04-07 23:30:51

debug: classified in 03-filenames_plain1 by 'sys/dev/'

ure: add USB device IDs for additional RTL8152/RTL8153 adapters
Add device IDs for several USB Ethernet adapters that use
RTL8152 and RTL8153 chips but are not yet recognized by ure(4).
This includes adapters from Cisco/Linksys, D-Link, Lenovo,
Microsoft Surface, Realtek, Samsung, and TP-Link.

All added devices use chip revisions already handled by
ure_read_chipver().

Signed-off-by: Christos Longros <chris.longros@gmail.com>

Reviewed by:    adrian
Differential Revision:  https://reviews.freebsd.org/D55748
76c082180719f42481289eb837e44b055efc003a Christos Longros 2026-04-21 14:14:09

debug: classified in 03-filenames_plain1 by 'sys/dev/'

powerpc: remove dead code call into x86 perfmon
FreeBSD and NetBSD has copied these lines from the x86 architecture when
porting to other machines and forgetting to delete them.

Reviewed by:    mhorne
Sponsored by:   Netflix
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2154
0ac31026e1e0fb4e4b8a2eaa8ce2ead6a945dc6e Ali Mashtizadeh 2026-04-20 22:23:57

debug: classified in 03-filenames_plain1 by 'sys/powerpc/'

Networking

Network-related commands, library, and kernel.

sctp: initialize inp to avoid uninitialized use
If we take an early goto out_unlocked inp is uninitialized and then
may be used in SCTP_LTRACE_ERR_RET().  Initialize inp to NULL
to avoid warnings.

Found with:     gcc15 tinderbox build
MFC after:      3 days
Reviewed by:    tuexen, pouria
Differential Revision: https://reviews.freebsd.org/D56503
4cdbcc2b6a2e551529f7133665ef406869b48bf7 Bjoern A. Zeeb 2026-04-18 13:25:18

debug: classified in 03-filenames_plain1 by 'sys/netinet/'

pf: be more robust against interface name conflicts
pf assumes that interface names are unique (and share a namespace with
interface group names).
Unfortunately the FreeBSD network stack has a few edge cases where this
assumption can be violated. Try to be more robust against this: rather
than changing the association between a kif and ifp just ignore the next
interface with the same name.

Sponsored by:   Rubicon Communications, LLC ("Netgate")
ff76ec3e9b287df9378f09ce29eca668162903f4 Kristof Provost 2026-04-20 09:22:13

debug: classified in 03-filenames_plain1 by 'sys/netpfil/'

pf: Use MTX_DUPOK to initialize hash chain mutexes
pf_udp_mapping_insert() may lock more than one row at a time.

Fixes:          https://cgit.freebsd.org/src/commit/?id=cd5ff4e841fb ("pf: use hashalloc(9) for key, id, src-node and udp-endpoint hashes")
Reviewed by:    kp
Differential Revision:  https://reviews.freebsd.org/D56501
ffad36e1d7002a7da751856b28eb50c36b137abb Mark Johnston 2026-04-20 16:48:40

debug: classified in 03-filenames_plain1 by 'sys/netpfil/'

iflib: Add a missing CURVNET_RESTORE() in the error path
Signed-off-by:        Peter Ganzhorn <peter.ganzhorn@gmail.com>
Reviewed by:    zlei
Fixes:          https://cgit.freebsd.org/src/commit/?id=6d49b41ee84b iflib: Add pfil hooks
MFC after:      3 days
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2150
f49f61f19463c21125bb1215cf8e0530f52953e3 Peter Ganzhorn 2026-04-20 16:59:59

debug: classified in 03-filenames_plain1 by 'sys/net/'

ctld: Return from the inner "main" loop on EINTR
This ensures that child processes are reaped in the outer loop in
main().

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294035
Reviewed by:    asomers
Fixes:          https://cgit.freebsd.org/src/commit/?id=66b107e82b2f ("ctld: Use kevent(2) for socket events rather than select(2)")
Sponsored by:   Chelsio Communications
Differential Revision:  https://reviews.freebsd.org/D56525
e56687bb2d32ee4b1774300f3960427ca56b34bb Nikolay Denev 2026-04-20 17:18:50

debug: classified in 03-filenames_plain1 by 'usr.sbin/ctld/'

ctld: Support multiple physical ports in a target
PR:           https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=293076
Reported by:    Ken J. Thomson <thomsonk@yandex.com>
Reviewed by:    asomers
Fixes:          https://cgit.freebsd.org/src/commit/?id=969876fcee57 ("ctld: parse config file independently of getting kernel info")
Sponsored by:   Chelsio Communications
Differential Revision:  https://reviews.freebsd.org/D55767
7bb2b3801554a58039ed9d1fd05b65ce24c6c661 John Baldwin 2026-04-20 17:19:25

debug: classified in 03-filenames_plain1 by 'usr.sbin/ctld/'

ctld: Update nchildren directly in wait_for_children
This results in slightly less duplicated code.

Reviewed by:    asomers
Sponsored by:   Chelsio Communications
Differential Revision:  https://reviews.freebsd.org/D56526
4b79ee8eb139696c1fe845d25a56439d02ab4131 John Baldwin 2026-04-20 17:19:49

debug: classified in 03-filenames_plain1 by 'usr.sbin/ctld/'

pf: do not allow flags to be changed with securelevel set
With securelevel set (for pf that means >= 3) we're expected to reject
rule changes. However, we allowed interface flags to be changed, which
would allow 'set skip on X' to be changed.

Remove DIOCSETIFFLAG and DIOCCLRIFFLAG from the securelevel whitelist.

MFC after:      1 week
Reported by:    cyberkittens
Sponsored by:   Rubicon Communications, LLC ("Netgate")
d5ca00f2d8743f0885c17f50c8c011cae285fbdb Kristof Provost 2026-04-13 13:48:39

debug: classified in 03-filenames_plain1 by 'sys/netpfil/'

pf: only allow a subset of netlink calls when securelevel is set
Extend the genl_cmd struct to allow calls to also carry a securelevel.
If that's set compare the current securelevel to only allow the call if
the level is lower than that.

If no value is specified continue to allow calls in any securelevel,
as before.

This allows us to easily implement the same securelevel restrictions for
pf as we have for the corresponding ioctls.

Reviewed by:    glebius
MFC after:      1 week
Sponsored by:   Rubicon Communications, LLC ("Netgate")
Differential Revision:  https://reviews.freebsd.org/D56390
9933bdcb12641839b7396ccd0c6b8a2d55d12744 Kristof Provost 2026-04-20 06:36:17

debug: classified in 03-filenames_plain1 by '['sys/netlink/', 'sys/netpfil/']'

loopback: fix use-after-free
Once we hand an mbuf over to netisr_queue() we may no longer access it.
Save the length before the call so we can use it to increment counters
afterwards.

Fixes:          https://cgit.freebsd.org/src/commit/?id=956acdce0505 ("loopback: Account for packet drops")
Sponsored by:   Rubicon Communications, LLC ("Netgate")
07a3501e6c85baa4236061f8af4c2772307835f4 Kristof Provost 2026-04-21 09:19:26

debug: classified in 03-filenames_plain1 by 'sys/net/'

inpcb: remove always true condition in in_pcblookup_local()
We are searching through the hash that has only wildcard bindings.
This was missed by fdb987bebddf05e15a5af840379c7715a94aec1c.

Reviewed by:            markj
Differential Revision:  https://reviews.freebsd.org/D56488
14a47a8bed8758abd7ea6ced14e8a8d9bd2c97bc Gleb Smirnoff 2026-04-21 16:10:49

debug: classified in 03-filenames_plain1 by '['sys/netinet/', 'sys/netinet6/']'

tests/sys/netinet/tcp_hpts: Make a socket available in mock inpcbs
After commit 9b76228006d8, tcp_hptsi() dereferences inp_socket in order
to get the inpcb's VNET.  This means that mock inpcbs created by the
HPTS test fixture must set inp_socket.  Also set the current VNET there;
previously, it was NULL, and this was not noticed since VNET_DEBUG is
disabled even in debug kernels.

Fixes:  https://cgit.freebsd.org/src/commit/?id=9b76228006d8 ("inpcb: retire inp_vnet")
69e8d8b49d4bd889a42ba354f290f05d88bcd4b1 Mark Johnston 2026-04-21 14:31:18

debug: classified in 03-filenames_plain1 by 'sys/netinet/'

System administration

Stuff in man section 8 (other than networking).

pfctl: fix man page and error message for -S option
The `pfctl -S` flag was added to disable DNS resolution in
<https://reviews.freebsd.org/D50724> but documentation and error
messages refer to a `pfctl -N` flag for the same purpose. The `pfctl -N`
flag performs an unrelated function, so the docs and error messages need
to be changed. Caught this when revising documentation for the `-N`
flag.

Reviewed by:    kp
Signed-off-by:  Ross Williams <ross@ross-williams.net>
18de44e7b44209d94999523a93d83031e26a5719 Ross Williams 2026-04-17 15:20:18

debug: classified in 03-filenames_plain1 by 'sbin/'

rtld: fix processing of preloaded z_initfirst objects
After we found some preloaded z_initfirst object, we must process till
the end of the preload list still, not stopping on the first found
object.

Reported by:    des
Reviewed by:    des, markj, siderop1@netapp.com
Fixes:  https://cgit.freebsd.org/src/commit/?id=78aaab9f1cf359f3b7325e4369653f6b50593393
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D56466
9b844b495e8e63439ffe523757ac7444a16317af Konstantin Belousov 2026-04-16 23:07:43

debug: classified in 03-filenames_plain1 by 'libexec/'

ifconfig: Fix segfault in geneve_status_nl
Initialize nla_geneve_link structure to zero to prevent
segfault when a TLV is not received by the netlink parser.

Reported by:    Seth Hoffert <seth.hoffert@gmail.com>
Fixes:          https://cgit.freebsd.org/src/commit/?id=688e289ee904 ("ifconfig: Add support for geneve (netlink)")
d95a73b4c7e314084f838c7b68ae9da8e4ba2982 Pouria Mousavizadeh Tehrani 2026-04-21 12:17:00

debug: classified in 03-filenames_plain1 by 'sbin/'

Libraries

libvmmapi: Check for allocation failure in vm_vcpu_open()
vm_vcpu_open() really should check the value returned from malloc() and
return NULL on failure. Also, all users of vm_vcpu_open() need to check
the returned value for NULL, too.

Reviewed by:    corvink, markj
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D56346
91f03cde6604fdb940f30d81e4860118ee07f4b3 Hans Rosenfeld 2026-04-20 15:14:16

debug: classified in 05-summary-prefix by 'lib.*:'

geom_part: Restore the human readable format of size
Prior to the change 4f809ffec69c, the sizes are formated by
humanize_number(3) with the flag HN_DECIMAL, which displays the result
using one decimal place when it is less than 10. That is more accurate
and useful. Add equivalent field modifier hn-decimal to xo_emit() to
restore the previous behavior.

Reported by:    Mark Millard
Reviewed by:    js
Fixes:          https://cgit.freebsd.org/src/commit/?id=4f809ffec69c gpart: add libxo support for "show" subcommand + man page updates
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D56514
0d16792c6e983005581ed0176ed81e7302582196 Zhenlei Huang 2026-04-20 16:59:59

debug: classified in 04-filenames_plain2 by 'lib/'

include/stdbit.h: declare size_t, (u)int*_t, and (u)int_least*_t
These are required by ISO/IEC 9899:2024 § 7.18.1 ¶ 1 but were forgotten
in my initial work.

The current approach leaks intptr_t, uintptr_t, intmax_t, and uintmax_t
through <sys/_stdint.h>.  This could be avoided using a more complicated
approach if desired.

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294131
Fixes:          https://cgit.freebsd.org/src/commit/?id=6296500a85c8474e3ff3fe2f8e4a9d56dd0acd64
Reported by:    Collin Funk <collin.funk1@gmail.com>
Reviewed by:    imp
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D56515
c8c9324c94dfd4eeecbcfe4a1d3daa047420d3e5 Robert Clausecker 2026-04-19 12:36:34

debug: Commit manually moved from "unknown" to "libs".

Filesystems

nfs: make no-IP kernels compile
Compiling a LINT-NOIP kernel (assumingly also a NOINET) port and ip
are set but not used in nfsrv_getclientipaddr().

Hide the variables behind #ifdef checks and do likewise for the parsing
results.  Admittingly the code probably wants to be rewritten one day.

Found with:     gcc15 tinderbox build
MFC after:      3 days
Reviewed by:    rmacklem
Differential Revision: https://reviews.freebsd.org/D56502
395c8f0855e0039205d9cb97adec39d9b9307c8b Bjoern A. Zeeb 2026-04-18 13:27:39

debug: classified in 03-filenames_plain1 by 'sys/fs/'

fusefs: better handling for low-memory conditions
Under conditions of low memory, getblk can fail.  fusefs was not
handling those failures very systematically.  It was always using
PCATCH, which appears to have been originally copy/pasted from the NFS
client code, but isn't always appropriate:

* During fuse_vnode_setsize_immediate, which can be called from many
  different VOPs and from the vn_delayed_setsize mechanism, remove
  PCATCH.  Some of these callers cannot tolerate allocate failure.

* In fuse_inval_buf_range, don't assume that getblk will always succeed.

* When calling fuse_inval_buf_range from VOP_ALLOCATE,
  VOP_COPY_FILE_RANGE, or VOP_WRITE (with IO_DIRECT), return EINTR if
  the allocation fails.

* When calling fuse_inval_buf_range from VOP_DEALLOCATE, remove PCATCH.
  This VOP must not fail with EINTR.

No new tests, because I can't force any particular getblk call to fail.

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=293957
Sponsored by:   ConnectWise
Reported by:    zjk7@wp.pl
MFC after:      1 week
374548e930bd9452351059c14e697036d903b1c4 Alan Somers 2026-03-30 14:22:07

debug: classified in 03-filenames_plain1 by 'sys/fs/'

Kernel

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

membarrier(2): use atomic for lockless read of curproc->p_flag2
Reviewed by:  markj, Ricardo Branco <rbranco@suse.com>
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D56507
950fd59955e10429c1325c327f0141a7e97fcfe5 Konstantin Belousov 2026-04-18 18:42:56

debug: classified in 04-filenames_plain2 by 'sys/'

membarrier(2): implement the MEMBARRIER_CMD_GET_REGISTRATIONS command
Reported by:  Ricardo Branco <rbranco@suse.com>
Reviewed by:    markj, Ricardo Branco <rbranco@suse.com>
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D56507
aaa10396a997bafc28ce6551e92563620caf3df4 Konstantin Belousov 2026-04-18 18:43:59

debug: classified in 04-filenames_plain2 by 'sys/'

audit: Fix logging of IPv6 addresses
- kaudit_to_bsm: Log IPv6 as well as IPv4 and unix addrs
- au_to_sock_inet128: Treat ports the same way as au_to_sock_inet32() as
  just pushing a uint16 causes byte ordering problems on little endian.

Differential Revision: https://reviews.freebsd.org/D39633
Sponsored by: Netflix
Reviewed by: csjp
16de94eaf09b75a9a1e90254a6fe5812f55f4cab Andrew Gallatin 2026-04-20 21:35:46

debug: classified in 04-filenames_plain2 by 'sys/'

tty: Avoid leaving dangling pointers in tty_drop_ctty()
The TIOCNOTTY handler detaches the calling process from its controlling
terminal.  It clears the link from the session to the tty, but not the
pointers from the tty to the session and process group.  This means that
sess_release() doesn't call tty_rel_sess(), and that pgdelete() doesn't
call tty_rel_pgrp(), so the pointers are left dangling.

Fix this by clearing pointers in tty_drop_ctty().  Add a standalone
regression test.

Approved by:    so
Security:       FreeBSD-SA-26:10.tty
Security:       CVE-2026-5398
Reported by:    Nicholas Carlini <npc@anthropic.com>
Reviewed by:    kib, kevans
Fixes:          https://cgit.freebsd.org/src/commit/?id=1b50b999f9b5 ("tty: implement TIOCNOTTY")
Differential Revision:  https://reviews.freebsd.org/D56046
093903a8d4c05d1adff79895a52a3e3009ff07a7 Mark Johnston 2026-03-23 15:22:48

debug: classified in 04-filenames_plain2 by 'sys/'

pkru: Fix handling of 1GB largepage mappings
pmap_pkru_update_range() did not handle the case where a PDPE has PG_PS
set.  More generally, the SET_PKRU and CLEAR_PKRU sysarch
implementations did not check whether the request covers a "boundary" vm
map entry.  Fix this, add the missing PG_PS test, and add some tests.

Approved by:    so
Security:       FreeBSD-SA-26:11.amd64
Security:       CVE-2026-6386
Reported by:    Nicholas Carlini <npc@anthropic.com>
Reviewed by:    kib, alc
Differential Revision:  https://reviews.freebsd.org/D56184
ca87c0b8e396fff01d55f1985c2556934c35a950 Mark Johnston 2026-03-31 13:37:43

debug: classified in 04-filenames_plain2 by 'sys/'

epoch: Don't idle CPUs when there's pending epoch work
The epoch(9) subsystem implements per-CPU queues of object destructors
which get invoked once it is safe to do so.  These queues are polled via
hardclock().

When a CPU is about to go idle, we reduce the hardclock frequency to 1Hz
by default, to avoid unneeded wakeups.  This means that if there is any
garbage in these destructor queues, it won't be cleared for at least 1s
(and possibly longer) even if it would otherwise be safe to do so.

epoch_drain_callbacks() is used in some places to provide a barrier,
ensuring that all garbage present in the destructor queues is cleaned up
before returning.  It's implemented by adding a fake destructor in the
queues and blocking until it gets run on all CPUs.  The above-described
phenomenon means that it can take a long time for these calls to return,
even (especially) when some CPUs are idle.  This causes long delays when
destroying VNET jails, for instance, as epoch_drain_callbacks() is
invoked each time a network interface is destroyed.

Work around this problem by not disabling the hardclock timer if there
is garbage present in the destructor queues.  The implementation of
epoch_drain_callbacks() has other problems, but this small change on its
own gives a good improvement, especially when running networking
regression tests.  Moreover, we should aim to invoke destructors in a
timely manner, so the change is generally beneficial.

Reviewed by:    glebius
MFC after:      1 month
Differential Revision:  https://reviews.freebsd.org/D56508
dce56594991464c276f340ce963d0f5461566c78 Mark Johnston 2026-04-21 14:28:31

debug: classified in 04-filenames_plain2 by 'sys/'

Build system

src.opts.mk: Sort options
Sort the options in each of the sections alphabetically.

Sponsored by:           Netflix
3d2fd7178663fa5314f6e90bb041c3bfb3b1bbaf Warner Losh 2026-04-21 15:23:20

debug: classified in 03-filenames_plain1 by 'share/mk/'

Internal organizational stuff

-- no commits in this category this week --

Testing

tests/socket_afinet: Fix the bind_connected_port test
The test verifies that a socket can bind to a local address assigned by
connect(2) to a different socket.  It was however trying to bind to the
wrong address, and the check of the result was inverted, so this went
unnoticed.  It also needs to set SO_REUSEADDR for this to succeed.

Reported by:    glebius
MFC after:      1 week
d3d0466cae546254c50c80cf3e0c060bbbbba53c Mark Johnston 2026-04-20 15:07:20

debug: classified in 02b-filenames_wildcards2 by 'tests\/.*'

tests/aio: Avoid skipping zvol tests
The underlying bugs which caused them to be flaky are now fixed.

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=258766
9592b0870c83c1e70f162cf16a5f0645895d1d9b Mark Johnston 2026-04-20 16:16:28

debug: classified in 02b-filenames_wildcards2 by 'tests\/.*'

tests/sys/net: Set require.kmods where appropriate
30b7621d46cc06053c0cb40bb691fbcecbfdab7f Mark Johnston 2026-04-21 14:30:36

debug: classified in 02b-filenames_wildcards2 by 'tests\/.*'

Style, typos, and comments

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

conf: remove trailing whitespace
This prevents unwanted change when saving files on IDEs (e.g. VSCode,
Zed)

Signed-off-by: Minsoo Choo <minsoo@minsoo.io>
Sponsored by:   The FreeBSD Foundation
Pull request:   https://github.com/freebsd/freebsd-src/pull/2152
a338f5a0e7b1b5c22595aacbac44582ed5e0fe86 Minsoo Choo 2026-04-20 03:08:01

debug: classified in 01-style by '[wW]hitespace'

Contrib code

zfs: Fix the build on 32-bit platforms
Fixes:                https://cgit.freebsd.org/src/commit/?id=d8fbbd371ca1 ("zfs: merge openzfs/zfs@https://cgit.freebsd.org/src/commit/?id=1644e2ffd")
Reported by:    Jenkins
019a4878831cee46a8df79bd4b7c1ea93db0a7a8 Mark Johnston 2026-04-20 16:17:08

debug: classified in 03-filenames_plain1 by 'sys/contrib'

rtw89: fix mismerge
Due to FreeBSD-specific code it seems a code update was not applied
to the FreeBSD part during the v6.17 driver update.
Add the missing lines.

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
Fixes:          https://cgit.freebsd.org/src/commit/?id=b35044b38f74c
adb16cd389c3456cbd538b658c3c0af5145dde91 Bjoern A. Zeeb 2025-12-03 22:13:10

debug: classified in 03-filenames_plain1 by 'sys/contrib'

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-21 17:15:22+00:00.

This work is supported by Tarsnap Backup Inc.

Alternate version: 2026-04-20 (release)