FreeBSD git weekly: 2026-06-01 to 2026-06-07

Introduction

This is a display of mostly-automatically-classified git commits from 2026-06-01 to 2026-06-07.

Table of contents and commits per category:

(1) Highlighted commits (these are copies, not in stats)
4 2.6% Userland programs
10 6.5% Documentation
19 12.3% Hardware support
8 5.2% Networking
44 28.6% System administration
4 2.6% Libraries
7 4.5% Filesystems
30 19.5% Kernel
6 3.9% Build system
2 1.3% Internal organizational stuff
7 4.5% Testing
4 2.6% Style, typos, and comments
5 3.2% Contrib code
4 2.6% Reverted commits
0 0.0% Unclassified commits
154 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.

fs/msdosfs: add support for file namws with surrogate pairs
Long file names are using UTF-16 symbols to represent international or
special characters. The implementation in FreeBSD did not support the
"Supplementary Private Use Area-B" (PUA-B), which requires a surrogate
pair to be represented in UTF-16 (Unicode code points beyond U+FFFF).

The PUA-B is used to represent emoji characters, which are supported
in file names on other common operating systems. The motivation for
this change was that removable media written on another system were
only partially readable on FreeBSD, since they contained emojis in
file names.

A test script that verifies correct operations on files names with
emojis has been added to the tools/test/stress2/misc directory under
the name msdos24.sh.

Reported by:    Fabian Keil <fk@fabiankeil.de>
Reviewed by:    ib
Approved by:    mkcusick
MFC after:      1 week
Relnotes:       yes
Differential Revision:  https://reviews.freebsd.org/D57313
f983cb362de77773efba8975eb0f4b247ce5e6f9 Stefan Eßer 2026-06-01 05:50:22

Userland programs

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

sh: Fix pipebuf limit
Since the factor is not 1, we need to provide a unit.

MFC after:      1 week
Fixes:          https://cgit.freebsd.org/src/commit/?id=5d92f20c7d31 ("bin/sh: support RLIMIT_PIPEBUF")
Reviewed by:    kib
Differential Revision:  https://reviews.freebsd.org/D57352
dfd2273d27627313f944650840381e878077e825 Dag-Erling Smørgrav 2026-06-01 08:51:24
xinstall: Do not allow -l and -s together
Cannot strip the target if creating a link.

Reviewed by:    des
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57398
521afce6a859c1d7ac9674e8f21ff45418becaf5 Ed Maste 2026-06-03 01:27:54
diff: Correct fd 0 case on pipe
After git commit c8d40bf8ecc60cc15e3904410db62065ea681fdc, if fd 0 was
not open, it is left with CLOEXEC set and therefore fails. This is an
unlikely situation, but fixing it reduces the size of the code (by using
posix_spawn_file_actions_adddup2's special case if the two file
descriptor numbers are the same).

At the same time, check the error code from
posix_spawn_file_actions_adddup2.

Reviewed by:    bapt
Differential Revision:  https://reviews.freebsd.org/D56910
8bf4902569869133affd91bdcb71b74656cfc36e Jilles Tjoelker 2026-06-03 20:42:01
limits: Fix pipebuf resource type
* pipebuf is a size but is listed as a count

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295623
MFC after:      1 week
Fixes:          https://cgit.freebsd.org/src/commit/?id=f54f41403d14 ("usr.bin/limits: support RLIMIT_PIPEBUF")
Reviewed by:    kib
Differential Revision:  https://reviews.freebsd.org/D57456
ad524568f9fb77e270a22744d81b9cea0a2ab0eb Dag-Erling Smørgrav 2026-06-04 22:41:41

Documentation

Man pages, release notes, etc.

open.2: document O_PATH behavior for bindat/connectat
Reviewed by:  markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D57370
5d36fcc53d3d1c05a3bbac45e9d5409156e216f1 Konstantin Belousov 2026-06-02 13:46:37
install.1: Document options incompatible with -s
Reported by:  des
Reviewed by:    ziaee
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57409
b49021b49a78ca6a9e3a1a59c5aa6f2fec503afb Ed Maste 2026-06-03 15:35:59
install.1: Convert link flags to a table
The five link flags get lost in prose.

Reviewed by:    ziaee
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57418
248dd56d2dea03e4723e8225b890d02fcc10973f Ed Maste 2026-06-03 17:50:51
dhclient.conf.5: Correct crossreference
PR:           https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=285614
Reviewed by:    ziaee, michaelo, jrm
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D49489
f4424a2733867ec5f12ecd196011ce8df096f522 Jim Brown 2026-06-05 14:59:32
arch.7: arch.7: Add wchar_t signedness
Most architectures have the same signedness for char and wchar_t, but
powerpc has the unusual combination of unsigned char and signed wchar_t.

Reviewed by:    des, jhb, markj
Sponsored by:   The FreeBSD Foundation
5805fadd0dd756ce28b0662dc6588f295916340e Ed Maste 2026-06-05 16:14:26
Commit group #0: arch.7: Remove 32-bit powerpc from tables
arch.7: Remove 32-bit powerpc from tables

Most 32-bit architecture support has been deprecated for FreeBSD 16.

Reviewed by:    des
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57472
2ea49bb595df216f4374d5e1035ab2c818d3ceef Ed Maste 2025-08-26 17:45:28

arch.7: Restore (non-SPE) 32-bit powerpc to MD tables

powerpc is still relevant for lib32.  powerpcspe cannot use lib32 so
remains removed.

Reported by:    Minsoo Choo <minsoo@minsoo.io>
Reviewed by:    Minsoo Choo <minsoo@minsoo.io>
Sponsored by:   The FreeBSD Foundation
Fixes: https://cgit.freebsd.org/src/commit/?id=2ea49bb595df ("arch.7: Remove 32-bit powerpc from tables")
Differential Revision: https://reviews.freebsd.org/D57473
c2631d1623f45df4379c7373f1c639c575679785 Ed Maste 2026-06-05 17:00:45
fts: Correct description of fts_set
MFC after:    1 week
Sponsored by:   Klara, Inc.
Fixes:  https://cgit.freebsd.org/src/commit/?id=e030e4e73fe7 ("lib/libc/gen/fts.3: use 'options' consistently in fts_set() description")
Differential Revision:  https://reviews.freebsd.org/D57326
77fdeba18c07e243ea1e20916ee0dc31b9d6ac32 Dag-Erling Smørgrav 2026-06-05 16:46:49
nuageinit: update documentation for phone_home and final_message
bad3c15dffea69ea84f95489d26a86ad0498d942 Baptiste Daroussin 2026-06-06 06:17:04
qsort.3: Document mergesort() behaviour on size overflow
Signed-off-by:        Faraz Vahedi <kfv@kfv.io>
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2243
Reviewed by:    fuz
MFC after:      1 week
26a1180cd1521e4c438ac95a57b134e27ea0a72d Faraz Vahedi 2026-06-02 09:12:59

Hardware support

Hardware drivers and architecture-specific code.

Commit group #1: ig4iic: Add PantherLake IDs
ig4iic: Add PantherLake IDs

MFC after:      2 weeks
Sponsored by:   Framework Computer Inc
Signed-off-by: Daniel Schaefer <dhs@frame.work>
39e297bf54a57a17d8b44c20e502d6f2c6db08f6 Daniel Schaefer 2026-05-31 11:18:31

spi: Remove incorrect pci id

This id is for SPI flash instead of spi bus

Fixes: https://cgit.freebsd.org/src/commit/?id=39e297bf54a5 ("ig4iic: Add PantherLake IDs")
MFC after:      2 weeks
Sponsored by:  The FreeBSD Foundation
Sponsored by:  Framework Computer Inc
4ccbceefeb0f2898e2e4bb951862125d0bc5ce34 ShengYi Hung 2026-06-01 08:41:12
amd64: do not switch back and restore UEFI IDT in wrmsr_early_safe_end()
The memory where the pre-OS IDT was located might be already consumed by
kernel.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D57321
606d3cb1be5fd594c1f51addd063e7c13e16bdbc Konstantin Belousov 2026-05-29 07:32:41
amd64: there is no reason to copy ucode around in ucode_load_bsp()
PR:   https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294630
Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differrential revision: https://reviews.freebsd.org/D57368
16f21c5af35002b8361ffb2e83ff3c92cd899a3a Konstantin Belousov 2026-05-30 15:57:46
hwpstate_intel: Disable package control on hybrid CPU
In package control mode, the performance of all cores depends on the
most recent value written to the request field. If the last write comes
from an E-core, all cores are forced to align with the E-core
performance level, resulting in significant performance degradation.
Therefore, package control is disabled on hybrid-core systems.

Reviewed by:    olce
MFC after:      2 weeks
Sponsored by:   The FreeBSD Foundation
Sponsored by:   Framework Computer Inc
Differential Revision: https://reviews.freebsd.org/D57377
7b26353a59d66dc1bc611fd042a49b9e3bd13699 ShengYi Hung 2026-06-01 09:46:37
linux: Add linux_pt_fpregset and bsd_to_linux_fpregset() for amd64
Add struct linux_pt_fpregset, the amd64 Linux NT_PRFPREG payload,
corresponding to user_i387_struct in Linux. The struct describes
the 512-byte FXSAVE area as exposed by PTRACE_GETREGSET.

Add bsd_to_linux_fpregset() to translate from FreeBSD's struct fpreg
to struct linux_pt_fpregset. Fields are extracted from the fpr_env[]
array which stores the FXSAVE environment packed as four 64-bit words.
The FP and XMM register banks are bulk-copied as opaque byte arrays.

Signed-off-by:  Ricardo Branco <rbranco@suse.de>
Reviewed by:    kib
Pull-Request:   https://github.com/freebsd/freebsd-src/pull/2165
b84d31ee74535a0026ff83f2a34c07b7557f9785 Ricardo Branco 2026-04-26 14:43:59
asmc: add MMIO backend for T2 Macs
T2 Macs (2018+) expose the SMC via memory-mapped registers instead of
I/O ports. Add asmcmmio.c/asmcmmio.h implementing the MMIO transport:
key read/write, getinfo, getbyindex, and a poll-based wait with
exponential backoff.

The driver probes for MMIO at attach time by checking the LDKN firmware
version key; if MMIO is available it is used, otherwise the standard
I/O port backend is used.

T2 fan speeds use IEEE 754 floats instead of fpe2 fixed-point.
Per-fan manual mode uses F%dMd keys instead of the FS! bitmask.
Battery charge limit is exposed via dev.asmc.N.battery_charge_limit.

Tested on:
  MacBookPro16,2 (A2251, iBridge2,10)
  MacBookPro15,4 (A2159, iBridge2,8)
  MacBookAir8,2  (A1932, iBridge2,5)
  Mac mini 8,1   (A1993, iBridge2,7)
  iMac20,2       (A2115, iBridge2,16)
  iMacPro1,1     (A1862, iBridge1,1)

MFC after:      2 weeks
Reviewed by:    ngie, adrian
Differential Revision:  https://reviews.freebsd.org/D57086
a48b900300ebdbd5c47e664b4cc06e705da91bd8 Abdelkader Boudih 2026-06-03 05:57:49
Commit group #2: cxgbe(4)
cxgbe(4): Use backdoor access to read SGE context on T7

This avoids a firmware bug where it crashes when accessing SGE context
on a secondary core.

MFC after:      1 week
Sponsored by:   Chelsio Communications
c029d04671e904ce7e194fb441704b6a814f40f5 Navdeep Parhar 2026-06-03 05:07:31

cxgbe(4): Do not read indirect INT_CAUSE registers directly

Some of the registers added in a172f9e5b3cf are not directly accessible
and should be avoided.

Fixes:          https://cgit.freebsd.org/src/commit/?id=a172f9e5b3cf cxgbe(4): Improvements to the slow interrupt handler
MFC after:      1 week
Sponsored by:   Chelsio Communications
4b6887e3863881ff3be447c00fa2ae0c563550c5 Navdeep Parhar 2026-06-01 23:36:36

cxgbe(4): Use correct FID in KTLS tx work requests

MFC after:      1 week
Sponsored by:   Chelsio Communications
309fc9f765917fa032cdae7043bafffb6da5713b Navdeep Parhar 2026-06-03 05:16:13
kern: ofw: provide ofw_bus_destroy_iinfo to teardown interrupt-map
For symmetry with ofw_bus_setup_iinfo, the next commits will use it to
properly cleanup on failure in bcm2838_pci.

Reviewed by:    andrew
Differential Revision:  https://reviews.freebsd.org/D56895
b230a7b9a52c0fc948f4f1dcd1225a94674073f6 Kyle Evans 2026-05-09 02:42:50
pci: pci_host_generic: provide cleanup methods outside of detach
If device_attach() fails, we're expected to actually cleanup after
ourselves because device_detach() will not be called.  Factor out the
cleanup bits that don't rely on attach having actually succeeded so
that we can cleanup properly in bcm2838_pci.

Reviewed by:    andrew, imp
Differential Revision:  https://reviews.freebsd.org/D56896
31a94ec32b53ebf6227bc868ce4f7aa07650680d Kyle Evans 2026-05-09 02:46:24
pci: bcm2838: cleanup on attach failure to fix devmatch panic
Specifically on the RPi CM4, we currently don't set the controller up
right and it never moves into the ready state (we don't observe the link
active bit).  Failure to cleanup here actually results in a panic not
long after, due to a use-after-free in the rman bits.  Further down in
pci_host_generic, we have some rman stashed in the softc that are
initialized and placed onto the rman tailq, then the softc is later
freed without an rman_fini() to pull them off of the tailq properly.

Note that PCIe on this board won't come up at boot without something
plugged in, so it currently can't be booted with an empty slot with the
intent to hotplug a supported card.  Some issues with controller startup
have been observed with Broadcom NICs in the wild, but no problems have
been observed with other NICs and a variety of different PCIe cards.

Shout-out to Vince <git@darkain.com> for the extensive debugging and
analysis to arrive at this conclusion.

Reviewed by:    andrew, imp
Differential Revision:  https://reviews.freebsd.org/D56897
a05af6ddf9016e4ea4f0b361aa674e7ece6fe7ec Kyle Evans 2026-05-09 02:49:35
arm64: Expose ESR in mcontext
At present, the exception syndrome register (ESR) is not accessible via
the user context on FreeBSD AArch64, which makes it difficult to
determine the cause of an exception. For example, a signal handler might
get a `SIGSEGV` with `SEGV_ACCERR`, but it can't know whether that
occurred due to a bad read or write. The change implemented here
includes ESR in `struct __mcontext`, thereby allowing access via
`ucontext_t` for use by signal handlers, sanitizers, debuggers, etc.

Note that this addition consumes one of the seven spare 64-bit slots in
`struct __mcontext`.

Signed-off-by: Alex Arslan <ararslan@comcast.net>
Reviewed by:    andrew
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2053
0b862a795a3500b07aa757ce7b457c9bf198e2b1 Alex Arslan 2026-02-27 21:51:28
linux: Drop unneeded PHOLDs
There's no point in acquiring a hold if the proc lock isn't going to be
dropped.

Reviewed by:    kib
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D57468
2404d8d741f281e445233f86b0734d6dcf02c173 Mark Johnston 2026-06-05 16:28:18
vt: Avoid integer overflow in CONS_HISTORY ioctl
Reviewed by:  markj, vexeduxr
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57250
0ae946e7223df5ef3f7980af1d774d7f593f6421 Ed Maste 2026-05-26 16:19:47
APEI: Provide more info on fatal hardware errors
This change refactors fatal error delivery via APEI and prints more info:

- Makes the NMI handler call into the ge handler to establish a common
        code flow, no matter how the error is delivered
- Adds the FRU to the panic string so as to provide more information than
        just "APEI Fatal Hardware Error!" such as
        "APEI Fatal Hardware Error: PcieError"
- Prints more details about fatal pcie errors.  Note that we skip acquiring
        Giant on fatal errors
- Hexdumps the full GED data on fatal errors, so as to facilitate
        offline data analysis

Reviewed by: imp
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D57417
16e5abf415baf801c6d7c7948a742aeda75e2237 Andrew Gallatin 2026-06-06 00:07:03
fix(fwe): add missing net epoch around ether_input
Wrap the if_input() call in fwe_as_input() with NET_EPOCH_ENTER/EXIT.
The network stack requires epoch protection when delivering packets
via if_input, and fwe was missing it.

Reviewed by:    adrian
Differential Revision:  https://reviews.freebsd.org/D57459
a620746da173d1583b342b096419297e33d0ed15 Abdelkader Boudih 2026-06-06 20:08:59
firewire: clean up XXX comments
Remove stale and misleading XXX comments throughout firewire.c.
Most were from the original 2002 codebase and either described
correct behavior or noted aspirational improvements that never
happended.

Two actionable items retained as TODO: config ROM CRC validation
and pending xfer cleanup on detach.

Reviewed by:    adrian
Differential Revision:  https://reviews.freebsd.org/D57466
4a299ef19c7ed20aca6593a1c01b2dc16d9af1a0 Abdelkader Boudih 2026-06-06 20:17:18

Networking

Network-related commands, library, and kernel.

lagg: Handle a port count of zero
The sc_count check in lagg_transmit_ethernet() and
lagg_transmit_infiniband() is racy, as the lagg protocol handlers are
only synchronized by net_epoch.  Handle a count of 0 in each protocol
handler where it's needed, namely in the RR and LB handlers.

Reported by:    Yuxiang Yang, Yizhou Zhao, Xuewei Feng, Qi Li, and Ke Xu from Tsinghua University using GLM5.1 from Z.ai
Reviewed by:    pouria, zlei
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D56942
49d90d9ddfc1ecda9ad9b6cb5565e5fbdcc14964 Mark Johnston 2026-06-01 16:40:43
net: Fix handling of unmapped user pages in if_getgroup()
We cannot call copyout() while in a net epoch section, unless the user
memory is wired.  Use the global ifnet lock to synchronize the accesses
instead.

Reported by:    emaste
Reviewed by:    zlei
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D57154
68004e56fdc22c11b4ec680e83309b4ea2bfe13a Mark Johnston 2026-06-01 16:44:15
nat64lsn: Fix type confusion panic when using wrong NAT64 instance type
When an ipfw rule references a NAT64 instance by name using
'nat64lsn', the kernel looks up the instance in the shared
srvstate[] array without verifying the instance type.
If the named instance is actually a nat64clat or nat64stl
instance (created with 'nat64clat' or 'nat64stl'), the code
incorrectly casts the instance to nat64lsn_instance and
dereferences the ->cfg pointer, which causes a kernel panic.

The root cause is that all NAT64 instance types share the same
srvstate[] array but have different struct layouts.
For nat64lsn_instance, the field after 'no' is a pointer to nat64lsn_cfg.
For nat64clat_cfg, the same offset contains an embedded nat64_config struct.

Fix by adding a type check after NAT64_LOOKUP() to verify that the
instance's etlv matches IPFW_TLV_NAT64LSN_NAME before proceeding.
If the type doesn't match, return IP_FW_DENY to reject the packet
safely rather than crashing.

Signed-off-by:  Teddy Engel <engel.teddy@gmail.com>
PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292023
Reported by:    pouria
Reviewed by:    ae
Pull-Request:   https://github.com/freebsd/freebsd-src/pull/2249
ea4888e63f6ac89c38982ffee693f89a5927e9c9 Teddy Engel 2026-06-01 16:42:56
lacp: Simplify lacp_compose_key()
lacp uses interface speed to separate lacp members into different
aggregation groups.  It wants to use the lower 4 bits of the key
to represent the speed.   This change fixes a few bugs around that:

1) Actually use the baud rate reported by the interface as the speed
  (and fall back to use the baudrate associated with the media if
   the interface somehow doesn't support if_baudrate)

2) Compressess the baud rates down to the 4 bits reserved for them.
   Using things like FM_400G_FR8 does not fit in 4 bits (its value
   is 0x1811) . In fact, interfaces faster than 1Gb/s don't fit in
   4 bits using the old scheme

3) Emits a warning on the console once per boot if it encounters a
   NIC with an unsupported speed to make it slightly more obvious
   why LACP might not behave as expected.

This was prompted by a 400g nic with a broken media detection
reporting "unknown" as its speed, and being unable to be in the
same aggregation group with a different 400g nic that was properly
reporting its speed.

Sponsored by: Netflix
Differential Revision:  https://reviews.freebsd.org/D57026
Reviewed by: slavash
e98ed8d99fd41873dc52cf78e70e9f12e3e93042 Andrew Gallatin 2026-06-02 16:18:03
netpfil: add PF netlink command decoding support
Convert PFNL_CMD values in pf_nl.h from an enum to #define constants,
add a pfnl_cmd table definition for mktable, and implement the
corresponding command decoding helpers in libsysdecode.

This allows mktable to generate PF netlink command lookup tables and
enables symbolic decoding of PF netlink commands.

Reviewed by:    kp
Signed-off-by:  Ishan Agrawal <iagrawal9990@gmail.com>
Sponsored by:   Google LLC (GSoC 2026)
017690e509134422dbfa80316eab56d8d3f87065 Ishan Agrawal 2026-06-01 12:24:05
udp: Fix resource leaks in an error path in udp6_send()
Reported by:  Andrew Griffiths <andrew@calif.io>
Fixes:          https://cgit.freebsd.org/src/commit/?id=069a67374ed9 ("ip6: Remove support for RFC2675 (Jumbo Payload Option)")
Reviewed by:    pouria, tuexen, glebius
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D57341
520e0f576f710eb60fb901b87b4eb0e1530362ae Mark Johnston 2026-06-05 21:48:35
if_stf: Free entire mbuf chain on failure
Reported by:   Yuxiang Yang, Yizhou Zhao, Ao Wang, Xuewei Feng, Qi Li, and Ke Xu from Tsinghua University using GLM-5.1 from Z.ai
Reviewed by:    markj, bz, kp
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57476
5a7f41e94b6d47e60e5d76dfb3a61ee2746700ca Ed Maste 2026-06-05 20:56:51
ipsec: Free entire mbuf chain on failure
Reviewed by:  kib
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57475
85195c0c7f8a2926f0ba131178d9231bc33c81b5 Ed Maste 2026-06-05 20:51:48

System administration

Stuff in man section 8 (other than networking).

stand: Revert the EFI loader back to strict mode
The change to relaxed mode has had too many unintended breakages. Revert
back to strict mode until that works for all the cases that are
currently broken.

Fixes: https://cgit.freebsd.org/src/commit/?id=784150fd2535, https://cgit.freebsd.org/src/commit/?id=d69fc3a9dc71
PR:  https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295289
Sponsored by: Netflix
a1d78374b5c426d43a287b9523660bce36cb55c8 Warner Losh 2026-06-01 03:34:59
bsdinstall: Add virtual_oss service option
Since virtual_oss is now part of base, there is no reason not to provide
an installer option to enable it, and make it more visible to new users,
who might also benefit from the devd rules in /etc/devd/snd.conf, which
use virtual_oss, as well as 8532b4a43636 ("rc: virtual_oss: Create a
loopback device in the default configuration").

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    ivy
Pull-Request:   https://ron-dev.freebsd.org/FreeBSD/src/pulls/31
eb5aa5c337c8d52fc1a7e867f526ca770bbe6612 Christos Margiolis 2026-05-20 15:51:39
virtual_oss_cmd(8): Improve error messages
Sponsored by: The FreeBSD Foundation
MFC after:      1 week
4f7092eeb22d3882f54d67a35149533fef8376ca Christos Margiolis 2026-06-02 12:57:45
pfdenied: fix checking root anchor
pfctl doesn't like empty anchors (-a ''), but we can specify the root
anchor as '/' too, so do that instead.

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295324
Tested by:      Paweł Krawczyk
MFC after:      1 week
Sponsored by:   Rubicon Communications, LLC ("Netgate")
3d9cd10b2857ee7a9ec1b04457d9ec44f614d32c Kristof Provost 2026-06-03 08:49:31
defaultroute: Fix dual-stack and IPv6-only handling
Since IPv6-only setups are becoming more common, and IPv6
connectivity is often sufficient for tasks such as DNS
resolution and NTP time synchronization, update defaultroute
rc.d script to support IPv6-only environments.

Reviewed by:    pouria, ae
Differential Revision: https://reviews.freebsd.org/D56797
d52de9a3448f0233a11e0b4de557e403ace71748 Marek Zarychta 2026-06-04 07:58:07
lualoader: add be-list and be-switch commands
This is useful for driving BE changes from the loader command prompt,
rather than having to use the menu.  Note that the active carousel in
the boot environment carousel doesn't currently reflect a switch in
boot environments done this way- I'm considering this only a minor bug,
as you probably can't or won't go back to the menu if you're using these
commands.

Reviewed by:    imp (previous version)
c7ff706b31c22f10c2403869c46b443448da3e08 Kyle Evans 2026-06-04 13:57:16
Commit group #3: nuageinit
nuageinit: fix dirname('/') returning nil instead of '/'
b813e46e153327b66db4791ec0003b7e7cc51214 Baptiste Daroussin 2026-06-04 16:44:31

nuageinit: add dirname edge case tests
5f58d9207469dcd2d3fa24db7f5276a681df91e5 Baptiste Daroussin 2026-06-04 17:24:45

nuageinit: add config2_network DNS services test
9459465308ff17a11cad1c3d1987951055f114d6 Baptiste Daroussin 2026-06-04 17:48:32

nuageinit: add nil/empty guard to decode_base64()

Return an empty string when input is nil or zero-length instead
of processing it through the decoding loop.
57807f389a9e42774d944e256b499f5fd82ff855 Baptiste Daroussin 2026-06-04 18:09:06

nuageinit: add hostname validation (RFC 952/1123) to sethostname()

Validate hostnames before writing them:
- Reject empty hostnames
- Reject hostnames longer than 253 characters
- Reject hostnames with invalid characters
- Reject hostnames starting or ending with dot/hyphen
- Reject labels longer than 63 characters
- Reject labels starting or ending with hyphen

Expand the sethostname test to cover all rejection cases.
Update nuage.sh sethostname_body to ignore stderr (warnings).
46d1758aa7a2af37a356a93812b492a406c6ffd4 Baptiste Daroussin 2026-06-04 18:26:49

nuageinit: remove dead checkgroup(), inline check in purge_group()

Call getgroups() once instead of N times per call. Inline the
membership check directly, removing the now-unused checkgroup()
helper function.
852504a5fa5eb6b4dea98bd7abdb89f1c7bab2b0 Baptiste Daroussin 2026-06-04 18:32:48

nuageinit: fix non-standard f:close(cmd) and remove dead precmd

- f:close(cmd) -> f:close() in adduser() and exec_change_password():
  the 'cmd' argument is not standard Lua and is silently ignored.
- Remove dead 'precmd' variable in adduser().
fdff89256fd921e40f2fa532895315b1dab6f5e6 Baptiste Daroussin 2026-06-04 18:59:30

nuageinit: fix TOCTOU in addsshkey, adddoas, addsudo

Replace check-then-create patterns with direct creation:

- addsshkey: check what exists before creation, use mkdir_p() for
  .ssh directory, handle errors with warnmsg() instead of assert().
  Apply chmod/chown only on newly created files/directories.

- adddoas: same pattern for doas.conf and the etc directory.

- addsudo: same pattern for the sudoers file and sudoers.d directory.

All three functions now use warnmsg() for error handling instead of
returning nil,err or using assert().
cf5722ed60cf271e516927684c90464debb37496 Baptiste Daroussin 2026-06-04 19:06:35

nuageinit: fix update_sshd_config crash when file does not exist

Previously update_sshd_config() would assert-fail if sshd_config did
not exist. Now it creates a new file with the given key/value.

Also replace the fragile simultaneous r+ + temp file approach with
a cleaner read-then-write pattern: read all lines into memory, modify
as needed, then write to a temp file and rename. All assert() calls
replaced with proper error handling via warnmsg().

Add test case for missing file creation.
0ba9b7b7f815b57f1c121b0f78eaee02d2cdd414 Baptiste Daroussin 2026-06-04 19:10:37

nuageinit: refactor goto abuse in chpasswd()

Replace goto next/list pattern with proper elseif/else control
structure. The goto-based flow was fragile and hard to follow;
the elseif chain makes the validation logic explicit and linear.
ea0932d71aa7a2d25b178f1593bfad194d8c7929 Baptiste Daroussin 2026-06-04 20:02:58

nuageinit: complete SSH support with ssh_deletekeys and disable_root

Add missing SSH cloud-config options from cloud-init spec:

- ssh_deletekeys: remove existing SSH host keys on first boot so
  new ones are generated automatically by sshd(8).
  Implemented as delete_ssh_host_keys() in nuage.lua using lfs.dir()
  with a directory existence guard via lfs.attributes().

- disable_root: set PermitRootLogin to 'no' (or a custom value via
  disable_root_opts) in /etc/ssh/sshd_config.

- disable_root_opts: optional string or array to override the
  PermitRootLogin value used when disable_root is true. Only the
  first array element is used.
22c1f5d0ec215e36dd4448b9128b856b5441d21c Baptiste Daroussin 2026-06-04 20:17:03
etcupdate: Make diff -l actually work
While here, remove unnecessary blank lines.

MFC after:      1 week
Fixes:          https://cgit.freebsd.org/src/commit/?id=6d65c91b9a47 ("etcupdate: fix arguments order of diff command")
Reviewed by:    Boris Lytochkin <lytboris@gmail.com>
Differential Revision:  https://reviews.freebsd.org/D57330
a85e39030f8c7faa3d5a33373389440de6f0fff7 Dag-Erling Smørgrav 2026-06-04 22:41:27
Commit group #4: pw
pw: remove duplicate pw_user_add declarations
1cc5684b3216dd0198c4fe83cdbcaed8d874c99c Baptiste Daroussin 2026-06-04 22:12:19

pw: fix uninitialized name pointer in pw_group_del

The 'name' variable could be left uninitialized if neither the
positional argument nor -n is supplied, leading to undefined
behavior when passed to getgroup().
13f4a37b536b60d559c766b3ec4f2d5d25279ea3 Baptiste Daroussin 2026-06-04 22:12:24

pw: fix inverted condition in shell_path error handling
4fd8a69ec6623da5ef33818be134efffebe37f75 Baptiste Daroussin 2026-06-04 22:12:35

pw: fix const qualification in unquote()

The unquote() function took a const char * parameter but modified the
string in-place (removing quote characters). Change the parameter to
char * and update callers that passed const char * to cast explicitly.
5f9c8f142d1702f5810618e02534054d28d22fa5 Baptiste Daroussin 2026-06-04 22:13:23

pw: fix setmode(NULL) crash when homemode is a boolean value
fe1e912d5a394565e9adfbc443555ae0b3f087e5 Baptiste Daroussin 2026-06-04 22:13:52

pw: fix incorrect metalog path in mkdir_home_parents
ab478de1f9b3f73036ee05004fb2d503a0f339bc Baptiste Daroussin 2026-06-04 22:19:54
Commit group #5: nuageinit
nuageinit: implement bootcmd support

Add support for the 'bootcmd' cloud-config directive, which allows
running commands very early in the boot process, before the hostname
is set and before the network is configured.

- nuageinit: bootcmd() function follows the same pattern as runcmd(),
  writing commands to /var/cache/nuageinit/bootcmds instead of runcmds.
  It is the first entry in the pre_network_calls table.

- rc.d/nuageinit: execute /var/cache/nuageinit/bootcmds immediately
  after /usr/libexec/nuageinit completes, before unmounting the config
  drive. This ensures bootcmd runs before NETWORKING per cloud-init spec.
b9be7608cd13888a32815bfb2263e20855706969 Baptiste Daroussin 2026-06-05 05:00:00

nuageinit: implement manage_etc_hosts support

Add support for adding the instance hostname to /etc/hosts on the
127.0.0.1 and ::1 localhost lines, matching cloud-init's default
behaviour (manage_etc_hosts: true).

create a revolve_hostname helper to avoid code duplucation.
ba58e8ad726318ed59b6cc5934435dbddbe23dac Baptiste Daroussin 2026-06-05 05:49:16

nuageinit: add tests for bootcmd, ssh_deletekeys, disable_root, manage_etc_hosts
6e54d00867dd2b979d2dc097c710613e6b9bd33b Baptiste Daroussin 2026-06-05 06:38:33

nuageinit: implement mounts support

Add support for the 'mounts' cloud-config key which configures
mount points by appending entries to /etc/fstab and creating
the corresponding directories.
797dad91ff468a9bd6cd5d4f720eb4bbac1f454a Baptiste Daroussin 2026-06-05 10:05:08

nuageinit: implement resolv_conf support

Add support for the 'resolv_conf' cloud-config key which writes
directly to /etc/resolv.conf.
4662263c246fd9c31cf0f03089845140114445bc Baptiste Daroussin 2026-06-05 10:06:02

nuageinit: implement keyboard support
58184a301a1f0ef0858689f8dcc608cb468d4644 Baptiste Daroussin 2026-06-05 10:09:51

nuageinit: implement ssh_authkey_fingerprints support

Add support for the 'ssh_authkey_fingerprints' cloud-config key
which logs SSH host key fingerprints to the console via ssh-keygen.
d7984912385cc5a191547dc6c2d73acba25e2239 Baptiste Daroussin 2026-06-05 10:38:06
etcupdate: Make nobuild the default
The common case for etcupdate is to run it after building and installing
the world, in which case we already have an object directory to draw on.
Add a -b option to turn nobuild off (opposite of -B), and turn nobuild
on by default.

MFC after:      1 week
Reviewed by:    jhb, emaste
Differential Revision:  https://reviews.freebsd.org/D57306
ddf6fad0295aa92af5eed2a4b2fa0bd02f47d94d Dag-Erling Smørgrav 2026-06-05 15:53:25
rc: Bail if /dev/null is not a device
On startup, check that /dev/null exists and is a character device.
Otherwise, one of two things will happen: either /dev is a writable
directory and we will immediately create /dev/null as a regular file
and dump garbage into it, or it does not and we will spit out a stream
of error messages about failing to create /dev/null.

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295782
MFC after:      1 week
Reviewed by:    jhb, emaste
Differential Revision:  https://reviews.freebsd.org/D57447
b5a96894f67a92f78f0641763eff1e0a46f2e036 Dag-Erling Smørgrav 2026-06-05 15:53:29
bhyve(8): allow cpu pinning using N-M:X-Y ranges
bhyve's -p allows to pin guest's virtual CPU vcpu to hostcpu, however
this becomes very tedious work when you have to pin more than a single
CPU.

This allows to pass a range to -p, e.g. -p 0-3:4-7 which will pin the
cpus 0:4, 1:5, 2:6, 3:7. The ranges must be equal and the CPU numbers
must be ascending.

Sponsored by: Armenian Bioinformatics Institute
Reviewed by:    corvink, markj
Tested by:      bnovkov
MFC after:      3 weeks
Differential Revision:  https://reviews.freebsd.org/D54937
8f6c577c9f706aea6f138fa1bec27029d4ab587d Antranig Vartanian 2026-06-05 15:34:18
loader.efi: Fix when staging moves late
Prior to this commit, we'd compute the page tables and have the last
entries point to the staging area. We'd then add some more metadata to
the image and boot. This assumed the staging area didn't need to move
for this last bit of data.

However, if we go over the staging limit, when we copyin new data, we
grow the staging area, usually be moving it to a lower address.  This
overage usually happens when we're loading modules and so things work
out nicely. Sometimes we're close to the limit, and we need to do this
growing inside bi_load, after we've computed the page table, making the
page table wrong, and the code we jump to random rather than the btext
routine we normally start at.

To fix this, move computation of the table (but not its allocation) to
after bi_load, but before we call the trampoline.

This problem was most observed when loading microcode for many peole,
but Gleb reproduced the error with a set of modules that didn't include
ucode.

This bug hunt was greatly assisted by Claude who looked at the crash
from the EFI boot loader and surmised that we weren't jumping to the
code we thought we were jumping to. After inspecting the code, I asked
claude how corruption could happen (I thought overwriting the page
table), but claude notice the possibility that staging might change
after we computed the page table, and this fix is the result. Claude
didn't suggest a diff, but did provide many helpful clues that lead me
to this fix.

PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294630
Reviewed by: kib (prior version)
Sponsored by: Netflix
MFC After: insta per re@ request
Differential Revision: https://reviews.freebsd.org/D57462
3915ffb1c3e04b26d1506bf35d3f665b2e25a915 Warner Losh 2026-06-05 05:18:40
Commit group #6: nuageinit
nuageinit: implement ntp support

Add support for the 'ntp' cloud-config key which configures NTP
by writing /etc/ntp.conf with server and pool entries.
6d27d52ccd35d1980e99bc2fc4dae602334d28af Baptiste Daroussin 2026-06-05 20:25:29

nuageinit: implement ca_certs support

Add support for the 'ca_certs' cloud-config key which manages
CA certificates by writing them to /etc/ssl/certs/ and running
certctl rehash.
b56f029add4825b21b2957f19ccfbb219a3f96cb Baptiste Daroussin 2026-06-05 20:27:07

nuageinit: implement MIME multipart user-data support

Add support for MIME multipart/mixed user-data, allowing a single
user-data blob to contain multiple parts with different content types.
be711ade6f66506fb2cae9fd33b142ce910f0346 Baptiste Daroussin 2026-06-05 20:45:54

nuageinit: implement power_state_change and locale support
328a76d17f85ff6aa6228035c4c4b989eb7534f8 Baptiste Daroussin 2026-06-05 20:48:18
nuage.lua: add encode_base64 helper
71e8122b3f6efdaac23ac219312dfe270731b495 Baptiste Daroussin 2026-05-07 21:53:04
Commit group #7: nuageinit
nuageinit: implement final_message support
e01f202ecf9344bd6658869a869f36c5b3790384 Baptiste Daroussin 2026-06-05 21:03:45

nuageinit: implement phone_home support

Posts instance data (hostname, instance_id, public keys) to a URL
using fetch(1). Supports:
- url: target URL
- post: list of data items to send, or 'all'
- tries: number of retry attempts (default 1)
58653bf4d0fb8ccd5de146d671ec101a1df0ede0 Baptiste Daroussin 2026-06-05 21:28:25

nuageinit: expose decode_base64 to fix tests
68e60bb8b6c968fe615f81ccc8afd2a30ff78003 Baptiste Daroussin 2026-06-06 06:05:50
nuageinit: install certs in /usr/share/certs/trusted
Suggested by: kevans
e5ef12ccd01f8ec6c519bf2a56cac2808f78c51a Baptiste Daroussin 2026-06-06 19:30:53

Libraries

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

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295739
Reviewed by:    des
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D57445
e3fa020202d8e040242016bda275dde83c058549 Yoshihiro Takahashi 2026-06-05 13:14:06
libc: Guard mergesort() allocation size arithmetic
Signed-off-by:        Faraz Vahedi <kfv@kfv.io>
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2243
Reviewed by:    fuz
MFC after:      1 week
3501eec9dd39b527a46e82de53480968d283b90e Faraz Vahedi 2026-05-28 13:50:45
msun: Fix up for recent rsqrt[fl] functions
Paul Zimmermann (of Core-Math and MPFR fame) graciously tested
the recently committed rsqrt[fl]() functions.  He identified 127
incorrectly rounded values for rsqrtf() in round-to-nearest mode.
This patch fixes the rounding in RN.  Exhaustive testing now shows
that rsqrtf() is corrected rounded for RN.  He also tested rsqrt()
and rsqrtl() in the interval [1,4).  Both appear to be correctly
rounded.  Finally, the patch includes small changes to comments.

A concise list of changes is

* lib/msun/src/s_rsqrt.c:
  . Fix comments.

* lib/msun/src/s_rsqrtf.c
  . Fix comments.
  . Exhaustive testing by Paul Zimmermann found 127 incorrectly
    rounded values in round-to-nearests.  These gave have the
    form 0x1.13e07pN with N an odd integer.  With this patch, all
    values are now correctly rounded in round-to-nearest.

* lib/msun/src/s_rsqrtl.c
   . Fix comments.
   . Move all variable declarations to top of function and sort.

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295706
MFC after:      1 week
Fixes:          https://cgit.freebsd.org/src/commit/?id=3085fc9d97bd83785ba3ba43e0378d7d67987d1f
c3f6dcea199289329c1d3b91b69e5a4821fc3dff Steve Kargl 2026-06-07 19:12:16
libc: Add free_sized() and free_aligned_sized() as per C23
Add C23 sized deallocation entry points as thin wrappers around free(3).
Implementations may ignore size and alignment hints, so behaviour stays
correct for existing allocations without validating caller metadata yet.

When jemalloc is updated to 5.3.1, rewire these to je_free_sized() and
je_free_aligned_sized() so deallocation can use the allocator's sized
deallocation (free_sized for fast paths and free_aligned_sized for
correct aligned hints.)

Please note this change satisfies the standard interface only. Both
functions should be delegated to jemalloc after the upgrade so callers
get the intended allocator behaviour; until then, hints are unused and
neither sized nor aligned-sized deallocation optimizations apply.

Signed-off-by:  Faraz Vahedi <kfv@kfv.io>
Reviewed by:    fuz
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2201
MFC after:      1 month
5f732742ad5b3133a860a8969cf2bd13dc9ac358 Faraz Vahedi 2026-05-16 18:36:17

Filesystems

fs/msdosfs: add support for file namws with surrogate pairs
Long file names are using UTF-16 symbols to represent international or
special characters. The implementation in FreeBSD did not support the
"Supplementary Private Use Area-B" (PUA-B), which requires a surrogate
pair to be represented in UTF-16 (Unicode code points beyond U+FFFF).

The PUA-B is used to represent emoji characters, which are supported
in file names on other common operating systems. The motivation for
this change was that removable media written on another system were
only partially readable on FreeBSD, since they contained emojis in
file names.

A test script that verifies correct operations on files names with
emojis has been added to the tools/test/stress2/misc directory under
the name msdos24.sh.

Reported by:    Fabian Keil <fk@fabiankeil.de>
Reviewed by:    ib
Approved by:    mkcusick
MFC after:      1 week
Relnotes:       yes
Differential Revision:  https://reviews.freebsd.org/D57313
f983cb362de77773efba8975eb0f4b247ce5e6f9 Stefan Eßer 2026-06-01 05:50:22
Avoid incorrect UFS1 timestamp corrections when system clock fails at boot.
Git 1111a44301da - main - Defer the January 19, 2038 date limit in
UFS1 file systems to February 7, 2106 - did so by changing the UFS1
32-bit signed timestamps to unsigned. With this change, time stamps
from before January 1, 1970 went from being negative numbers to
large positive numbers implying times in the future. When such a
time stamp is encountered when an inode is read into memory or when
it is encountered by fsck, its timestamp is replaced with the
kernel's current time.

Andre Albsmeier reported that he had a machine reboot after a power
failure and the battery that maintained its real-time clock had
died. The result was that the system booted with the time set to
five years earlier (absent a real-time clock value, the boot ROM
used the time that the boot ROM had last been updated). The net
result was that fsck reset the time stamps of all files newer than
five years old to the five year old time.

Andres's original request was for a flag in the file system superblock
to say that there are no timestamps from before 1970 in the file
system, so there shouldn't be anything to fix because of the signed
to unsigned switch. But this assumes that no one every does an rsync
or extracts a tar file or restores a dump that introduces an incorrect
time stamp on their system. So this approach was not taken.

This change compares the system's version of the current time to
the last modification time in the file system superblock. If the
current time is earlier than that time then use the last modification
time in the superblock as the value for the current time. There
should be no files in the file system with times newer than the
last modification time in the superblock.

The superblock time stamp is updated in the in-memory superblock
every time any change is made to anything in the file system. The
superblock is written to the disk every 30 seconds, so it may be
off by up to 30 seconds plus the time it sits in the disk cache
waiting to be written if the system has an unclean shutdown (such
as a power failure). Thus, the worst case scenario with this change
is that files written in the last 30 seconds plus disk cache delay
time before the crash may have their times adjusted back by up to
30 seconds plus the disk cache delay time.

Requested by: Andre Albsmeier
Approved by:  kib
Reviewed by:  kib, imp, Andre Albsmeier
MFC-after:    1 week
Differential Revision: https://reviews.freebsd.org/D57371
553ef188f7ecc23a384bd7ef1f3d5015fb8661da Kirk McKusick 2026-06-01 23:48:21
nfs_clrpcops.c: Change initial layout type to flex files
Since the File 4.1 layout is only supported by some
large configurations of Netapp Filers, switch the client
pNFS code to attempting to use Flexible File Format first.

File 4.1 Layout should still work for any servers that do
no support Flexible File Layout.
07d733963ecd1957999f5381b438b8c369686750 Rick Macklem 2026-06-03 19:04:59
nfsd: Add support for striped Flexible File layout
Without this patch, the NFSv4.1/4.2 pNFS server configuration
did not support striping.  This was mainly because the Linux
client driver did not support it either.  The Linux client
driver for Flexible File layout does now support striping.
(Linux kernel version 6.18 or newer)

As such, this patch adds striping support.  The configuration
is currently just two new sysctls called
vfs.nfsd.pnfsstripeunit - Size (in bytes) of a stripe
vfs.nfsd.pnfsstripecnt - # of DSs to stripe across
A setting of 0 for the first sysctl and 1 for the second
disables striping.  A patch that allows use of a different
striping configuration for each exported MDS file system
is planned for the future.

The pnfsdscopymr may be broken by this patch, but since
no one reported that they were actually using a pNFS server
configuration, I do not believe that will be a problem at
this time.

Until the FreeBSD NFSv4.1/4.2 client is patched to handle
striped flexible file layouts, mounts to a striped pNFS
configuration must be done without the "pnfs" mount option.
(Linux systems with a kernel version of 6.18 or newer
should be able to handle a striped pNFS configuration.)

Future patches that convert the pNFS server to a
"loosely coupled" configuration (which allows the use
of non-FreeBSD servers as DSs) are anticipated.
72e57bc264179818f55b49deb97bc40f56c2b936 Rick Macklem 2026-06-04 01:26:36
nfs_commonkrpc.c: Improve handling of NFSv4.1/4.2 recovery
Commit 4d80d4913e79 fixed a long standing bug in the recovery
code.  However. glebius@ reported seeing multiple
recovery cycles with this patch during an NFSv4.1/4.2
server reboot.

This commit should minimize the risk of multiple
recovery cycles.

PR:     https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294925
Reported by:    Jov <amutu@amutu.com>
MFC after:      2 weeks
Fixes:  https://cgit.freebsd.org/src/commit/?id=4d80d4913e79 ("nfs: Fix argument typo to avoid a crash")
ea4886f2829bf33866c8c0c60b14a9641fc54b40 Rick Macklem 2026-06-04 22:02:48
nfsd: Add per-MDS fs striping configuration
Commit 72e57bc26417 added support for striping to the pNFS
server when using the Flexible File layout.
It is configured globally via the following sysctls:
vfs.nfsd.pnfsstripeunit - Size (in bytes) of a stripe
vfs.nfsd.pnfsstripecnt - # of DSs to stripe across

This patch allows the above settings to be overridden
on a per-MDS exported file system basis.  With this
patch, a stripeunit can optionally be specified for
the MDS file system listed when one is listed after
a '#' in the "-p" nfsd argument.  This is done by
appending "@NNN", where NNN is the stripeunit, in bytes.

The current syntax implies that neither a '#' nor '@'
can be in the MDS mount point's directory path.

This patch does not affect current pNFS server
configurations (of which there appears to be very
few, anyhow).
3dfbbe8586bbd489ffc67941f09f94c2d8152946 Rick Macklem 2026-06-05 14:59:42
zfs: merge openzfs/zfs@a170134fe
Notable upstream pull request merges:
 #18372 eaaea55b6 Consistently encode DRR_BEGIN packed nvlist payloads with
                  NV_ENCODE_XDR
 #18410 891e379d0 Fix failfast default and usage
 #18470 a2d053329 zdb: Add some more file layout output, triggered by -v
 #18472 d50f5b6d0 dsl_dir: avoid dd_lock during snapshots_changed updates
 #18493 d65015938 Vdev allocation bias/class change
 #18497 8fdc86675 zfs: annotate nested dd_lock in reservation sync
                  accounting
 #18494 956deba27 zdb: detect BRT and DDT leaks during block traversal
 #18499 c7cfe0805 zarcstat: detect attached L2ARC device with no data
 #18503 439b802e7 sa: fix sa_add_projid lock ordering
 #18508 968f4db03 zpool-attach.8: add EXAMPLES section
 #18513 45dddc452 zfs.4: Fix documentation of zfs_arc_dnode_reduce_percent
 #18516 8ff64005a zap: split implementation out into more files
 #18520 181e1b522 Fix double free for blocks cloned after DDT prune
 #18535 -multiple zstream: fix crashes when refcount tracking enabled
 #18536 -multiple refcount tag fixups
 #18541 a65ed7afd zpool/zfs: accept --help and -? after a subcommand
 #18544 6fb72fda0 zio_ddt_write: compute have_dvas after taking dde_io_lock
 #18546 -multiple zap: internal locking uplift
 #18550 40a87651d zap_impl: use flex array field for mzap_phys_t.mz_chunks
 #18551 -multiple zap: make the _by_dnode() op variants be the primary
                  implementation
 #18570 112b0131b zpl_xattr: stop heap-allocating prefixed xattr names
 #18578 4bc8c39b6 zed: Prefer dRAID distributed spares to regular ones
 #18596 e30ab5fa4 FreeBSD: Make it possible to build openzfs.ko with
                  sanitizers
 #18597 472ddca11 zed: Prefer spares with matching rotational and size
 #18599 c90dc2808 enforce exact decompressed length for lz4, gzip, and zstd
 #18603 -multiple zap: add zap_cursor_init_by_dnode; cursor unit tests;
                  mock dnode refcounts
 #18604 59dc88602 nvpair: Check for un-terminated strings in packed nvlist
 #18606 ef6f26145 When reading a vdev label skip libzfs_core_init()
 #18613 0aa4088dc sharenfs: Check for invalid characters
 #18615 80fb85b80 Fix the integer type in zfs_ioc_userspace_many()
 #18616 e199f6d98 Fix uninitialized variable warning in vdev_prop_get()
 #18617 7de42602c Extend dataset zfs_ioc_set_prop() secpolicy
 #18622 5fea0c838 Parallelize metaslab_sync_done() calls
 #18623 cab50d5ad Add additional verification of size fields and strings
 #18630 -multiple zap: misc function removal / uplift / tests
 #18633 a8ef128da Fix uninitialized variable warning in zil_parse()

Obtained from:  OpenZFS
OpenZFS commit: a170134febea405c6b6f5ed51724cdcfb6d8e726
d9497217456002b0ddad3cd319570d0b098daa29 Martin Matuska 2026-06-06 20:48:32

Kernel

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

MAC/do: Fix double-free on parse error after "executable paths" feature
parse_rules() has been calling toast_rules() in case of a parse error in
order to deallocate the 'struct rule' objects it has constructed up to
that point.

toast_rules() would take a pointer to a full 'struct rules' object, and
besides freeing all 'struct rule' referenced by it, would also free the
holding 'struct rules' itself.

With the introduction of the "executable paths" feature, and the
embedding of 'struct rules' into 'struct conf', meaning that the
lifecycle for 'struct rules' was no longer independent, toast_rules()
was changed not to free the passed 'struct rules' (as it was a field of
a 'struct conf' object).  Unfortunately, this change was not completed
with a reinitialization of the rules list head, so the 'struct conf'
object would continue to reference just-freed rules, which then would be
freed a second time on destruction of that container.

So, make toast_rules() re-initialize the rules list in 'struct rules',
which it logically has been having to do since not freeing the enclosing
'struct rules'.  This alone is enough to fix the bug, but let's use the
occasion to change the contract of parse_rules() and bring its herald
comment up-to-date: On error, parse_rules() now simply leaves already
constructed 'struct rule' objects in 'conf'.  The latter is eventually
destroyed and the rule objects reclaimed at that point.

Add a test trying to set an invalid rules configuration with the first
rule being valid and the second being invalid, which triggers the bug
(and an immediate panic() on an INVARIANTS kernel).

Reported by:    impost0r(ret2plt) <impostor@ret2p.lt>
Reviewed by:    markj
Fixes:          https://cgit.freebsd.org/src/commit/?id=9818224174c4 ("MAC/do: Executable paths feature (GSoC 2025's final state)")
Sponsored by:   The FreeBSD Foundation
79d0dbc9c6d6a1627c9f3eeab0633c232a6a0a34 Olivier Certner 2026-06-01 08:52:16
get/setpriority: Add capability mode checks
Reviewed by: oshogbo
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57345
72e34b3e3907d5fd63abf7b2246cae80641769b3 Ed Maste 2026-05-29 20:48:34
linuxulator: Return EINVAL for invalid inotify flags
We implement all of the currently-defined Linux inotify mask bits and
flags, with the same values as Linux.  Return EINVAL for unknown bits,
as Linux does.

This also moves the translation inline into linux_inotify_add_watch.

Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57387
f77d37cffdf3951b7f28b97005467241aa27c183 Ed Maste 2026-06-01 18:22:09
linux: Implement PTRACE_GETREGSET NT_PRFPREG and NT_X86_XSTATE
Implement NT_PRFPREG and NT_X86_XSTATE for PTRACE_GETREGSET on amd64.
Chrome's crashpad handler uses these to collect floating-point and
extended CPU register state for crash dumps.

Other architectures retain the previous EINVAL stub behavior.

Signed-off-by:  Ricardo Branco <rbranco@suse.de>
PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=289285
Reviewed by:    kib
Pull-Request:   https://github.com/freebsd/freebsd-src/pull/2165
c515e6040614434a9262ee8b5ac54b81476ec7ff Ricardo Branco 2026-04-26 14:45:35
linux: Fix missing break in lsiginfo_to_siginfo()
Prevent LINUX_SI_TKILL from inadvertently falling through to
LINUX_SI_QUEUE, which incorrectly overwrote si_code with SI_QUEUE
instead of SI_LWP.
5dbbd764c8e116b04c75b79b1eedc0edcbb90435 Pawel Biernacki 2026-06-02 11:08:29
Commit group #8: bindat(2)/connectat(2): allow implicit EMPTYPATH for unix domain sockets
bindat(2)/connectat(2): allow implicit EMPTYPATH for unix domain sockets

path specification.

Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D57370
12c590a9abd770f69da3bc0b8adb4955d79357c8 Konstantin Belousov 2026-05-30 22:11:45

uipc_usrreq: revert addition of EMPTYPATH for bindat(2)

The caller wants the parent vnode, which cannot be provided for emptypath
lookups.

Reported and reviewed by:       markj
Fixes:  https://cgit.freebsd.org/src/commit/?id=12c590a9abd7 ("bindat(2)/connectat(2): allow implicit EMPTYPATH for unix domain sockets")
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D57448
453968c78d27ed5c90562a1178f34fe8d616bf40 Konstantin Belousov 2026-06-04 17:26:09
Commit group #9: amd64: complete thunderbolt KERNCONF integration
amd64: complete thunderbolt KERNCONF integration

This completes the work so the driver can be integrated into KERNCONFs
properly on amd64.

MFC after: 1 month

Differential Revision:  https://reviews.freebsd.org/D55573
886164895f3f4805dc11171ac7980acaccf6ec77 Enji Cooper 2026-06-03 06:02:01

thunderbolt: Fix INVARIANTS compilation

The problem is that THUNDERBOLT_DEBUG triggers the use of some
variables, but it is independent of INVARIANTS and the variables it uses
were tagged with '__diagused'.

Fix this by using '__maybe_unused' in those places.

Fixes:          https://cgit.freebsd.org/src/commit/?id=183633079178 ("thunderbolt: make code -Wunused clean")
Fixes:          https://cgit.freebsd.org/src/commit/?id=886164895f3f ("amd64: complete thunderbolt KERNCONF integration")
Sponsored by:   The FreeBSD Foundation
9a133eee1ed9cf3220055c1d7543e1074bdc628a Olivier Certner 2026-06-03 15:57:50
i386: Fix build (of 'genassym.o')
i386's genassym.c needs to define some assembly symbols holding the size
of NFS structures to support NFS_ROOT while booting with a nfs_diskless
structure.  For this, it needs to include a few NFS headers, which
require definitions from <sys/mount.h> (fhandle_t, vfs_init_t), which
was removed by commit 72ab129799a2 ("x86: remove sys/mount.h from
genassym.c").

Since recently, <sys/mount.h> has been including <sys/vnode.h>, so needs
"vnode_if.h" to have been generated for the compilation of 'genassym.o'
not to fail.  Make sure this is the case (for all architectures for
simplicity) by tweaking the rule for 'genassym.o' in
'sys/conf/kern.post.mk', leaving a comment there so that it can be
removed when i386 is dropped (or if the above-mentioned dependency is
broken).

Fixes:          https://cgit.freebsd.org/src/commit/?id=72ab129799a2 ("x86: remove sys/mount.h from genassym.c")
Sponsored by:   The FreeBSD Foundation
ce243df20aa8ba94918cafdca2537c8cd18887c8 Olivier Certner 2026-06-03 13:11:52
linuxkpi: Make pm_qos.h self-contained
Include <linux/types.h> for `false`.  This is needed by amdgpu somewhere
between Linux 6.12 and 6.15.

Reviewed by:    Minsoo Choo <minsoo@minsoo.io>, bz
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57415
67df313015906d84d90df8e37795885e81cf8da5 Sourojeet A 2026-06-03 21:58:53
kern_prot.c: Belatedly add copyright
See the commit log for the why.

MFC after:      3 days
Sponsored by:   The FreeBSD Foundation
1c0e5c53ff1672a93fc42988020723bb6bc427c1 Olivier Certner 2026-06-04 09:49:23
MAC/do: Clarify comments about flags attached per-ID or per-ID-type
No functional change.

MFC after:      3 days
Sponsored by:   The FreeBSD Foundation
0c2d64ce3da9c042da133c8b6d7391abb177f2c9 Olivier Certner 2026-06-04 10:01:23
linuxkpi: Add dma_unmap_page_attrs
This will be used by amdgpu as of Linux 6.13.

Reviewed by:    bz
Sponsored by:   The FreeBSD Foundation
b551429ad65d73a717c7bfc589cfbe62773a8cb1 Sourojeet A 2026-06-04 16:52:44
Commit group #10: LinuxKPI
LinuxKPI: 802.11: add three more driver downcalls

Add (*link_sta_rc_update), (*set_bitrate_mask), and
(*sta_set_decap_offload) mac80211 driver downcalls in preparation
for further work.

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
ba796102fefa24a1f97286bfeb0d762c16decdf4 Bjoern A. Zeeb 2026-04-26 17:08:03

LinuxKPI: 802.11: implement ieee80211_start_tx_ba_session()

Implement ieee80211_start_tx_ba_session() as a start for rtw8x (and
select mt76 chipsets) to support more throughput.

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
fb97712a7f13b85ca707f52f206a2944ee66cf2c Bjoern A. Zeeb 2026-04-26 19:58:08

LinuxKPI: 802.11: add note about rate control support under boot -v

We currently do not support rate control in LinuxKPI.  As more drivers
and chipsets gain suppport for higher throughput add a note under
bootverbose if we hit one of these cases (currently only older iwlwifi
chipsets).

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
a993d281111bef7c760340321e372a7cb6a759a0 Bjoern A. Zeeb 2026-04-26 20:04:46

LinuxKPI: 802.11: adjust tracing for action/ampdu/addba functions

Adjust the pure debug tracing to no longer be under HT and add more
to the other functions we are interested in, so we can follow the
calls more easily.

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
22ac9be92d1da75989f67d6057a57c69b289b82d Bjoern A. Zeeb 2026-04-26 22:43:49

LinuxKPI: 802.11: make *addba* work better

Fill in more details for lkpi_ic_addba_request(), lkpi_ic_addba_response(),
and lkpi_ic_addba_response_timeout().

Migrate the ltxq flags seen_dequeue and stopped to a bitfield and add %b
support to log messages.   This seemed the better approach after needing
an additional stop field for BA while we have to hold packets from being
transmitted.

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
259efa730c3d5c52d6ef0faa1d57d66eea5afa8e Bjoern A. Zeeb 2026-04-27 00:48:06

LinuxKPI: 802.11: set flag if frame should be part of an A-MPDU

In the output path where we are sending a frame to the driver mark it
if it should be part of an A-MPDU based on its tid, type, and whether
net80211 thinks that we are in the right state for this.

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
cda79e505e2120fe3b4c4f16cb18d92bf2e01e4e Bjoern A. Zeeb 2026-04-27 00:55:27
arm64: Add exception flag for ksiginfo_t and set in trapsignal
The `ksiginfo_t` flag `KSI_TRAP` is set both for exceptions and when
copying between userspace and the kernel fails. In the latter case, the
exception syndrome register as captured in `struct trapframe` won't be
valid. That means we can't use `KSI_TRAP` to determine whether `tf_esr`
is valid. This motivates the addition of a new flag, here called
`KSI_EXCEPT`, for specifically identifying signals caused by exceptions.
It is added to `ksi_flags` via `trapsignal`.

Signed-off-by: Alex Arslan <ararslan@comcast.net>
Reported by:    andrew
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2053
5cc3fa098856cbb8de72d1027c838ef734030445 Alex Arslan 2026-03-19 23:30:03
audit: Add poll / select support
It was previously not possible to poll() or select() on the trigger
device, which made implementing proper signal handling in auditd
difficult.

MFC after:      1 week
Sponsored by:   Klara, Inc.
Reviewed by:    kevans, markj
Differential Revision:  https://reviews.freebsd.org/D57457
0620c99d278b6a2fd6fe995f5bb365158e04ad7c Dag-Erling Smørgrav 2026-06-05 21:50:38
audit: Replace TAILQ with STAILQ
This reduces the size of a trigger entry from 24 bytes to 16 (or from
12 bytes to 8 on 32-bit) with no additional complexity.

MFC after:      1 week
Sponsored by:   Klara, Inc.
Reviewed by:    kevans, emaste
Differential Revision:  https://reviews.freebsd.org/D57464
77e894cb09affe828f4bc81b8e4751a7e22860de Dag-Erling Smørgrav 2026-06-05 21:50:46
renameat(2): when retrying, check for pending signals
The vn_start_write() call there is already interruptible.  Check for
user signals before restarting due to ERELOOKUP, or after failed
vn_start_write().  Note that vn_start_write(V_XSLEEP | V_PCATCH)
does not check for signals if not sleeping.

PR:     https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295826
Reviewed by:    markj
Tested by:      pho
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D57453
5d0ebfe1d97801518755c7025f57ba7d5bf1c8db Konstantin Belousov 2026-06-04 17:53:26
rename(2): do not allow to rename root vnode of the mounted filesystem
Check for tdvp being vp_crossmp.  This cannot happen for the normal
rename cases, but could if the target path specified by the syscall
points to the nullfs mount over the regular file.  In this case namei()
cannot step over crossmp, and keep it in ni_dvp.

Since crossmp VOP_GETWRITEMOUNT() returns NULL mp, we retry the locking
dance since the belief is that NULL return is transient.

PR:     https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295826
Reviewed by:    markj
Tested by:      pho
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D57453
d53633bfcf24a3eb3711e24b597aa8301f92b958 Konstantin Belousov 2026-06-04 19:56:36
linuxkpi 802.11: Free entire mbuf chain on failure
Reviewed by:  bz
Sponsored by:   The FreeBSD Foundation
Fixes: https://cgit.freebsd.org/src/commit/?id=0936c648ad0ee ("LinuxKPI: 802.11: update the ni/lsta reference cycle")
Fixes: https://cgit.freebsd.org/src/commit/?id=c816f64e66a0d ("LinuxKPI: 802.11: plug mbuf leak")
Differential Revision: https://reviews.freebsd.org/D57477
232021fd093c6e65beee5c0b4281091902022d08 Ed Maste 2026-06-05 21:01:39
fork: Drop an uneeded PHOLD/PRELE pair
Support for swapping out kernel stacks was removed, so the PHOLD has no
purpose.  (And even before that, it's not clear why a swapout here would
have been problematic.)

Reviewed by:    kib
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D57486
1ee4b5fd824aa93f9a20df6bd5dad50c7e32fe05 Mark Johnston 2026-06-06 12:52:15
procctl(): do not allow the process to exit inside kern_procctl_single()
Requested and reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D57491
a845480cc122f45cebc5fbbe43de6b1c096d852b Konstantin Belousov 2026-06-06 16:52:20
kern_procctl: add get_reaper_or_p() helper
Reviewed by:  markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D57487
261c97b47ea4f120bfa4a04aab7d35c70dde8c8f Konstantin Belousov 2026-06-06 17:08:17
procctl(PROC_REAP_GETPIDS): re-validate reaper after relock of proctree_lock
Reviewed by:  markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D57487
390ae06d4f524a6f32383cbc1bcbdecdb3738bc3 Konstantin Belousov 2026-06-05 23:29:23

Build system

Commit group #11: libarchive: Clean up the build configuration
libarchive: Clean up the build configuration

* Move settings duplicated in libarchive, bsdcat, bsdcpio, bsdtar, and
  bsdunzip into libarchive's Makefile.inc.

* Drop some CFLAGS that merely duplicated some of the contents of our
  platform configuration header.

MFC after:      1 week
Reviewed by:    mm
Differential Revision:  https://reviews.freebsd.org/D57307
eb3a0a74a069d0f294e1596504676459282bb308 Dag-Erling Smørgrav 2026-06-04 13:12:23

libarchive: Fix typo in sed command

MFC after:      1 week
Fixes:          https://cgit.freebsd.org/src/commit/?id=eb3a0a74a069 ("libarchive: Clean up the build configuration")
Reported by:    Shawn Webb <shawn.webb@hardenedbsd.org>
ba0d22eacd6008e9f3b7395b41056de2423aef3d Dag-Erling Smørgrav 2026-06-04 22:35:50
libmsun: Fix incorrect MLINK for sincosl(3)
fa3f69fa4cabf50d667631b4b8083673bccc874f Steve Kargl 2026-06-04 16:31:26
check-old-libs: Show information about packages
If pkg is installed, for each old library found to still be present,
check if any installed packages either provide or require the library,
and inform the user.

MFC after:      1 week
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D53977
8d9dff23f206cb86aed9857a985ed09cd38eb5ac Dag-Erling Smørgrav 2026-06-06 07:54:21
libc/riscv64: temporarily unhook strrchr() from the build
A bug was discovered in the riscv64 assembly implementation of
this function.  Fall back to the generic implementation until a
fix can be developed.

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295823
Reported by:    siva
MFC after:      1 week
4996ebdb720042239a197ebec2d265cdfdf1bbf3 Robert Clausecker 2026-06-07 19:00:33
depend-cleanup.sh: rebuild strrchr.o on riscv64 if it came from strrchr.S
We have to switch back to the previous rule once the temporary
build fix has been replaced with a permanent fix.

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295823
See also:       4996ebdb720042239a197ebec2d265cdfdf1bbf3
Reported by:    siva
MFC after:      1 week
93221c277608d2612511eaabbf2bfc1f4b4250f7 Robert Clausecker 2026-06-07 20:58:31

Internal organizational stuff

ObsoleteFiles: Add some ancient locale symlinks
These were dropped in 2021 but were never listed in ObsoleteFiles.inc,
so systems that have been upgraded from source since before that date
(or from 13.x) may still have them.

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295668
MFC after:      1 week
Fixes:          https://cgit.freebsd.org/src/commit/?id=0a36787e4c1f ("locales: separate unicode from other locales")
Reviewed by:    bapt
Differential Revision:  https://reviews.freebsd.org/D57331
1cef7e9eb0822c606fc34f975efd14b6daeff756 Dag-Erling Smørgrav 2026-06-02 08:36:53
MAINTAINERS, CODEOWNERS: Add myself to fts and stdio
b3a8659f3692977b2d4689d3d1388860c868dc4c Dag-Erling Smørgrav 2026-06-04 13:03:49

Testing

Commit group #12: lib/libc/tests/gen: add fts_set() tests
lib/libc/tests/gen: add fts_set() tests

Add ATF test cases for fts_set():

fts_set:
- invalid instruction returns non-zero with EINVAL
- FTS_AGAIN revisits the current node
- FTS_AGAIN consecutive visits node three times
- FTS_FOLLOW on symlink to file yields FTS_F
- FTS_FOLLOW on symlink to directory causes descent
- FTS_FOLLOW on dead symlink yields FTS_SLNONE
- FTS_SKIP prevents descent into directory
- fts_set_clientptr/fts_get_clientptr round-trip
- fts_get_stream returns parent FTS* from FTSENT*

Sponsored by:   Google LLC (GSoC 2026)
Reviewed by:    asomers
MFC after:      2 weeks
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2242
940142d6103746bb1158c408da443d0240b836d9 Jitendra Bhati 2026-05-20 15:40:51

fts: address post-merge feedback on fts_set_test.c

Per review by des@:

- Remove fts_check_debug() which has no effect in fts_set_test.c, and
  remove unused #include "fts_test.h"
- Add errno = 0 before fts_read() so errno check is meaningful
- Remove fts_lexical_compar where traversal order does not matter
- Change int boolean flags to bool throughout
- Use !saw_inside instead of saw_inside == false
- Move fts_set_clientptr/fts_get_clientptr test inside fts_read()
  loop so the pointer is exercised during active traversal

Fixes:          https://cgit.freebsd.org/src/commit/?id=940142d6103 ("lib/libc/tests/gen: add fts_set() tests")
Sponsored by:   Google LLC (GSoC 2026)
Reviewed by:    des, asomers
MFC after:      2 weeks
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2258
ee213339f4b21782cd1b44086ff9b7fe1fd682c5 Jitendra Bhati 2026-06-03 22:39:45
xinstall: Add test for -d -s not allowed together
Reviewed by:  des
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57403
4908bea5b7f5de70032e201e718958ef40bc3b03 Ed Maste 2026-06-03 14:13:45
tests: Avoid sleep when causing a write error
Cause a write error using a fifo and wait, rather than needing a sleep
to wait for something to terminate. This is faster and avoids a
potential test failure on a heavily loaded system.

Using /dev/full would be simpler, but it is not portable enough (it
tends not to be available in jails, even). Starting programs with stdout
not open or only open for read/execute/search may have unexpected side
effects.

Reviewed by:    ngie, des
Differential Revision:  https://reviews.freebsd.org/D57213
73e0d6b44038d1c7764c5013a54ae17a8f680a69 Jilles Tjoelker 2026-06-03 22:10:08
fts: address post-merge feedback on fts_children_test.c
- Remove fts_check_debug() which is only needed by test cases
  that use the fts_test() helper; fts_children_test.c does not
  call fts_test()
- Remove fts_lexical_compar where traversal order does not matter
  for the test result
- Drop fts_test.h and copy fts_lexical_compar locally
- Pull up NULL argument onto same line as fts_open

Fixes:          https://cgit.freebsd.org/src/commit/?id=e624417db8a1 ("lib/libc/tests/gen: add fts_children() tests")
Sponsored by:   Google LLC (GSoC 2026)
Reviewed by:    des, asomers
MFC after:      2 weeks
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2260
c606eb37135d3e9cfea4d34c147699e0713dd5d2 Jitendra Bhati 2026-06-04 17:04:51
fts: add misc fts traversal tests
Extend fts_misc_test.c with additional test cases:

- FTS_NOCHDIR with absolute paths allows application chdir freely
- fts_name is always NUL-terminated with correct fts_namelen
- FTS_D/FTS_DP are paired and fts_level increments correctly
- FTSENT fts_errno/fts_dev/fts_ino/fts_nlink are correct
- circular symlink loop under FTS_PHYSICAL terminates
- cycle via symlink under FTS_LOGICAL yields FTS_DC
- fts_close after root deletion must not crash
- fts_close after root rename restores CWD (SVN r77497)
- FTS_NOCHDIR + empty directory does not corrupt path (SVN r49772)
- FTS_NS entry has non-zero fts_errno
- FTS_XDEV and FTS_WHITEOUT stubbed pending mount setup

Sponsored by:   Google LLC (GSoC 2026)
Reviewed by:    asomers, jillest
MFC after:      2 weeks
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2248
b45654c6a4d3b2a322b5787e3233b1b22ef4d128 Jitendra Bhati 2026-05-26 11:23:53
fts: add fts regression tests
Add ATF regression tests for previously-fixed fts(3) bugs:

- PR 45723: directory with read but no execute is traversed via
  FTS_DONTCHDIR fallback, not silently skipped
  (commit 1e03bff7f2b7)
- PR 196724: FTS_SLNONE must not be returned for a non-symlink;
  time-bounded race test runs for 1 second with concurrent
  file creation/deletion
  (commit bf4374c54589)
- PR 262038: readdir(2) errors produce FTS_DNR with fts_errno
  set, not silently treated as end-of-directory
  (commit 0cff70ca6654)
- SVN r246641: normal traversal works correctly with O_DIRECTORY
  fix in fts_safe_changedir()
  (commit f9928f1705ee)
- SVN r261589: no crash when tree modified during traversal;
  time-bounded race test runs for 1 second with concurrent
  file creation/deletion
  (commit c6d38f088e5c)

Sponsored by:   Google LLC (GSoC 2026)
Reviewed by:    asomers
MFC after:      2 weeks
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2257
670738a17568f2579b866878f39d2a824a386297 Jitendra Bhati 2026-06-03 19:47:18

Style, typos, and comments

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

style.9: Fix a typo (missing word)
Fixes:          https://cgit.freebsd.org/src/commit/?id=af2c7d9f6452 ("style.9: Encourage style changes when doing significant modifications")
MFC after:      1 day
Sponsored by:   The FreeBSD Foundation
1876f629b97608679f1bd71b9aa88a57b55c4574 Olivier Certner 2026-06-01 07:23:08
assert.h: style(9): Space after #define, between #endif and comment
style(9) still allows TAB after #define but this is a historical
artifact and by far the minority of uses cases.  Going forward, we would
like to promote the use of a single space, as it allows alignment to
survive line prefixing (such as in diffs).

style(9) also has prescribed a single space between '#else' or '#endif'
and a comment recalling the guard since 2002.

So, commit 157c184689ea ("assert.h: Remove leading tabs for whitespace
consistency") was good, and in line with rules about whitespace changes
(since the file was heavily modified by surrounding commits).

This commit is thus basically a revert of 439710cf003b ("assert.h:
Revert "Remove leading tabs for whitespace consistency"), which extended
replacing spaces with TABs in the code introduced in the meantime (after
commit 157c184689ea).

Reviewed by:    fuz, imp
Fixes:          https://cgit.freebsd.org/src/commit/?id=439710cf003b ("assert.h: Revert "Remove leading tabs for whitespace consistency")
MAC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D57391
7487932f4fbc5a71231d3b1fc93d160253f38c83 Olivier Certner 2026-06-02 10:01:05
Commit group #13: .git-blame-ignore-revs: <assert.h> whitespace changes
.git-blame-ignore-revs: <assert.h> whitespace changes

Reminded by:    brooks
Sponsored by:   The FreeBSD Foundation
8ee0f80252d162e1db6a2def73c5b956f5b7307e Olivier Certner 2026-06-04 13:05:38

.git-blame-ignore-revs: <assert.h> whitespace changes: Fix comment

Fixes:          https://cgit.freebsd.org/src/commit/?id=8ee0f80252d1 (".git-blame-ignore-revs: <assert.h> whitespace changes")
Sponsored by:   The FreeBSD Foundation
4f7d987015ddf92ec6a56c7573132a8548474b78 Olivier Certner 2026-06-04 13:31:40

Contrib code

dma: support relaying to an LMTP endpoint
Approved by:          bapt
Differential Revision:  https://reviews.freebsd.org/D55627
Upstream:               https://github.com/corecode/dma/pull/152
84dd0acd1c8c93b8e5074f895a30dc49bc00c8d3 Pietro Cerutti 2026-06-01 12:19:57
Merge commit 63c29df8eceb from llvm git (by Dmitry Polukhin):
  [Serialization] Fix assertion on re-deserialized friend template spec… (#200566)

  …ialization in PCH (#198133)

  A friend function-template specialization declared inside a class
  template is serialized into a PCH. When the class template is later
  instantiated while loading the PCH, the friend specialization can be
  deserialized re-entrantly (VisitFriendDecl -> VisitFunctionDecl -> ...
  -> VisitFunctionDecl for the same specialization) at the same time as
  the canonical copy, producing two redeclarations of the same
  specialization in the template's specialization set.

  ASTDeclReader::VisitFunctionDecl asserted that this collision could only
  happen when merging declarations from different modules. Since
  38b3d87bd384, friend functions defined inside dependent class templates
  are loaded eagerly, so the collision can now also occur within a single
  PCH/AST file (non-modules build), tripping the assertion:

    Assertion failed: (Reader.getContext().getLangOpts().Modules &&
    "already deserialized this template specialization"), function
    VisitFunctionDecl

  The merge that follows (mergeRedeclarable) already links the two
  redeclarations correctly regardless of whether modules are enabled, so
  the fix is to drop the modules-only assumption and let the merge run.

  Fixes https://github.com/llvm/llvm-project/issues/198133

This fixes (well, simply removes :) an assertion when building the
cad/OrcaSlicer port with precompiled headers turned on.

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295296
MFC after:      3 days
86326398b73b81f84831fb5fc4c12d9219bc0f57 Dimitry Andric 2026-06-01 17:10:11
Commit group #14: MFV: file 5.47.
MFV: file 5.47.

MFC after:      3 days
e949ce9dc0e6fff26e83904f1008b76d36ba0a37 Xin LI 2026-06-03 04:54:25

file: normalize .result files to ensure trailing newline on install

Some upstream result files introduced in file 5.47 (e.g., bgcode.result)
lack a trailing newline, causing the contrib_file_tests ATF test to
fail with "cmp: EOF on bgcode.result".  Generate normalized copies
of the expected results and install those instead.

MFC after:      3 days
Fixes:          https://cgit.freebsd.org/src/commit/?id=e949ce9dc0e6fff26e83904f1008b76d36ba0a37
f7c0bd206fe4f3a956b3ecb4dc11a7386b85fa22 Xin LI 2026-06-05 04:47:08
zfs: fix sysctl_os.c
Correctly declare vfs.zfs.metaslab.condense_pct

The following sysctls have moved to metaslab.c:
vfs.zfs.metaslab.df_alloc_threshold
vfs.zfs.metaslab.df_free_pct
vfs.zfs.metaslab.sm_blksz_no_log
vfs.zfs.metaslab.sm_blksz_with_log

Reported by:    dim@FreeBSD.org
b1b4871f373e9f2a5defdc1242543be291f5e9d9 Martin Matuska 2026-06-07 19:15:40

Reverted commits

Commit & revert pair: defaultroute: Fix dual-stack and IPv6-only handling
defaultroute: Fix dual-stack and IPv6-only handling

Since IPv6-only setups are becoming more common, and IPv6
connectivity is often sufficient for tasks such as DNS
resolution and NTP time synchronization, update defaultroute
rc.d script to support IPv6-only environments.

Reviewed by:    pouria, ae
Differential Revision: https://reviews.freebsd.org/D56797
5b5a836e72ec2614def23409674822c907cf3740 Pouria Mousavizadeh Tehrani 2026-06-04 07:58:07

Revert "defaultroute: Fix dual-stack and IPv6-only handling"

This reverts commit 5b5a836e72ec2614def23409674822c907cf3740.

Despite using arcpatch for this commit, I attributed the wrong
author of the patch.
4258829c8f588e502d90fe19a0c18ba81a3761d9 Pouria Mousavizadeh Tehrani 2026-06-04 08:46:02
Commit & revert pair: libc: Constify the getcap API
libc: Constify the getcap API

MFC after:      1 week
Inspired by:    NetBSD
Reviewed by:    kib
Differential Revision:  https://reviews.freebsd.org/D57252
823d00b2d447247f1c5860e3bbc61f6fd19a70e5 Dag-Erling Smørgrav 2026-06-04 22:41:22

Revert "libc: Constify the getcap API"

This broke cross-building on Linux and macOS.

This reverts commit 823d00b2d447247f1c5860e3bbc61f6fd19a70e5.
641e8e39560d2acd2a52658af422bfd30aabb2bd Dag-Erling Smørgrav 2026-06-05 17:15:46

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-07-13 17:53:13+00:00.

This work is supported by Tarsnap Backup Inc.

Alternate version: 2026-06-01 (debug) (contains info about the classification)