FreeBSD git weekly: 2026-03-23 to 2026-03-29

Introduction

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

Table of contents and commits per category:

(1) Highlighted commits (these are copies, not in stats)
7 4.9% Userland programs
8 5.6% Documentation
65 45.1% Hardware support
6 4.2% Networking
8 5.6% System administration
5 3.5% Libraries
2 1.4% Filesystems
11 7.6% Kernel
9 6.2% Build system
0 0.0% Internal organizational stuff
9 6.2% Testing
6 4.2% Style, typos, and comments
3 2.1% Contrib code
5 3.5% Reverted commits
0 0.0% Unclassified commits
144 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.

routing: Retire ROUTE_MPATH compile option
The ROUTE_MPATH compile option was introduced to
test the new multipath implementation.
Since compiling it has no overhead and it's enabled
by default, remove it.

Reviewed by:    melifaro, markj
Relnotes:       yes
Differential Revision: https://reviews.freebsd.org/D55884
254b23eb1f540844cf2a90f2781ae4231c5701ce Pouria Mousavizadeh Tehrani 2026-03-27 11:20:05

Userland programs

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

m4: Stop abbreviating builtin names
* Stop abbreviating macro names half-randomly to 8 chars, this is no
  longer 1990.

* Likewise for function names (in particular use doindex for a function
  that is notably different from the classic index function).

* Rename a few things for more fidelity: eval is the builtin name, not
  expr and your maketemp/mkstemp conform to mkstemp semantics for better
  security.

* Rewrap a few comments that were ludicrously short.

No functional changes except improved accuracy of some error messages.

MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D55793
f8f6f1cbd576ab5f15cef178cc05251365652f74 Marc Espie 2026-03-25 00:41:18
diff3: prefer posix_spawn over pdfork/execlp
MFC After:            1 week
Reviewed by:            kib
Differential Revision:  https://reviews.freebsd.org/D56075
5f7f0efe8e13247fc80a2a739e757f73a5d7ebda Baptiste Daroussin 2026-03-25 10:08:58
diff: prefer posix_spawn over pdfork/execl
MFC After:            1 week
Reviewed by:            kib
Differential Revision:  https://reviews.freebsd.org/D56076
6d8b2ac449f34423be9d56492022421db61d920e Baptiste Daroussin 2026-03-25 10:22:02
diff3: plug fd leak
MFC After:    1 week
Reported by:    kib
33424fd50ee0333bc6f70b5b14a270b85e5b5de1 Baptiste Daroussin 2026-03-26 07:40:29
diff: handle read(2) failures
MFC After:    1 week
9b98c4b053917cad42e26596b37df72efab6dc39 Baptiste Daroussin 2026-03-26 09:25:21
diff3: set O_CLOEXEC on pipes
This avoid leaking pipe fd in children and simplifies the code

MFC After:      1 week
Reviewed by:    kib
Differential Revision:  https://reviews.freebsd.org/D56120
945e60e018c287f8097f3ee4a30ccf4921845aa1 Baptiste Daroussin 2026-03-28 08:41:47
diff: use O_CLOEXEC on pipes
This only simplifies the code, no functional changes expected

MFC After:      1 week
c8d40bf8ecc60cc15e3904410db62065ea681fdc Baptiste Daroussin 2026-03-28 08:55:24

Documentation

Man pages, release notes, etc.

mdo.1: Cross-reference with security.7
MFC after:    3 days
Reviewed by:    olce
Differential Revision:  https://reviews.freebsd.org/D56024
e23f0deceac4fb77c14066d4a76074548ee75fc4 Mateusz Piotrowski 2026-03-22 07:31:44
hwpmc.4: correct stale default values and update diagnostics
The default values documented for kern.hwpmc.logbuffersize (4KB) and
kern.hwpmc.nbuffers_pcpu (64) have been incorrect since 2981a3420cb1
(2018), which updated the compiled defaults but did not update the
man page.

- Correct logbuffersize default from 4KB to 256KB, add 16MB maximum
- Correct nbuffers_pcpu default from 64 to 32, document 32MB per-CPU
  product limit with kern.hwpmc.logbuffersize
- Update DIAGNOSTICS section to reflect current warning messages

Reviewed by:    mhorne
MFC after:      1 week
Sponsored by:   NLINK (nlink.com.br)
Differential Revision:  https://reviews.freebsd.org/D56050
2318ea10a3afb66c51078483f74c1a622811a619 Paulo Fragoso 2026-03-23 20:17:54
rge.4: fix incorrect speed range in HARDWARE section
The HARDWARE section stated "PCIe 1GB to 1GB Ethernet devices"
which is incorrect. The RTL8125/8126/8127 chips support speeds
from 1Gbps to 10Gbps. Correct the range.

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

rge.4: note that the driver manages PHY directly

The rge(4) driver does not use the miibus(4) interface for PHY
management. Instead, it accesses PHY registers directly via the
chip's OCP (On-Chip Peripheral) bus. Document this in the
DESCRIPTION section.

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

Reviewed by:    adrian
Differential Revision:  https://reviews.freebsd.org/D55995
8f36a012d65f1a3c4e071c3396ecc7a963485637 Christos Longros 2026-03-25 01:26:10
kldload.2: Provide more info about file argument
The information is basically taken from kldload(8).

Reviewed by:            kib, ziaee
Differential Revision:  https://reviews.freebsd.org/D55170
1e2c9bcc4ed5fd2a27abdbcf5dfb007193251648 Artem Bunichev 2026-03-26 13:11:26
manuals: System message vs kernel message
Wordsmith mentions throughout the manual of syslog and dmesg, to clearly
differentiate them in an externally consisteny way, increasing operator
onboarding speed and elegance.

The daemon that handles general system messages, syslog, describes them
as "system messages", and "messages" is the standard filename. Rewrite
syslog related manual titles to align search results with this, and hier
entries to align the index. Use care to maintain keywords and not add
extra lines. Newsyslog trades "maintain" with "rotate" for visibility.

MFC after:      3 days
Reviewed by:    markj
Closes:         https://github.com/freebsd/freebsd-src/pull/2067
04d58d529a61f3bba2c1a843bc2793923a005759 Alexander Ziaee 2026-03-08 07:23:17
rtld_get_var(3): provide explicit list of rtld vars that can be modified
Sponsored by: The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D56055
f7b368d25fadbfcba5072dfab3738082393fa189 Konstantin Belousov 2026-03-25 22:38:35
DEVICE_IDENTIFY.9: Fix function call to detect driver in example code
Fixes:          https://cgit.freebsd.org/src/commit/?id=ccabc7c2e556 ("DEVICE_IDENTIFY.9: Modernize description and use cases")
MFC after:      3 days
Sponsored by:   The FreeBSD Foundation
c78937677c973c48fd438ea06cfb51e11cc62851 Olivier Certner 2026-03-27 14:46:58
dup(2): document the handling of filedescriptor flags
Reviewed by:  markj
Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
Differential revision:  https://reviews.freebsd.org/D56121
6cc99baea607255859ee958608e4db6e2ff24793 Konstantin Belousov 2026-03-28 08:51:42

Hardware support

Hardware drivers and architecture-specific code.

mlx5: postpone freeing the completed command entity to taskqueue
because cancel_delayed_work_sync() might need to sleep, which cannot be
done in the interrupt thread where the completion runs.

Sponsored by:   Nvidia networking
MFC after:      1 week
f0d5f46a1e42b801d96447e544cc3820612748b1 Konstantin Belousov 2026-03-10 07:32:00
nvmf: Fix null ptr reference
Reported by:  Nikolay Denev <ndenev@gmail.com>
Reviewed by:    imp, jhb
Differential Revision:  https://reviews.freebsd.org/D55863
09c5bb35425bc70573c007e7f7e82be286677a87 Mariusz Zaborski 2026-03-23 14:37:28
hwpmc: Use rdtsc instead of rdtscp for timestamps
No need for a barrier here, we are inside an NMI handler and executing a
number of serializing instructions with stronger semantics. Reducing
this overhead will increase our maximum safe sampling rate.

Tested by:      Paulo Fragoso <paulo@nlink.com.br>
Reviewed by:    mhorne
MFC after:      1 week
Sponsored by:   Netflix
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2076
39515d8b623a2be39d0c42a537fd9a17c417ff6e Ali Mashtizadeh 2026-03-23 20:21:21
libpmc: Add support for IBS qualifiers
Add support to libpmc for parsing the IBS qualifiers and computing the
ctl register value as a function of the qualifiers and the sample rate.
This includes all of the flags available up to AMD Zen 5.  Along side
these user facing changes I included the documentation for AMD IBS.

Reviewed by:    mhorne
Sponsored by:   Netflix
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2081
df47355fae720fd8f63f36a50c8933f8342483d2 Ali Mashtizadeh 2026-03-18 04:27:09
hwpmc: improve diagnostic messages for invalid tunables
Replace printf() with log(LOG_WARNING, ...) in pmclog_initialize()
so that tunable validation failures are visible in dmesg and
/var/log/messages rather than only on the early console.

Also improve the messages to report both the invalid value and the
default it resets to, making it easier for users to understand why
their tunable was ignored.

While here, adjust some whitespacing/style.

Reviewed by:    Ali Mashtizadeh <ali@mashtizadeh.com>, mhorne
MFC after:      1 week
Sponsored by:   NLINK (nlink.com.br)
Differential Revision:  https://reviews.freebsd.org/D56029
b3a18736ec2fc2bd097995dedd8d09e79bcb2056 Paulo Fragoso 2026-03-23 14:54:18
hid/hgame: Fix desync in hgame_dpad_cb()
hgame_dpad_cb() previously exited early whenever conflicting directions
were input (e.g., UP + DOWN) without saving said input to the
hgame_softc state. This led to a desync between the driver and the
gamepad.

This patch instead handles conflicting inputs by cancelling them out
with each other.

Remove early return. Calculate axis value by subtraction.

Reviewed by:    obiwac
Approved by:    obiwac
Differential Revision:  https://reviews.freebsd.org/D55849
c586944fa20899ab0f6b58b550e753d13d889c5b Majed Alkhaleefah 2026-03-24 06:37:09
acpi_spmc: Fix checking expected DSMs
Previously was or'ing the indices of the DSMs directly, not their
corresponding bits. This commit rectifies this.

Reviewed by:    olce
Approved by:    olce
Fixes:  https://cgit.freebsd.org/src/commit/?id=c5daa5a4c32c ("acpi_spmc: Add system power management controller driver")
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/https://reviews.freebsd.org/D56062
d8a8c890a1a3a003dbd12ec0235304db7fbe9e6e Aymeric Wibo 2026-03-24 07:25:50
pmc: Import Intel Meteor Lake events
Obtained from:        Intel perfmon (JSON event definitions)
Tested by:      bms, olivier
MFC after:      1 week
Reviewed by:    ali_mashtizadeh.com, mhorne
Differential Revision:  https://reviews.freebsd.org/D55641
cb9e24221672a7f77c858518c292c1eac09b3740 Bojan Novković 2026-03-02 21:45:11
libpmc/pmu-events: Add support for new json fields
This change adds support for three new Intel fields to jevents.c:
 - MetricThreshold
 - MetricgroupNoGroup
 - DefaultMetricgroupName

Reviewed by:    ali_mashtizadeh.com, mhorne
Differential Revision:  https://reviews.freebsd.org/D56017
MFC after:      1 week
6ad94d549eb2286d791abd5634400d8ef36d8259 Bojan Novković 2026-03-21 14:37:44
Commit group #0: snd_uaudio
snd_uaudio: Rename umidi_probe() to umidi_attach()

This performs an attach, not probe.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D55900
e67dbccc70046a6f6d8f34c11fd01972b22920c5 Christos Margiolis 2026-03-24 10:30:42

snd_uaudio: Rename uaudio_hid_probe() to uaudio_hid_attach()

This makes more sense.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
0a7749d9436e111c882a16eed1531267943186b4 Christos Margiolis 2026-03-24 10:30:51

snd_uaudio: Simplify chan->curr_cable calculation in uaudio_bulk_write_callback()

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D55918
039477d3e7e72285174d83b973e58cea8de85280 Christos Margiolis 2026-03-24 10:30:58
sound: Match midi_write() return values with midi_read()
Sponsored by: The FreeBSD Foundation
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D55920
a49e925489fba23878b3004b2bff7549dc2f2bcb Christos Margiolis 2026-03-24 10:31:08
snd_uaudio: Retire UAUDIO_MAX_CHAN()
It's a no-op.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D55924
a2fd964a95829c0225031fb317202d4acc2d6ce9 Christos Margiolis 2026-03-24 10:31:12
sound: Retire SND_MULTICHANNEL
SND_MULTICHANNEL is always defined, so SND_CHN_MAX will also always be
8. Apart from the fact that there is no other place in the code that
touches SND_MULTICHANNEL, there is also no good reason nowadays to set
SND_CHN_MAX to 2.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D55934
712bd9b2750a71ad7f8b6bebc5177c47d33a6364 Christos Margiolis 2026-03-24 10:31:26
sound: Retire unused Z_MULTIFORMAT
Sponsored by: The FreeBSD Foundation
MFC after:      1 week
12633057f5914a533df81030b553d6bd47681d87 Christos Margiolis 2026-03-24 10:31:29
Commit group #1: sound
sound: Remove endianness checks for format table declarations

This a legacy thing that is not needed anymore. We can support all of
them just fine.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D55939
6755f558c1d7d22cac5b123082fdb2ac080c228d Christos Margiolis 2026-03-24 10:31:39

sound: Do not create root feeder in chn_init()

The feeder chain gets destroyed when feeder_chain() is called, which is
after the chn_reset() call in chn_init() further down for primary chans,
or vchan_create() for vchans. This makes the root feeder creation in
chn_init() essentially a no-op. Remove it altogether and let
feeder_chain() after chn_reset() take care of creating the feeder
properly. It creates the root one as well.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D55941
b9f9fc473eb56273978df4d4c889acba2862b21c Christos Margiolis 2026-03-24 10:31:43

sound: Remove SND_DIAGNOSTIC section in buffer.c

The purpose of this has not been documented, but it seems like it makes
it possible to view the maximum number of bytes that passed to
sndbuf_feed(), as well as the maximum number of cycles taken inside its
main loop. These do not seem particularly useful anymore.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D55989
4324e0fa71f85f274013100d912584a042c9909e Christos Margiolis 2026-03-24 10:31:48

sound: Always use chn_getvolume_matrix()

There is no reason not to use it. We do it already with CHN_SETVOLUME().
chn_getvolume_matrix() is the same as the non-INVARIANTS
CHN_GETVOLUME(), just without the additional KASSERT
chn_getvolume_matrix() provides.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D55990
0b7f9597024a0061b1e6c544d78bc2ed9392bd89 Christos Margiolis 2026-03-24 10:31:53

sound: Retire CHN_GETVOLUME() and use chn_getvolume_matrix()

CHN_GETVOLUME() is just a wrapped around chn_getvolume_matrix() anyway,
so use it directly.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D55991
f190fad18c385c184cb3600b7e24a362858a1911 Christos Margiolis 2026-03-24 10:31:59

sound: Retire CHN_SETVOLUME() and use chn_setvolume_matrix()

CHN_SETVOLUME() is just a wrapped around chn_setvolume_matrix() anyway,
so use it directly.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D55992
127aa056fea0714116952efb7664956e0f2b69cd Christos Margiolis 2026-03-24 10:32:04

sound: Retire CHN_GETMUTE() and use chn_getmute_matrix()

chn_getmute_matrix() does what CHN_GETMUTE() does, but with a few
additional checks.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D55993
d171d5b8b5acb145efb41a57a2a8f3cded59a484 Christos Margiolis 2026-03-24 10:32:08
sound: Remove most Z_RATE_* aliases
They introduce an extra level of abstraction for no reason at all.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D56041
0ee95151931688e3d321ea7fb13e037b211a40ba Christos Margiolis 2026-03-24 10:32:17
sound: Retire Z_PARANOID
It is always defined.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D56042
6b91c8d5d2c35c4c6231eb172b514f95ce6e10d7 Christos Margiolis 2026-03-24 10:32:22
Commit group #2: sound
sound: Address some XXX comments regarding AC'97 IDs

These seem harmless to address. Not sure why the original author did not
just assign the appropriate names if he knew they were wrong.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D56044
edad981e1e8673b6dd14656fe75b9f239fb777ce Christos Margiolis 2026-03-24 10:32:31

sound: Remove dead code in pcm/ac97.c

ac97_uninitmixer() does not exist also.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D56045
d048cec5fb41cf9529dd0b637a51c7ee72b59b3b Christos Margiolis 2026-03-24 10:32:36

sound: Remove unimplemented chn_reinit() definition

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
2e1cf242292a33a71839c512d222115d36f8fd40 Christos Margiolis 2026-03-24 10:32:38
rge: handle interface flags changes
Handle interface flags like other drivers do.

Reviewed by:    zlei, adrian
Differential Revision:  https://reviews.freebsd.org/D55728
f7fd4e79fa0943446aa5900147f737a70c73d9e3 Brad Smith 2026-03-25 01:22:52
rge: make rx_process_limit a sysctl tunable
The number of packets processed per interrupt was hardcoded to 16.
Add a per-interface sysctl dev.rge.%d.rx_process_limit tunable so
users can adjust this value at runtime.

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

Reviewed by:    ziaee, adrian
Differential Revision:  https://reviews.freebsd.org/D56014
930a790c2abb3680a3449a1f9ce2eff2be7acc36 Christos Longros 2026-03-25 01:27:14
kern/amd64/machdep: Replace memset in wrmsr_early_safe_end
GENERIC-KASAN kernel failed to boot on a Dell PowerEdge C6615 with
an AMD EPYC 8224P CPU; UEFI BIOS caught a #GP exception with %RIP
in kasan_memset where %GS relative pointer (curthread->td_pflags2)
was dereferenced. Investigation led to wrmsr_early_safe_end which
calls memset to clear early #GP IDT entry. Replacing memset with
__builtin_memset_inline still resulted in the compiler emitting a
call to the memset resolver in GENERIC-KASAN build and the kernel
stil faulted during boot. This version which has been successfully
tested with both GENERIC and GENERIC-KASAN kernels uses memset_early.

Signed-off-by: Kristofer Peterson <kris@tranception.com>
Reviewed-by: kib
Pull-Request: https://github.com/freebsd/freebsd-src/pull/2069
615f1b9eb17c921bbcb0cce2b9ad61910361325b Kristofer Peterson 2026-03-09 19:40:34
Commit group #3: ufshci
ufshci: fix bug in ufshci_req_sdb_enable

When enabling the request queue, safely reset the list base address.
This was added due to a quirk in the Qualcomm UFS controller during
the process of activating it.

Sponsored by:           Samsung Electronics
Reviewed by:            imp (mentor)
Differential Revision:  https://reviews.freebsd.org/D55984
c4386988baa2ecdcb482c8ccace183dc643d097c Jaeyoon Choi 2026-03-24 05:12:14

ufshci: add uic powermode parameter to sysctl

Adds parameters related to the performance of the UFS device.
Also update man page for the missing sysctl entries.

Sponsored by:           Samsung Electronics
Reviewed by:            imp (mentor)
Differential Revision:  https://reviews.freebsd.org/D55985
085028463fa92b28939c87d0a14337fc14f394a0 Jaeyoon Choi 2026-03-24 05:14:04

ufshci: Support ACPI

Supports UFS host controller attachment via ACPI. Tested on the
Samsung Galaxy Book 4 Edge using Qualcomm Snapdragon X Elite.
Additionally, a quirk related to power mode change has been added.

For reference, it doesn't reach maximum speed yet. I plan to improve
it later.

Sponsored by:           Samsung Electronics
Reviewed by:            imp (mentor)
Differential Revision:  https://reviews.freebsd.org/D55986
e2083e8d3a01cac739b38521abc72620d3810aba Jaeyoon Choi 2026-03-24 05:16:26
pmc: Fix copyright in previous commits
Fix the copyright attribution to Netflix and the date and missing SPDX
line in pmc.ibs man page.

Sponsored by: Netflix

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/2094
98bedca0a4effed7f170be52f7ef3e1ab8a79b11 Ali Mashtizadeh 2026-03-25 18:51:21
x86: Guard clock frequency against a divide by 0
We may be running in a Virtual Machine which may not fully support
hardware performance counters. If the MPERF counter somehow ends up
at zero, return an error and fail gracefully instead of panicking.
This patch is part of Google Cloud Engine (GCE) C4-LSSD turnup.

Sponsored by:           Google
Tested by:              NetApp (previous)
PR:                     https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292808
MFC after:              3 days
Co-authored-by:         Aymeric Wibo <obiwac@google.com>
Co-authored-by:         Jim Mattson <jmattson@google.com>
Suggested by:           jrtc27 (split out this part)
Reviewed by:            imp, obiwac, olce
Differential Revision:  https://reviews.freebsd.org/D56056
c505fc1468849150f48484b225b6476d8316de57 Matt Delco 2026-03-26 17:22:54
x86: Handle when MPERF/APERF MSRs aren't writable
For performance and/or correct reasons some hypervisors allow
MPERF/APERF MSRs to be read but not written to. This change
modifies the handling of these MSRs to not rely on writes.
This patch is part of Google Cloud Engine (GCE) C4-LSSD turnup.

Sponsored by:           Google
Tested by:              NetApp (previous)
PR:                     https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292808
MFC after:              3 days
Co-authored-by:         Jim Mattson <jmattson@google.com>
Reviewed by:            jrtc27, imp, kib, markj, olce, obiwac
Differential Revision:  https://reviews.freebsd.org/D55996
7e7d4e711ff94d114c93fd522d4125aa9bd9f5cd Matt Delco 2026-03-26 17:30:31
x86: move the NUM_ISA_IRQS symbol from atpic.c into x86/isa/icu.h
This is not the best location, but works for now.

Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D56003
5f08cdc1fb62d157b6086b3ea844287e81e3c45d Konstantin Belousov 2026-02-27 04:32:58
uart/pci: support 16550A PCI serial devices
Expand the current check to also attach the ns8250 driver to devices
reporting as 16550A.  This has been tested to work on a real device.

From an inspection of the code in the ns8250 driver it seems like it should
support up to 16950A devices, but I don't have hardware to ensure that,
hence be conservative with the change.

MFC: 2 weeks
Reviewed by: imp
Differential revision: https://reviews.freebsd.org/D56095
1491fe8f864af5af37e83f1d12459905fb6097fd Roger Pau Monné 2026-03-26 10:01:57
uart/pci: always disable MSI for generic devices
The generic device pci_id structure in uart_pci_probe() already has
PCI_NO_MSI appended to it's flags, however that information is not
propagated into uart_pci_attach().

Assume that any device that doesn't match the known IDs is a generic UART
device, and hence prevent the usage of MSIs.

MFC: 2 weeks
Reviewed by: imp
Differential revision: https://reviews.freebsd.org/D56097
c562c81e315cd25bd35d5ece14ef9a3cb569cab5 Roger Pau Monné 2026-03-26 19:59:24
i386/amd64/NOTES: Add some missing devices
The following devices to x86: ocs_fc aq vge tws
And this to amd64: ufshci

These are in GENERIC, but not NOTES.

Sponsored by:           Netflix
72bb61bac72eabb2e9de16206a68cde523eb59ba Warner Losh 2026-03-28 04:42:18
clapic_handle_intr: KASSERT isrc != NULL
If an interrupt arrives at a CPU which isn't expecting that particular
vector, intr_lookup_source will return an isrc of NULL and we'll panic
when intr_execute_handlers increments *isrc->is_count.

Place a KASSERT a few nanoseconds earlier in order to leave some more
breadcrumbs for the next person to trip over this behaviour.

Tested on:      EC2 r8i.96xlarge
MFC after:      3 weeks
Sponsored by:   Amazon
Differential Revision:  https://reviews.freebsd.org/D55851
f350063a251c9da0c5ce437eb4c44a2d716b673e Colin Percival 2026-03-14 01:03:44
x86: Add struct ioapic_intsrc.io_valid
As of this commit, io_valid is always set to 1; but a future commit
will set it to 0, at which point IOART_INTMSET will be set to forcibly
disable interrupt sources regardless of whether they are requested to
be "masked".

Reviewed by:    kib
MFC after:      3 weeks
Sponsored by:   Amazon
Differential Revision:  https://reviews.freebsd.org/D56006
1d0ccd61563d48e914dccf3dd5cf0280d8331ec1 Colin Percival 2026-03-20 22:02:29
io_apic: Don't route to APIC ID > 255
I/O APIC Redirection Table Entries use 8 bits to encode the Destination
ID.  Attempting to route an IRQ to a higher APIC ID would result in it
being silently routed to the value reduced modulo 256, causing a panic
if the IRQ fired since the receiving CPU would not expect that IRQ.

Instead, print a warning and mark the interrupt as invalid, resulting
in it being forcibly masked.

Reviewed by:    kib
Tested on:      EC2 r8i.96xlarge
MFC after:      3 weeks
Sponsored by:   Amazon
Differential Revision:  https://reviews.freebsd.org/D55857
5809c9a77b2d3b83c056ba3ac5ba4e261c0af595 Colin Percival 2026-03-14 05:51:04
x86: Add stub for Extended Destination ID support
Without an IOMMU, the APIC standard only allows 8 bits of Destination
ID for MSI messages, limiting us to 256 CPUs.  While IOMMUs can allow
for more than 256 CPUs to be supported, they are not necessarily
desirable in virtualized environments.

The Extended Destination ID standard authored by David Woodhouse uses
7 "Reserved" bits for the high bits of a 15-bit Extended Destination
ID in order to address this: http://david.woodhou.se/ExtDestId.pdf

Add a loader tunable machdep.apic_ext_dest_id to control the use of
this feature; the default value (-1) means "autodetect" while 0 and
1 mean disabled and enabled respectively.

Code to detect host support in Xen, Hyper-V, KVM, and Bhyve will come
in future commits, as will the code to use this setting in msi_map and
ioapic_program_intpin.

Tested on:      EC2 r8i.96xlarge
MFC after:      3 weeks
Sponsored by:   Amazon
Differential Revision:  https://reviews.freebsd.org/D55890
d9db6d759dfcf4a4559e66e777599bb3fa8ca14c Colin Percival 2026-03-16 23:37:04
msi: Support APIC Extended Destination IDs
If APIC Extended Destination ID support is enabled, use it in MSIs by
allowing APIC IDs up to 2^15 - 1 and encoding the high bits into
Intel "reserved" bits per the standard.

Tested on:      EC2 r8i.96xlarge
MFC after:      3 weeks
Sponsored by:   Amazon
Differential Revision:  https://reviews.freebsd.org/D55426
02f29c1324cf5193c3aec181cb409917b541f7fe Colin Percival 2026-02-22 04:08:59
io_apic: Support APIC Extended Destination IDs
If APIC Extended Destination ID support is enabled, use it in APIC RTEs
by allowing APIC IDs up to 2^15 - 1 and encoding the high bits into
Intel "reserved" bits per the standard.

Reviewed by:    kib
MFC after:      3 weeks
Sponsored by:   Amazon
Differential Revision:  https://reviews.freebsd.org/D55889
b0e1b1069d655f12ab69cf3a1dc1904dd35ad1da Colin Percival 2026-03-16 23:45:32
KVM: Detect Extended Destination ID support
KVM advertises support for the Extended Destination ID standard via
bit 15 of the value returned in the EAX register when KVM features
are queried via CPUID.

Tested on:      EC2 r8i.96xlarge
MFC after:      3 weeks
Sponsored by:   Amazon
Differential Revision:  https://reviews.freebsd.org/D55427
9ab5aa3d4c7879d5518afc7587a864ba880e7ee9 Colin Percival 2026-02-22 04:09:00
Xen: Detect Extended Destination ID support
Xen advertises support for the Extended Destination ID standard via
bit 5 (aka XEN_HVM_CPUID_EXT_DEST_ID) of the value returned in the
EAX register when Xen features are queried via CPUID.

MFC after:      3 weeks
Sponsored by:   Amazon
Differential Revision:  https://reviews.freebsd.org/D55429
9b18ba2c16a0750e6c78f348845368284ef1a704 Colin Percival 2026-02-22 04:09:00
vmm: Move defines from x86.c to x86/bhyve.h
The values CPUID_BHYVE_FEATURES and CPUID_BHYVE_FEAT_EXT_DEST_ID are
useful for guests, not just hosts; so they belong in a header file in
sys/x86/include rather than simply in the .c file implementing the
bhyve host side.

The original addition of these defines took place without adding a
copyright statement, but since I'm moving them into a new file I've
added the original author's standard copyright (Amazon).

MFC after:      3 weeks
Fixes:  https://cgit.freebsd.org/src/commit/?id=313a68ea20b4 ("bhyve: Add CPUID_BHYVE_FEATURES leaf")
Sponsored by:   Amazon
Differential Revision:  https://reviews.freebsd.org/D55430
49b6254b3e09ee741f456617111ecb18803459fb Colin Percival 2026-02-22 04:09:00
Bhyve: Detect Extended Destination ID support
Bhyve advertises support for the Extended Destination ID standard via
bit 0 (aka CPUID_BHYVE_FEAT_EXT_DEST_ID) of the value returned in the
EAX register when Bhyve features are queried via CPUID.

MFC after:      3 weeks
Sponsored by:   Amazon
Differential Revision:  https://reviews.freebsd.org/D55431
8dd9a0d52175fbc5dafed851fb95a289a94fb6cd Colin Percival 2026-02-22 04:09:00
Hyper-V: Detect Extended Destination ID support
Hyper-V advertises support for the Extended Destination ID standard via
bit 2 of the value returned in the EAX register when the hypervisor
stack properties are queried via CPUID.

This is based on a commit to the Linux kernel, as there does not seem
to be any other documentation of this feature.

Reviewed by:    Souradeep Chakrabarti
MFC after:      3 weeks
Sponsored by:   Amazon
Differential Revision:  https://reviews.freebsd.org/D55432
7b6be0014a4eb81943491122bae70914b7fd82b6 Colin Percival 2026-02-22 04:09:01
usbdevs: Add USB device IDs for Nuand bladeRF SDR
Add vendor and product IDs for bladeRF family of USB software defined radios manufactured by Nuand LLC.

Reviewed by:    imp, adrian
Differential Revision:  https://reviews.freebsd.org/D54733
e7de7feb74262bfdb04d285846bac2fc6229f734 Abdelkader Boudih 2026-03-29 02:54:28
amd64 sendsig(): explicitly copy registers from trapframe to ucontext
With the IDT event delivery, previously reserved fields in tf_cs and
tf_ss are guaranteed to be zero. With FRED, these fields are not zero,
which affects the values copied to userspace.

Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D56141
7d1285e904aa76ac821ac2a6a8eb61be598f0e88 Konstantin Belousov 2026-03-29 08:06:29
bluetooth: add device IDs for Intel AX411 and BE200 adapters
Add USB product IDs for Intel AX411 (0x0035) and BE200 (0x0036)
Bluetooth adapters to ng_ubt_intel, ng_ubt, iwmbtfw, and iwmbtfw.conf.

Both chips use the same TLV-based firmware protocol as the existing
9260/9560 entries.  Newer Blazar-generation chips (BE201, BE202,
Whale Peak 2) are omitted as they require IML support not yet
implemented in iwmbtfw.

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

Reviewed by:    wulf
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D56122
d82bcf5681dd180177d78fdcd1b8bbde5eadc29b Christos Longros 2026-03-29 13:16:57
hkbd(4): fix handling of apple function keys in hid and evdev
Signed-off-by: tslight <tslight@pm.com>

Reviewed by:    wulf
MFC after:      1 month
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1998
f54caa04edd99e341fbb0636d2c621b4a2eb36bf tslight 2026-03-29 13:16:57
ukbd(4): backport Apple function keys support from hkbd(4)
and expose eject in addition to fn.

Signed-off-by: tslight <tslight@pm.com>

Reviewed by:    wulf
MFC after:      1 month
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1998
40f55eada59250dd5d9580ad3c87a36ae9d6b4a9 tslight 2026-03-29 13:16:57
hkbd(4): be more cautious & explicit about Apple vendor checking
Apply the changes to ukbd(4) as well.

Signed-off-by: tslight <tslight@pm.com>

Reviewed by:    wulf
MFC after:      1 month
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1998
103325323c7daf9fe6c9a6c71aa5c90974c9dff4 tslight 2026-03-29 13:16:57
hkbd(4): add some extra handy fn key bindings
- Fn+S for ScrollLock as it's very useful to have ScrollLock on
  FreeBSD's TTY.
- Fn+P for PrtSc/SysRq, as it's another very handy but sadly missing
  key on Macbooks.
- Some other Fn+<key> combinations duplicating existing keys.

Apply the change to ukbd(4) as well.

Signed-off-by: Toby Slight <tslight@pm.me>

Reviewed by:    wulf
MFC after:      1 month
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1998
bb8230f838c8d5f8d362a0dad4809908b44ae379 Toby Slight 2026-03-29 13:16:57
ukbd(4): make debug guard consistent with hkbd(4)
Signed-off-by: Toby Slight <tslight@pm.me>

Reviewed by:    wulf
MFC after:      1 month
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1998
920ad3cef178c9bea37c0d07c22440828a5cb7c8 Toby Slight 2026-03-29 13:16:57
dpaa2: Perform bus_dma pre-write sync before enqueue operation
Without a proper synchronization payload of the egress TCP segments
can be corrupted as tuexen@ described in
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292006#c31.

This patch is indirectly related to 292006 because a properly enabled
and announced support for the TX checksum offloading hides potentially
corrupted frame payload.

NOTE: Returned back with updated placeholders.

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292006
Reported by:    tuexen@
Reviewed by:    tuexen@
Tested by:      dsl@, tuexen@
Differential Revision:  https://reviews.freebsd.org/D56144
MFC after:      3 days
5812415bee55a9063508b02fda9418b0eadb0bb4 Dmitry Salychev 2026-03-28 18:57:45
asmc(4): Add PnP record
To load asmc(4) automagically on boot with devd(8).

MFC after:      1 month
056e29070f083ac4cea31ac0a08619add6370839 Vladimir Kondratyev 2026-03-29 19:00:59
Commit group #4: asmc(4): Add support for backlight(9) interface
asmc(4): Add support for backlight(9) interface

MFC after:      1 month
5d7862fb998f48ba71dac7e34106aaad350db348 Vladimir Kondratyev 2026-03-29 19:00:59

asmc(4): Bump manpage date after edition

Fixes:          https://cgit.freebsd.org/src/commit/?id=5d7862fb998f ("asmc(4): Add support for backlight(9) interface")
MFC after:      1 month
1c10825c6e5fd9a6cab364032458346866223d4f Vladimir Kondratyev 2026-03-29 19:03:41
bluetooth: remove redundant 0x0bda entries from ng_ubt_rtl, rtlbtfw
Generic Realtek vendor rules already match all 0x0bda Bluetooth devices.
Remove the redundant per-product entries from ng_ubt_rtl.c,
rtlbtfw main.c, and rtlbtfw.conf.

Reviewed by:    wulf
MFC after:      1 month
Differential Revision:  https://reviews.freebsd.org/D56137
f3fc362c0fb27731e2c22523e0cedf1adec26c44 Christos Longros 2026-03-29 19:00:59

Networking

Network-related commands, library, and kernel.

tcp: make TCP_TRK_TRACK_FLG_* flags visible to userland programs
These flags are used in BBLog entries.
73f72ca08dbb13ad186e6b33420015d51d0d5b17 Gleb Smirnoff 2026-03-23 21:55:59
pf: Fix hashing of IP address ranges
This corrects the false detection of duplicate rules.

MFC after:      1 week
Reviewed by:    kp
1fa873c93c8b08561c53107c7b90c53dfad30ddc Michael Gmelin 2026-03-12 14:18:09
pf: include all elements when hashing rules
MFC after:    1 week
Sponsored by:   Rubicon Communications, LLC ("Netgate")
c6bcf6e6fd507d952a48226b51cc161b8ef972a2 Kristof Provost 2026-03-19 07:21:51
in6_mcast: Acquire ref to ifp and exit epoch earlier in sysctl
This patch reduces the number of witness warnings during ifmcstat(8) calls.

Reviewed by: glebius, zlei
Differential Revision: https://reviews.freebsd.org/D56052
cbac897a7b057427cfaab12cc143144eadd1e80d Pouria Mousavizadeh Tehrani 2026-03-23 18:38:46
tcp_usrreq: Only allocate TFO counter when required
During tcp_usr_listen(), only allocate TFO counter when required.

Reviewed by: tuexen, glebius
Differential Revision: https://reviews.freebsd.org/D56067
769a6f803d1b531d956af8d857e68f2d2d847324 Pouria Mousavizadeh Tehrani 2026-03-24 17:54:46
tcp: plug an mbuf leak
When a challenge ACK should be sent via tcp_send_challenge_ack(),
but the rate limiter suppresses the sending, free the mbuf chain.
The caller of tcp_send_challenge_ack() expects this similar to the
callers of tcp_respond().

Approved by:    so
Security:       FreeBSD-SA-26:06.tcp
Security:       CVE-2026-4247
Reviewed by:    lstewart
Tested by:      lstewart
Sponsored by:   Netflix, Inc.
6b2d6ccad2552e46a5c9c3ba70b2d0ed27c70ca8 Michael Tuexen 2026-03-25 05:53:56

System administration

Stuff in man section 8 (other than networking).

mtree: Add missing entries
Add missing mtree directory entries.  Without them, the resulting
worldstage METALOG file would produce an invalid (incomplete) mtree
specification file.

Reviewed by:    ivy
Differential Revision:  https://reviews.freebsd.org/D56013
8d99314a044cfb58183087894592c3ec5be99be6 Jose Luis Duran 2026-03-23 06:41:59
pfctl: always warn if a duplicate rule was detected
MFC after:    1 week
Sponsored by:   Rubicon Communications, LLC ("Netgate")
66d66dd0f6f83926980fc1d68dd366c0057350c5 Kristof Provost 2026-03-12 14:24:42
syslogd: Allow killing when in foreground
Normally, syslogd reacts only to SIGTERM, and ignores SIGINT and SIGQUIT
unless in debug mode.  Extend that to also apply when running in the
foreground.  Take this opportunity to comment the event loop.

MFC after:      1 week
Reviewed by:    jfree
Differential Revision:  https://reviews.freebsd.org/D55886
828de702ada854b5f09f447ba06e4e08e976ba07 Dag-Erling Smørgrav 2026-03-24 10:58:53
stand: Force disable RETPOLINE for boot loaders
Boot loaders do not require speculative execution protection, and may be
too large if enabled.

Reported by:    Shawn Webb
Reviewed by:    dim, imp
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56068
61f78130c2f3a6abaa70bd66d6d6974060fb3d04 Ed Maste 2026-03-24 14:53:13
rtld: properly handle update of several vars in rtld_set_var()
Besides setting the value in the array of the values, rtld sometimes
needs to recalculate some internal control variable for the change to
take effect.  Allow the variable description to supply a method called
on the update.  Lock the function with the bind lock for safe operation.

Mark several variables as allowed for update, since the on_update method
is provided for them.  The list is LD_BIND_NOW, LD_BIND_NOT,
LD_LIBMAP_DISABLE, LD_LOADFLTR.

Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D56055
b9f046d941c4dbd0e4fc634827ada6e7cf6a6bcf Konstantin Belousov 2026-03-24 01:43:23
rtld: add a test for rtld_set_var (with LIBRARY_PATH_FDS)
PR:   https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294054
Reviewed by:    kib
MFC after:      1 week
9f16078b5f8c44d5718ecc940ab0b4ed5a1877a5 Alex S 2026-03-25 00:56:01
newsyslog: check for rename failure during log rotation
Differential Revision:        https://reviews.freebsd.org/D56088
6cf1afeccd8aaf926c58c5f0ee24ca3d2329a0ce Christos Longros 2026-03-27 19:28:42
syslogd: Fix ereregex property filters and add test
This change fixes Bug 293879, where ereregex filters in syslogd
did not handle alternation correctly.

The issue appears to come from mixing up two different kinds of
flags: syslogd's internal serialized filter flags in
usr.sbin/syslogd/syslogd.h, and the regex compilation flags from
include/regex.h. ereregex was storing REG_EXTENDED in cmp_flags,
even though cmp_flags is meant to carry syslogd's own FILT_FLAG_*
values for configuration serialization and reconstruction.

REG_EXTENDED has the same bit value as FILT_FLAG_EXCLUDE, so the
filter could be reconstructed with the wrong semantics.

The fix stores FILT_FLAG_EXTENDED instead, allowing syslogd to
correctly REG_EXTENDED when compiling the regex.

A test was also added for both ereregex and !ereregex filters.

PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=293879
Signed-off-by: tzyt <zyt2006613@outlook.com>
Fixes: https://cgit.freebsd.org/src/commit/?id=2567168dc4986
MFC after: 1 week
Reviewed-by: markj, ngie
Pull-Request: https://github.com/freebsd/freebsd-src/pull/2088
69042706604752f42072f422671a72c49343ac45 tzyt 2026-03-22 08:40:57

Libraries

libc/db: Remove unused hash functions in hash_func.c
Prune unused code hidden behind 'notdef', bringing us in sync with
the changes in OpenBSD. Despite the `__default_hash` function pointer
having external linkage, no ABI change is expected since it was
never exported.

Sponsored by:   Klara, Inc.
Differential Revision:  https://reviews.freebsd.org/D55842
Reviewed by:    allanjude, des
MFC after:      2 weeks
c09ccfc2665bef0d81d1db4e3713e4f2a0b5a064 Bojan Novković 2026-03-13 11:03:26
rpcsec_gss: Fix a stack overflow in svc_rpc_gss_validate()
svc_rpc_gss_validate() copies the input message into a stack buffer
without ensuring that the buffer is large enough.  Sure enough,
oa_length may be up to 400 bytes, much larger than the provided space.
This enables an unauthenticated user to trigger an overflow and obtain
remote code execution.

Add a runtime check which verifies that the copy won't overflow.

Approved by:    so
Security:       FreeBSD-SA-26:08.rpcsec_gss
Security:       CVE-2026-4747
Reported by:    Nicholas Carlini <npc@anthropic.com>
Reviewed by:    rmacklem
Fixes:          https://cgit.freebsd.org/src/commit/?id=a9148abd9da5d
143293c14f8de00c6d3de88cd23fc224e7014206 Mark Johnston 2026-03-24 02:12:42
Commit group #5: libc/amd64/strrchr.S: rewrite and fix scalar implementation
libc/amd64/strrchr.S: rewrite and fix scalar implementation

The original scalar implementation of strrchr() had incorrect
logic that failed if the character searched for was the NUL
character.  It was also possibly affected by the issue fixed
in 3d8ef251a for strchrnul().

Rewrite the function with logic that actually works.  We defer
checking for the character until after we have checked for NUL.
When we encounter the final NUL byte, we mask out the characters
beyond the tail before checking for a match.

This bug only affects users running on amd64 with ARCHLEVEL=scalar
(cf. simd(7)).  The default configuration is not affected.

The bug was unfortunately not caught by the unit test inherited
from NetBSD.  An extended unit test catching the issue is proposed
in D56037.

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=293915
Reported by:    safonov.paul@gmail.com
Tested by:      safonov.paul@gmail.com
Fixes:          https://cgit.freebsd.org/src/commit/?id=2ed514a220edbac6ca5ec9f40a3e0b3f2804796d
See also:       https://reviews.freebsd.org/D56037
MFC after:      1 week
253f15c016ca699906f78b8e522a3f7ed675929b Robert Clausecker 2026-03-22 12:37:06

libc/amd64/strrchr.S: fix rebase error

I accidentally dropped a part of the patch on squash rebase.
Should be fine now.

Fixes:          https://cgit.freebsd.org/src/commit/?id=253f15c016ca699906f78b8e522a3f7ed675929b
PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=293915
MFC after:      1 week
23d6516773916d8f324bea51867b0713c476f379 Robert Clausecker 2026-03-26 13:00:21
fenv.h: stop declaring feclearexcept() extern inline
The function is already exported from libm.  We only need to stop
declare it extern inline, and instead provide a macro which uses the
internal inline function __feclearexcept_int() instead.

PR:     https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=277958
Reviewed by:    dim (x86)
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D55975
f39754d51b7dc65c4cf9f8b41b6fc1fc135554e7 Konstantin Belousov 2026-03-19 17:19:09

Filesystems

nfs_nfsdsocket.c: All Copy and Clone across file systems
For some server file system types, such as ZFS, a Copy/Clone
operation can be done across file systems of the same file
system type.

As such, this patch allows the Copy/Clone to be attempted
when the file handles are for files on different file systems.

This fixes a problem for exported ZFS file systems when a
copy_files on file_range(2) between file systems in the same
NFSv4 mount is attempted.

PR:     https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294010
MFC after:      2 weeks
b65e7b4944cc2f594c9d9e6abc9b8618d3d62ff8 Rick Macklem 2026-03-28 19:39:10
nfs_nfsdsocket.c: Allow Copy/Clone from a read-only fs
For some server file system types, such as ZFS, a Copy/Clone
operation can be done across file systems of the same file
system type.

However, without this patch, the Copy/Clone will fail with
EROFS if the input file is on a read-only mounted file system.
This happens because Copy/Clone will try to do a VOP_SETATTR()
of atime to set the atime.

This patch pretends the VOP_SETATTR() of atime worked for
read-only file systems.  It fixes a problem when copying
files from a ZFS snapshot.

PR:     https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294010
MFC after:      2 weeks
b5815ee99a015c6ac118d7e9646d0c95b72e9f2d Rick Macklem 2026-03-29 21:41:36

Kernel

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

sound: Retire SND_DEBUG
Not useful anymore.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D55932
5d311c75324a205f3cd8a8a404a25ebdadb18b54 Christos Margiolis 2026-03-24 10:31:17
sound: Retire SND_OLDSTEREO
This is a legacy option and does not serve a good purpose anymore.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D55933
bf0e5d987ecd2cbec2200e100bad6d6e724e9315 Christos Margiolis 2026-03-24 10:31:22
sound: Retire SND_FEEDER_MULTIFORMAT and SND_FEEDER_FULL_MULTIFORMAT
There is no reason to have these legacy controls anymore, all these
formats can be handled just fine nowadays.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D55937
9318336f2af134b26adcb217f78f70bfdcf5f222 Christos Margiolis 2026-03-24 10:31:34
Commit group #6: snd_dummy: Add to sys/conf/files and sys/conf/NOTES
snd_dummy: Add to sys/conf/files and sys/conf/NOTES

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D56040
72e85a4d977eff23fcd2b12a3513f0e8fd2ac332 Christos Margiolis 2026-03-24 10:32:13

snd_dummy: Fix sys/conf/files entry

Fixes:          https://cgit.freebsd.org/src/commit/?id=72e85a4d977e ("snd_dummy: Add to sys/conf/files and sys/conf/NOTES")
Report by:      CI
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    emaste
Differential Revision:  https://reviews.freebsd.org/D56065
82a066b8593a14e0bbf8e1fcdc75fd9ecf0d9e62 Christos Margiolis 2026-03-24 14:10:44
sound: Retire unused emu10k1-mkalsa.sh
It is a legacy script which is no longer used. Its utility is also
unknown.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D56043
71c46c8c901be2a6e0708c912f0d766d49e5b335 Christos Margiolis 2026-03-24 10:32:26
clnt_bck.c: Delete a couple of old diagnostic printfs
There were two debug printf()s that were left in the
code while debugging the handling of callbacks over
a NFSv4.1/4.2 backchannel was being done.

This patch removes them, since they are no longer
of benefit and cause "noise".

Requested by:   wollman
MFC after:      2 weeks
41b423cc4e4dfe3132bb5d287bba03b82ecb5be8 Rick Macklem 2026-03-25 20:53:22
kqueue: Fix a race when adding an fd-based knote to a queue
When registering a new kevent backed by a file descriptor, we first look
up the file description with fget(), then lock the kqueue, then see if a
corresponding knote is already registered.  If not, and KN_ADD is
specified, we add the knote to the kqueue.

closefp_impl() interlocks with this process by calling knote_fdclose(),
which locks each kqueue and checks to see if the fd is registered with a
knote.  But, if userspace closes an fd while a different thread is
registering it, i.e., after fget() succeeds but before the kqueue is
locked, then we may end up with a mismatch in the knote table, where the
knote kn_fp field points to a different file description than the knote
ident.

Fix the problem by double-checking before registering a knote.  Add a
new fget_noref_unlocked() helper for this purpose.  It is a clone of
fget_noref().  We could simply use fget_noref(), but I like having an
explicit unlocked variant.

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=293382
Reviewed by:    kib
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D55852
8f3227f527567aef53da845ab78da8e16d9051c1 Mark Johnston 2026-03-27 00:24:18
vm_fault: Avoid creating clean, writeable superpage mappings
The pmap layer requires writeable superpage mappings to be dirty.
Otherwise, during demotion, we may miss a hw update of the PDE which
sets the dirty bit.

When creating a managed superpage mapping without promotion, i.e., with
pmap_enter(psind == 1), we must therefore ensure that a writeable
mapping is created with the dirty bit pre-set.  To that end,
vm_fault_soft_fast(), when handling a map entry with write permissions,
checks whether all constituent pages are dirty, and if so, converts the
fault to a write fault, so that pmap_enter() does the right thing.  If
one or more pages is not dirty, we simply create a 4K mapping.

vm_fault_populate(), which may also create superpage mappings, did not
do this, and thus could create mappings which violate the invariant
described above.  Modify it to instead check whether all constituent
pages are already dirty, and if so, convert the fault to a write fault.
Otherwise the mapping is downgraded to read-only.

Reported by:    ashafer
Reviewed by:    alc, kib
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D55536
f404109e90eee7f67ddaae3f52286d524a190fa0 Mark Johnston 2026-03-27 00:25:31
Commit group #7: routing: Retire ROUTE_MPATH compile option
routing: Retire ROUTE_MPATH compile option

The ROUTE_MPATH compile option was introduced to
test the new multipath implementation.
Since compiling it has no overhead and it's enabled
by default, remove it.

Reviewed by:    melifaro, markj
Relnotes:       yes
Differential Revision: https://reviews.freebsd.org/D55884
254b23eb1f540844cf2a90f2781ae4231c5701ce Pouria Mousavizadeh Tehrani 2026-03-27 11:20:05

routing: Include opt_route.h in route_ctl.c

Fix incorrect removal of opt_route.h header in route_ctl.c

Reported by:    Jenkins
Fixes:          https://cgit.freebsd.org/src/commit/?id=254b23eb1f54 ("routing: Retire ROUTE_MPATH compile option")
Differential Revision: https://reviews.freebsd.org/D55884
beab2fe92453861e048cf25ea784d8f82523d288 Pouria Mousavizadeh Tehrani 2026-03-27 23:50:13

Build system

cross-build: Provide mempcpy when building on macOS
We could patch the tzcode config to not use it, but it's simple to
provide an implementation of it and avoid spreading cross-build
bootstrapping special cases.

Fixes:          https://cgit.freebsd.org/src/commit/?id=ff2c98b30b57 ("tzcode: Update to 2026a")
MFC after:      1 week
47402c9422ec6c9ba76d96414f5a08bd35a9e1fd Jessica Clarke 2026-03-23 16:56:09
packages: Remove stale ftpd-all.ucl
This file was missed when ftpd(8) was removed.

Fixes:  https://cgit.freebsd.org/src/commit/?id=614c8750ce11 ("Remove ftpd(8)")
MFC after:      3 days
Reviewed by:    emaste
Differential Revision:  https://reviews.freebsd.org/D55820
Sponsored by:           https://www.patreon.com/bsdivy
ea25f494b315180c4b48fcdc4d2b2a111c84912c Lexi Winter 2026-03-25 10:36:03
packages: Remove stale libsdp-all.ucl
This package no longer exists since it was merged into bluetooth.

Fixes:  https://cgit.freebsd.org/src/commit/?id=41ee4321cc52 ("libsdp: Move to bluetooth-lib package")
MFC after:      3 days
Reviewed by:    emaste
Differential Revision:  https://reviews.freebsd.org/D55822
Sponsored by:           https://www.patreon.com/bsdivy
6900d8b5c3874814be4fed7ef2f6d124ebc9a920 Lexi Winter 2026-03-25 10:36:31
Makefile.inc1: Remove extraneous }
Reported by:  tijl
Fixes: https://cgit.freebsd.org/src/commit/?id=17494c6e6b7d ("build: Boostrap LLVM_BINUTILS for cross-tools")
e8dac3944dcaa7b1a2691c82def15a1ede6bcfe3 Ed Maste 2026-03-27 03:12:44
packages: Move xz to the minimal set
pkg(8), via its daily periodic script, requires xz.  We don't have
a way to encode dependencies from ports on base packages right now,
so instead move xz to the minimal set so it's always installed.

This isn't an ideal solution, but it's justified in this case since
pkg(8) is always installed, so having its dependencies always
installed is acceptable.

(Following discusson on the diff, new versions of pkg have now been
changed to use zstd instead of xz, but we still think xz is useful
enough to keep in minimal.)

MFC after:      1 week (stable/15 only)
Reviewed by:    des, bapt, emaste
Differential Revision:  https://reviews.freebsd.org/D55630
Sponsored by:           https://www.patreon.com/bsdivy
43773002fa63262d531ce3ee5cf5d3fe872a3388 Lexi Winter 2026-03-27 14:49:30
packages: Add dependency from rc to mtree
/etc/rc.d/var_run uses mtree, which is in the devel set and isn't
installed as part of either minimal or optional, so add a manual
dependency.

Reviewed by:    des, bapt, emaste
Differential Revision:  https://reviews.freebsd.org/D54540
Sponsored by:           https://www.patreon.com/bsdivy
833087185a6e9a2bd26707c57c83a71a541a825a Lexi Winter 2026-03-27 14:52:58
libexec: Add pkg-serve directory
Add pkg-serve to the list of subdirectories in the Makefile.

Reviewed by:    bapt
Fixes:          https://cgit.freebsd.org/src/commit/?id=b42e852e89cb ("pkg-serve(8): serve pkg repositories over TCP via inetd (8)")
Differential Revision:  https://reviews.freebsd.org/D56009
4f0d0ed5cbe6d66c496ed124110e24fb6092d480 Jose Luis Duran 2026-03-29 16:13:09
mk: Disable blacklist when disabling blocklist
WITHOUT_BLOCKLIST, when set, should enforce WITHOUT_BLACKLIST.
This fixes the build when WITHOUT_BLOCKLIST=yes is set.

Reported by:    ivy
Reviewed by:    ivy
Fixes:          https://cgit.freebsd.org/src/commit/?id=7238317403b9 ("blocklist: Rename blacklist to blocklist")
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D56118
0d9676e1ca92febd42fbebef8d6833a0939d3f7c Jose Luis Duran 2026-03-29 16:14:50
packages: Fix caroot deinstall command
The correct syntax is 'post-deinstall', not 'post-uninstall'.

MFC after:      3 days (stable/15 only)
Reviewed by:    jlduran, des
Differential Revision:  https://reviews.freebsd.org/D56109
Sponsored by:           https://www.patreon.com/bsdivy
63ecedb3c2ce75a44d55b9424d74d94e294de313 Lexi Winter 2026-03-29 18:57:23

Internal organizational stuff

-- no commits in this category this week --

Testing

stress2: Added syzkaller reproducers. Update the exclude file
4f8a1b4dffa8a6fa5fbe7fce05278792afd83a82 Peter Holm 2026-03-23 11:15:29
pf tests: verify that we handle address range rules correctly
There's been a problem where rules which differed only in address ranges
were considered duplicates and not added. Test for this.

MFC after:      1 week
Sponsored by:   Rubicon Communications, LLC ("Netgate")
ab74151e8d097b263237942c0b12277098bc9533 Kristof Provost 2026-03-12 14:23:32
tests/netinet: add test for getsockname() on a disconnected TCP socket
Stack it into existing file that exercises an other corner case of our
TCP and rename the file to a more generic name.
cd05c88058b5b3684f0d7f3086afa21a944d9cd1 Gleb Smirnoff 2026-03-24 20:51:59
ipfw: skip tests if required sysctl is not set
Since this is a configuration prerequisite rather than a test failure, use
atf_skip instead.

Sponsored by:   Netflix
Differential Revision:  https://reviews.freebsd.org/D56069
648d0fefd7573080b01d44cad8c39ad658f8e44f Olivier Cochard 2026-03-25 15:47:44
tests/netinet: add raw:reconnect test
It tests repetitive connect(2) on AF_INET/SOCK_RAW including connect(2)
to INADDR_ANY that puts socket back into receive-all mode.
f6989880841b89d54ebcd5d12195c40a23627646 Gleb Smirnoff 2026-03-25 18:53:44
Commit group #8: timerfd: Expect periodic timer performance failures
timerfd: Expect periodic timer performance failures

The current timerfd implementation fails to correctly count events on a
nanosecond callout interval. The timerfd__periodic_timer_performance
test detects this and reports failure.

Mark this test as an expected failure so it isn't flagged by CI. A link
to the bug report is attached to the test for reference.

While we're here, clean up some minor style and Make issues.

Fixes:          https://cgit.freebsd.org/src/commit/?id=834c1ba793d9 ("timerfd: Add tests")
MFC after:      1 week
cb692380f1e05ffc4184877844e93051f24ed302 Jake Freeland 2026-03-25 22:57:16

timerfd: Guard expected performance failure

During the timerfd__periodic_timer_performance test, only expect
failures when the expiration count is less than 400000000. This
prevents the test from being reported as a true failure in environments
where scheduling latency is high enough to delay timerfd wakeups.

Fixes:          https://cgit.freebsd.org/src/commit/?id=cb692380f1e0 ("timerfd: Expect periodic timer ...")
MFC after:      1 week
4b16ff49bf4bf875997fe4c80a0afc0d440b7aac Jake Freeland 2026-03-26 16:40:17
tests/netlink: Bugfix on snl_parse_errmsg_capped test
Turn off the NETLINK_EXT_ACK flag to fix bug of snl_parse_errmsg_capped.

Reviewed by:    pouria
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1660
18ce9e2dd0e062583080da624499927e8df8eaf3 K Rin 2025-04-12 05:41:35
tests: Add grand link-layer event in netinet6/ndp
Add test for ndp to verity link-layer address change event
actually triggers the grand.

Differential Revision: https://reviews.freebsd.org/D55927
2371b24c22f063ef79dc1935419c9854656e265e Pouria Mousavizadeh Tehrani 2026-03-18 22:48:05

Style, typos, and comments

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

cd9660: Partial style sweep of Rock Ridge code
This mostly just fixes indentation and continuations and adds spaces
after commas and around binary operators and parentheses around return
values, but cd9660_rrip_extref() was so egregiously unreadable I
rewrote it.  Note that this was done manually, so I may have missed a
few spots, and I made no attempt to fix over-long lines.

MFC after:      1 week
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D55865
e6a77f81d1eb345f6a8c827ecf555b88996c8763 Dag-Erling Smørgrav 2026-03-24 11:29:37
MAC/do: Comments: Rephrase one, fix a typo in another
No functional change.

MFC after:      3 days
Event:          AsiaBSDCon 2026
Sponsored by:   The FreeBSD Foundation
954aaf3958e2ea0e9b1811090ddbb9d8b13a3e5a Olivier Certner 2026-03-21 13:39:04
m4: Misc style fixes
MFC after:    1 week

Reviewed by:    fuz
Differential Revision:  https://reviews.freebsd.org/D55794
41474e78c493184f023723d1f86539e07bb01b92 Dag-Erling Smørgrav 2026-03-25 00:41:23
if_types: Fix a typo in a source code comment
- s/Circiut/Circuit/

Obtained from:  OpenBSD
MFC after:      3 days
8bc31c88d65ad99cd510fbe511958799d3531477 Gordon Bergling 2026-03-27 06:57:49
ofed: Fix a typo in a source code comment
- s/refereced/referenced/

MFC after:      3 days
aed3bc80fe033ab28e8f01cad49e73deb761516b Gordon Bergling 2026-03-27 06:59:19
vmgenc: fix typo in MODULE_DEPEND declaration
The random_harvestq dependency was registered under the misspelled
name "vemgenc" instead of "vmgenc", causing the dependency to not
be associated with the correct module.

Signed-off-by: Christos Longros <chris.longros@gmail.com>
Reviewed by: cem, imp
Differential Revision:  https://reviews.freebsd.org/D56012
ccc235fe0229685512ea7b3d8ed1ecb61dd388f5 Christos Longros 2026-03-28 04:03:24

Contrib code

libcbor: Update to 0.13.0
Sponsored by: The FreeBSD Foundation
b5b9517bfe394e55088f5a05882eabae7e9b7b29 Ed Maste 2026-03-23 15:41:51
file: Parse some UFS2 flags
This allows libmagic to recognize the FS_DOSOFTDEP, FS_SUJ, FS_GJOURNAL,
FS_ACLS, and FS_NFS4ACLS flags on a UFS2 file system.

Accepted upstream as 482259e5e952.

MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D56010
fa03f93e8829a7689101303fbe9fb06654ca14ed Dag-Erling Smørgrav 2026-03-24 11:02:32
x86/cpuid: add CPUID flag for Extended Destination ID support
Introduce the CPUID flag to be used in order to signal the support for
using an extended destination ID in IO-APIC RTEs and MSI address
fields. Such format expands the maximum target APIC ID from 255 to
32768 without requiring the usage of interrupt remapping.

The design document describing the feature can be found at:

http://david.woodhou.se/15-bit-msi.pdf

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
8c986d1645312487adf21a9104d667ac1e19c25f Roger Pau Monné 2022-02-18 08:17:47

Reverted commits

Commit & revert pair: capsicum-test: remove stale file
capsicum-test: remove stale file
20b99e3a147963c6ef715112bd38e349c7a5a459 Mariusz Zaborski 2026-03-02 07:41:21

Revert "capsicum-test: remove stale file"

This was unintended, sorry.

This reverts commit 20b99e3a147963c6ef715112bd38e349c7a5a459.
fce6921464b5b21836a304d0460c69db4a6f3942 Mariusz Zaborski 2026-03-23 14:44:34
etc/mtree: Restore removed package tags
Following commit 436618a427b4 which added package tags to mtree,
some of the tags were later removed due to an issue with empty
packages being created.  That problem has been fixed by commit
7965c93e4d41, so we can now restore the tags that were removed.

This reverts commit 00352ef6d2a013650f0ab2a4c9b016c22552ed25.
This reverts commit 1fbdb149aa486961c5d9d6403065e90123b3f5fe.
This reverts commit ef2d586d7efb908bf39e7d5eb5d4305193d0ca6e.
This reverts commit 2a8a6179eb6cef8ba1a417a4c8a1f7063c704533.

MFC after:      2 weeks (stable/15 only)
Reviewed by:    des, bapt, emaste
Differential Revision:  https://reviews.freebsd.org/D55645
Sponsored by:           https://www.patreon.com/bsdivy
8ba3ada41dda46b41100fa913473058856816e0c Lexi Winter 2026-03-27 14:35:16
Commit & revert pair: dpaa2: Perform bus_dma pre-write sync before enqueue operation
dpaa2: Perform bus_dma pre-write sync before enqueue operation

Without a proper synchronization payload of the egress TCP segments
can be corrupted as tuexen@ described in
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292006#c31.

This patch is indirectly related to 292006 because a properly enabled
and announced support for the TX checksum offloading hides potentially
corrupted frame payload.

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292006
Reported by:    tuexen@
Reviewed by:    ...
Tested by:      dsl@
Differential Revision:  <https://reviews.freebsd.org/D###>
MFC after:      3 days
968164eb650fd986f293512a3faac5c1c9e4d51f Dmitry Salychev 2026-03-28 18:57:45

Revert "dpaa2: Perform bus_dma pre-write sync before enqueue operation"

This reverts commit 968164eb650fd986f293512a3faac5c1c9e4d51f.
c78e653b49f7039bb8c84a6ad79be21b90aaf464 Dmitry Salychev 2026-03-29 18:33:33

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-13 18:39:30+00:00.

This work is supported by Tarsnap Backup Inc.

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