FreeBSD git weekly: 2026-06-22 to 2026-06-28

Introduction

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

Table of contents and commits per category:

(2) Highlighted commits (these are copies, not in stats)
2 0.9% Userland programs
14 6.1% Documentation
47 20.3% Hardware support
13 5.6% Networking
37 16.0% System administration
14 6.1% Libraries
7 3.0% Filesystems
57 24.7% Kernel
11 4.8% Build system
0 0.0% Internal organizational stuff
7 3.0% Testing
13 5.6% Style, typos, and comments
7 3.0% Contrib code
2 0.9% Reverted commits
0 0.0% Unclassified commits
231 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.

hwpstate_intel: Use 8bit scale instead of percentage scale
Reviewed by:    olce
Relnotes:       yes
Event:          Halifax Hackathon 202606
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55629
8452afeb5682052b2533363ee3351d6d0e183e60 ShengYi Hung 2026-02-26 06:26:06
rc.firewall: Support on-disk lists
For firewall_allowservices and firewall_trusted, if an element of the
list looks like an absolute path, read the file, skipping comments and
blank lines, and treat the first word on each line as an address or
subnet to be added to the list.

We should probably be using tables instead, but this is still an
improvement over the status quo ante.

MFC after:      1 week
Relnotes:       yes
Reviewed by:    allanjude
Differential Revision:  https://reviews.freebsd.org/D57679
a71abf38e2b46c02965f3224c62bb6ef1971996e Dag-Erling Smørgrav 2026-06-26 14:38:53

Userland programs

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

install: Explicitly include sys/param.h for MAXPATHLEN
MFC after:    1 week
Sponsored by:   The FreeBSD Foundation
ca89b0fa1a93744a5bbf7a5c949826bbee4e2559 Mark Johnston 2026-06-22 20:19:29
truss: add AF_NETLINK syscall argument decoding support
Track AF_NETLINK socket file descriptors in procinfo using fd_domain
entries and use them to detect Netlink traffic across later syscalls.

Add Netlink payload decoding support for sendto(), recvfrom(), and
sendmsg() paths by integrating sysdecode_netlink() into BinString and
Msghdr argument handling, with fallback to existing binary/iovec
printing when decoding fails.

Reviewed by:    kp
Signed-off-by:  Ishan Agrawal <iagrawal9990@gmail.com>
Sponsored by:   Google LLC (GSoC 2026)
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2295
6c744621c72062edf176ecf28b92ad10e8264454 Ishan Agrawal 2026-06-24 05:20:15

Documentation

Man pages, release notes, etc.

libusb: Bump manual date for multiple changes
Sponsored by:   The FreeBSD Foundation
d928113eaadaeb9ab821a2a5b6f08159f1ce8d76 ShengYi Hung 2026-06-22 13:32:23
acpi_ibm.4: Fix mic_led sysctl name
Fixes:        https://cgit.freebsd.org/src/commit/?id=707347f88649 ("Add missing documentation for dev.acpi_ibm.0.mic_led added in r335304")
Event:          Halifax Hackathon 202606
Sponsored by:   The FreeBSD Foundation
b9d6497bd1f16e906f4dc6e600368b86d3fe0317 Aymeric Wibo 2026-06-22 14:22:01
acpi_ibm.4: Remove extraneous .Tn
As flagged by mandoc linter.

Event:          Halifax Hackathon 202606
Sponsored by:   The FreeBSD Foundation
8de929962a38855c8c38d117d20b71d7c9eaee77 Aymeric Wibo 2026-06-22 14:50:52
etcupdate: Recommend building when bootstrapping
Since building is no longer the default, add -b to the bootstrapping
examples as they are likely to be run with a tree that hasn't been
built.

MFC after:      1 week
Fixes:          https://cgit.freebsd.org/src/commit/?id=ddf6fad0295a ("etcupdate: Make nobuild the default")
Reviewed by:    jhb
Differential Revision:  https://reviews.freebsd.org/D57643
1ca439a216a0415e409218c1ebbcbbd4ff89d75c Dag-Erling Smørgrav 2026-06-22 18:59:23
kqueue.2: knote is activated as the first action of tdsendsignal()
Sponsored by: The FreeBSD Foundation
MFC after:      3 days
df8ca3f89aa2b2c374886cc39b24c76796d7db9a Konstantin Belousov 2026-06-22 19:07:19
virtual_oss.8: Use `.Pa` macro to refer to devices
Suggested by: christos
Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
31461c8bc9c16004feae9cc17b89fd5213a09ae0 Aymeric Wibo 2026-06-24 14:33:41
virtual_oss.8: Document `/dev/bluetooth/` prefix magic
Without this one could be led to believe they should have an actual
`/dev/bluetooth/xxx` device in devfs from just reading the examples.

Event:          Halifax Hackathon 202606
Reviewed by:    christos
Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D57818
7ecd9afd3b28b9e1a112b5925a8f5902e121b128 Aymeric Wibo 2026-06-24 13:54:02
iostat.8: Expand -w description
PR:           https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=194781
MFC after:      3 days
Reviewed by:    ziaee
Event:          Halifax Hackathon 202606
4d299a767acce2841ded288e789a9c36620b57d7 Mathias Eggers 2026-06-23 20:09:24
arch.7: used title case for .Ss headings
Do capitalize "size".  Don't gratutiously capitalize "char" any more
than we do "make" further down.

Reviewed by:    emaste
Sponsored by:   DARPA, AFRL
Differential Revision:  https://reviews.freebsd.org/D57820
00b0ea95dfb3052ab94b5e9bf268f2b941b3f874 Brooks Davis 2026-06-25 10:05:28
build.7: explain how to build KBI-compatible standalone module
Reviewed by:  imp, kevans
Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
Differential revision:  https://reviews.freebsd.org/D57859
d946a88e0ce347a9a6fdbfdae0b23ef192b9bddc Konstantin Belousov 2026-06-26 00:21:36
cdefs(9): encourage __nodiscard over __result_use_check
__nodiscard is closer to (and sometimes expands to) [[nodiscard]] from
C23 and C++17 so prefer it to the homegrown __result_use_check.

When __nodiscard does expand to [[nodiscard]] it must appear entierly
before the function declaration (or between the function name
and argument list) so relocate as appropriate.  This differs from
__attribute__((__warn_unused_result__)) used by __result_use_check which
is more flexible.

Reviewed by:    imp, markj, emaste
Sponsored by:   DARPA, AFRL
Differential Revision:  https://reviews.freebsd.org/D57881
2515e3f6776a3f95c888be5e58b28df0ffbe3dd8 Brooks Davis 2026-06-26 16:41:40
netlink.4: Document missing socket options
Add descriptions for NETLINK_GET_STRICT_CHK, NETLINK_MSG_INFO.

Reviewed by:    ziaee, obiwac
Differential Revision:  https://reviews.freebsd.org/D57520
7fff1f194e075716c9be79dab68c1ab1816563ef Zishun Yi 2026-06-26 18:39:49
system(3): Use plural form of 'command'
Pick the plural form in the sentence about running arbitrary commands in
the security consideration section.

PR:         https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294497
Event:      Halifax Hackathon 202606
Location:   Couch
dcc684ddccd60d1079eefec06266de04641e319b Mathias Eggers 2026-06-26 19:16:20
padlock.4: Update slightly for 64-bit hardware
- Change the document description to "Via and Zhaoxin CPU crypto driver"
- Add a HARDWARE section mentioning these in the hardware release note

This manual still needs desperate help, but just this little bit could
have saved a lot of confusion. I'd write more if I had information.

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295517
Fixes:          https://cgit.freebsd.org/src/commit/?id=14b8531c4ccb8 (Restore padlock_rng the the amd64 build)
MFC after:      3 days (to 15 only)
Reviewed by:    bcr, asomers
Differential Revision:  https://reviews.freebsd.org/D57920
380c6f59c4f87dbc45a67983d927700ca7e22be2 Alexander Ziaee 2026-06-28 21:27:35

Hardware support

Hardware drivers and architecture-specific code.

firewire: NULL check on malloc in fw_busreset()
fw_busreset() allocates newrom with M_NOWAIT from interrupt context.
If the allocation fails, crom_load() dereferences a NULL pointer.

Skip the config ROM comparison on allocation failure so the next bus
reset will retry.

Reviewed by:    adrian
Differential Revision:  https://reviews.freebsd.org/D57728
51f4e90ce7ef3b8d036a9d34ab464f4152ca4bab Abdelkader Boudih 2026-06-22 00:30:53
x86/ucode.c: supposedly fix i386 compilation
Fixes:      https://cgit.freebsd.org/src/commit/?id=16f21c5af350 ("amd64: there is no reason to copy ucode around in ucode_load_bsp()")
PR:     https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295926
Submitted by:   Martin Birgmeier <d8zNeCFG@aon.at>
MFC after:      3 days
f4cd99131c70e8be2a793d939b644e20bbbd3374 Konstantin Belousov 2026-06-22 00:48:11
acpi: Forbid requesting S4 when S4BIOS is not supported
Pending the OS-supported hibernate functionality, prevent requesting S4
when S4BIOS is not supported.

To this end, make sure that acpi_supported_stypes[] indicates that
POWER_STYPE_FW_HIBERNATE is not supported if 'acpi_s4bios_supported' is
false, even if S4 is supported by the platform (which is only
a power-down-like state, without any support to save the system image by
itself).  This will cause requests to enter S4, which are translated to
POWER_STYPE_FW_HIBERNATE before reaching
acpi_ReqSleepState()/acpi_EnterSleepState(), to fail in this case.

Retire the 'hw.acpi.s4bios' sysctl knob, as having it to 0 by default
(S4BIOS not supported) or setting it to 0 (default is 1 when S4BIOS is
supported) could only lead, on a S4 request, to a power down without any
possibility to restore the system (and, since a recent commit, it has
not been possible anymore to force it to 1 when S4BIOS is not announced
supported in the FACS table, which would cause a failure or a crash).

When OS-supported hibernate is introduced, it will become the default
hibernate method over S4BIOS, as we have not heard of any semi-recent
hardware platform implementing it (and when it is, it usually needs
a sufficiently large dedicated slice/partition, and does not use FreeBSD
swap slices/partitions).  Then, for people still wanting to use S4BIOS
on older platforms that support it, the tentative plans are to modify
acpiconf(8) to accept '4BIOS' as an argument to '-s', or modify zzz(8)
so that one can pass a specific suspension method.

Reviewed by:    obiwac
Event:          Halifax Hackathon 202606
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D57414
fc6d7a7520d00943ab167544b145f404c10b406a Olivier Certner 2026-06-02 16:04:55
acpi_ibm(4): Refer to "mic *mute* led" instead of "mic led"
Event:                Halifax Hackathon 202606
Sponsored by:   The FreeBSD Foundation
40ab0a05640051eed02ccbf1c5150e97e8cc27da Aymeric Wibo 2026-06-22 14:42:55
amdsmu(4), acpi_spmc(4): Fix ordering of calls
The AMD SMU is supposed to be notified of suspension the SPMC has been,
and conversely on resume, as expressed in comments.

Fix the EVENTHANDLER(9) priorities used so that they match the
comments. Lower values indeed indicate higher priority in this
subsystem.

Reviewed by:    obiwac
Fixes:          https://cgit.freebsd.org/src/commit/?id=2c60fce365f4 ("amdsmu: Sleep entry/exit hints for PMFW")
Event:          Halifax Hackathon 202606
Sponsored by:   The FreeBSD Foundation
5bec087167e3934d7df06b4f98ed18c82349ddd2 Olivier Certner 2026-06-04 15:07:47
acpi: Constify thanks to AcpiGetHandle() taking a constant pathname
Make the ACPI interface's functions evaluate_object() and get_property()
take a constant pathname (by substituting ACPI_STRING with 'const char
*').

This allows to remove some __DECONST().

No functional change (intended).

Reviewed by:    obiwac
Event:          Halifax Hackathon 202606
Sponsored by:   The FreeBSD Foundation
Pull Request:   https://github.com/OlCe2/freebsd-src/pull/8
a12d069ef37fd60538b6f46372b194e6cf117250 Olivier Certner 2026-06-03 20:30:22
Commit group #0: acpi
acpi: Suffix acpi_sleep_enable() with '_locked'

For clarification.  This function assumes that the acpi mutex is held,
contrary to acpi_sleep_disable().

No functional change (intended).

Reviewed by:    obiwac
Event:          Halifax Hackathon 202606
Sponsored by:   The FreeBSD Foundation
Pull Request:   https://github.com/OlCe2/freebsd-src/pull/8
3b3911aaf834824f2de0db9fc7d0b9e2b3c089b4 Olivier Certner 2026-06-04 07:10:29

acpi: Button sleep/wake callbacks: Expose true argument types

This makes the interface composed of the
acpi_event_{power,sleep}_button_{sleep,wake}() functions more accurate
and clears the risk of calling them with a wrong object (such as a wrong
softc).

Reviewed by:    obiwac
Event:          Halifax Hackathon 202606
Sponsored by:   The FreeBSD Foundation
Pull Request:   https://github.com/OlCe2/freebsd-src/pull/8
660a491c41a2b90c35fe121c0b6a046b9af3cc00 Olivier Certner 2026-06-04 09:48:33

acpi: Sleep event handler: Remove a wrong comment

No functional change.

Reviewed by:    obiwac
Event:          Halifax Hackathon 202606
Sponsored by:   The FreeBSD Foundation
Pull Request:   https://github.com/OlCe2/freebsd-src/pull/8
c08c52e39e6e825000663ff602b219f03623d408 Olivier Certner 2026-06-04 10:05:40

acpi: Sleep/wake event handlers: Expose first argument's true type

This is for clarification and to slightly simplify code.

At present, the EVENTHANDLER(9) subsystem does not check that the first
argument to the event handler, registered via EVENTHANDLER_REGISTER(),
is of the right type with respect to the type declaration passed to
EVENTHANDLER_DECLARE(), so in that infrastructure no additional safety
is gained by this change.

No functional change (intended).

Reviewed by:    obiwac
Event:          Halifax Hackathon 202606
Sponsored by:   The FreeBSD Foundation
Pull Request:   https://github.com/OlCe2/freebsd-src/pull/8
6cce86c9bcd9656af6d3f5fddd600b40a3ab127c Olivier Certner 2026-06-04 10:15:37

acpi: Export handler invoke helpers, use them in acpi_lid

Removes duplicated code.

No functional change (intended).

Reviewed by:    obiwac
Event:          Halifax Hackathon 202606
Sponsored by:   The FreeBSD Foundation
Pull Request:   https://github.com/OlCe2/freebsd-src/pull/8
5ca875f3be030eb8ac80d8fb1b8f8018dc5eeb09 Olivier Certner 2026-06-04 10:55:45

acpi: Set 'acpi_sstate' closer to setting 'acpi_stype'

Makes on-going modifications for hibernate easier.

No functional change (intended).

Reviewed by:    obiwac
Event:          Halifax Hackathon 202606
Sponsored by:   The FreeBSD Foundation
Pull Request:   https://github.com/OlCe2/freebsd-src/pull/8
95ff2acb5555c6b165e7a32249c403cd339697d8 Olivier Certner 2026-06-04 07:37:57
x86: Harmonize GENERIC and MINIMAL
* Reorder MINIMAL so everything is in the same order as in GENERIC.

* Wherever comments diverged, except for the explanatory comment at
  the top, copy the GENERIC version to MINIMAL.

* Add KDTRACE_FRAME to i386 GENERIC; it was already in MINIMAL, and
  adding it to GENERIC seemed like the more correct move.

With these changes, MINIMAL is a strict subset of GENERIC, apart from
the identifier and the explanatory comment at the top.

Reviewed by:    imp
Differential Revision:  https://reviews.freebsd.org/D57729
01c8644093c28d09f0d41fb522dc53f1ab696a7e Dag-Erling Smørgrav 2026-06-23 07:51:01
hwpmc_amd: Avoid using PMCs if in use by firmware
Some firmwares use the PMCs to monitor OS performance.  We can't be
certain that the BIOS would detect any change to the counters if we
reprogram them.  In cases where the firmware is using the PMCs to
control power management this could have dangerous side effects or
unexpected performance effects.

During initialization, detect if any of the counters are enabled and
fail if so.

Reported by:    Sandipan Das
Reviewed by:    mhorne
MFC after:      1 week
Sponsored by:   Netflix
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2277
cf469ab83012ee47d06bc89874b6c109f49446e0 Ali Mashtizadeh 2026-06-10 23:20:16
hwpmc_ibs: Add more IBS register definitions
Small change to add additional IBS register definitions for the new pmc
tools.  Most of the definitions are for Zen 4 and above where we get
detailed information regarding the source of a completed memory
operation.

Reviewed by:    mhorne
Sponsored by:   Netflix
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2292
ed4f5e590ee643d784af12541df3f13768937485 Ali Mashtizadeh 2026-06-22 16:30:15
bnxt: Report actual link speed, rather than hard-coded 100Gbs
We need to report the actual link speed, rather than a hard-coded
100Gbs for a variety of reasons, but most importantly, as reporting
100Gbs on a 10g link breaks lacp when this NIC is in an LACP bundle
with other vendors' NICs after e98ed8d99fd4 (lacp:
Simplify lacp_compose_key()), as the fake 100g puts this nic
into a different aggregation group.

Sponsored by: Netflix
Reviewed by: glebius
Tested by: glebius
fdca6b70aa7ebbc95b544cec6e155ea5b1041899 Andrew Gallatin 2026-06-23 16:13:40
arm64: Fix build of gicv5 driver without SMP
Fixes:                https://cgit.freebsd.org/src/commit/?id=c84261da6f6c ("arm64: Add an initial GICv5 driver")
9522100a172466913cf6580b250101bfaa483460 John Baldwin 2026-06-24 00:56:41
riscv: Vector Extension (RVV) support.
RVV is a scalable SIMD (Single Instruction, Multiple Data) extension
designed to accelerate data-intensive workload such as AI, machine-learning
and DSP.

RVV exposes vector-length agnostic (VLA) execution and programming model,
with implementation defined vector register file size, dynamic vector
length selection, flexible register grouping, and rich instruction
semantics, serving as the foundation for portable, high-throughput
data-parallel acceleration.

Spec: https://github.com/riscvarchive/riscv-v-spec

RVV extends a base scalar RISC-V ISA with 32 vector registers and seven
unprivileged control-status registers (CSRs) to control the engine. Each
vector register could be up to 2^16 bits in length, depending on
implementation.

- Detect the extension during boot time ("v" letter in the ISA string)
- Implement RVV management code in the machine-dependent interfaces that
  handle CPU and thread state
- Add memory-management code for vector state save area. The allocation for
  save area in thread's PCBs has to be dynamic as the length of registers
  varies across implementations
- Save and restore RVV state on context-switch, fork(), scheduler entry
- Enable the extension usage on the first instruction trap from userspace
  ("lazy" enable)
- Implement ucontext.h POSIX API

Differential Revision:  https://reviews.freebsd.org/D56414
d7a393095cfd51d473a7c6b5e369e69a172f0c37 Ruslan Bukin 2026-06-24 07:48:58
riscv: Use namespace-safe type __uint64_t to not depend on sys/types.h
34397aec163cacf179991fc3606273093be6df2e Ruslan Bukin 2026-06-24 09:09:05
sound: Retire unused SD_F_EQ_PC
This flag is neither set anywhere, nor is there a way to set it from
userland, so it is effectively useless, and currently the effect is that
EQ can only be enabled for primary playback channels.

Retire the flag and keep this behavior, and think later whether we want
to allow virtual channels to get their own EQ feeder as well.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
ede0236d3b34a89bae7795f0f45696d4d94ce138 Christos Margiolis 2026-06-24 13:47:05
sound: Rename SD_F_EQ_ENABLED to SD_F_EQ
No functional change intended.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
a3d65cde7775818fb78afe935a4616a31f137c3d Christos Margiolis 2026-06-24 13:54:41
Commit group #1: acpi_ibm: Report mic mute key evdev events
acpi_ibm: Report mic mute key evdev events

While here, make the naming of micmute_led more consistent.

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=296140
Event:          Halifax Hackathon 202606
Reported by:    David Lundqvist
Reviewed by:    olce
Tested by:      David Lundqvist, Oleksandr Kryvulia
Co-authored-by: David Lundqvist
Sponsored by:   The FreeBSD Foundation
7e7f8b2c66410bcc6408482be73bd9c059e2bbe2 Aymeric Wibo 2026-06-20 21:29:49

acpi_support/acpi_ibm.c: move the 'key' definition to the block that uses it

This eliminates a warning from compilation of kernels without
EVDEV_SUPPORT.

Fixes:  https://cgit.freebsd.org/src/commit/?id=7e7f8b2c6641 ("acpi_ibm: Report mic mute key evdev events")
Sponsored by:   The FreeBSD Foundation
31b7d80016a37e4de10f166bc7ff353c7d1ef534 Konstantin Belousov 2026-06-24 15:23:12
Commit group #2: hwpstate_intel: Use ipi instead of thread_lock + sched_bind
hwpstate_intel: Use ipi instead of thread_lock + sched_bind

Reviewed by:    olce
Event:          Halifax Hackathon 202606
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55628
29b8220b179bf0ce93c0034ec5d9f46db9092353 ShengYi Hung 2026-02-26 04:59:04

hwpstate_intel(4): Fix recent copyright formatting

Add an "empty" (comment) line between copyright and the Foundation text.

Fixes:          https://cgit.freebsd.org/src/commit/?id=29b8220b179b ("hwpstate_intel: Use ipi instead of thread_lock + sched_bind")
Event:          Halifax Hackathon 202606
Location:       jrm@'s living room
Sponsored by:   The FreeBSD Foundation
0143a40f5712de0938c34e88b352b85399f88b19 Olivier Certner 2026-06-24 20:20:47

hwpstate_intel(4): Fix error tests

How I failed to notice this during the review will remain a mistery.

Fixes:          https://cgit.freebsd.org/src/commit/?id=29b8220b179b ("hwpstate_intel: Use ipi instead of thread_lock + sched_bind")
Event:          Halifax Hackathon 202606
Location:       jrm@'s bathroom
Sponsored by:   The FreeBSD Foundation
f6cb220172b14b435364b3e2e61e9465ec11afcb Olivier Certner 2026-06-25 01:54:28

hwpstate_intel(4): Fix uninitialized variable in debug dump sysctl

It can cause a "cannot read MSR" error to be reported although reading
actually worked.

Fixes:          https://cgit.freebsd.org/src/commit/?id=29b8220b179b ("hwpstate_intel: Use ipi instead of thread_lock + sched_bind")
Event:          Halifax Hackathon 202606
Location:       jrm@'s living room
Sponsored by:   The FreeBSD Foundation
486ef221b9350644d6ad9a6ad93603d93cef6712 Olivier Certner 2026-06-25 14:13:56

hwpstate_intel(4): Fix two MSR errors being conflated

HWP_ERROR_CPPC_REQUEST_WRITE and HWP_ERROR_CPPC_REQUEST_PKG had been
assigned the same number.

Fixes:          https://cgit.freebsd.org/src/commit/?id=29b8220b179b ("hwpstate_intel: Use ipi instead of thread_lock + sched_bind")
Event:          Halifax Hackathon 202606
Location:       jrm@'s living room
Sponsored by:   The FreeBSD Foundation
c0acab934a174761b4f0e94c263bbe90c0529fab Olivier Certner 2026-06-25 14:35:32

hwpstate_intel(4): Debug sysctl: Fix retrieving the pkg-level MSR

IA32_HWP_REQUEST_PACKAGE_CONTROL is never set in 'sc->req'.  Just
discriminate on 'hwp_pkg_ctrl', which indicates the hardware capability
as indicated by CPUID.

Fixes:          https://cgit.freebsd.org/src/commit/?id=29b8220b179b ("hwpstate_intel: Use ipi instead of thread_lock + sched_bind")
MFC after:      2 weeks
Event:          Halifax Hackathon 202606
Location:       Dalhousie CS Faculty building
Sponsored by:   The FreeBSD Foundation
9320b99017d598cb7295a1bf21f227aaaefcf9df Olivier Certner 2026-06-26 13:57:38

hwpstate_intel(4): Debug sysctl: Style

Introduce 'error', set it to the result of rdmsr_safe() and use 'error'
as the test expression.

No functional change (intended).

Fixes:          https://cgit.freebsd.org/src/commit/?id=29b8220b179b ("hwpstate_intel: Use ipi instead of thread_lock + sched_bind")
MFC after:      2 weeks
Event:          Halifax Hackathon 202606
Location:       Dalhousie CS Faculty building
Sponsored by:   The FreeBSD Foundation
8ea6d9f33ee3bb37b381d547517ae612ba1640db Olivier Certner 2026-06-26 14:03:51
virtio/p9fs: Define the channel list mutex as static
No functional change intended.

MFC after:      1 week
2586f9f459adc6610957ba0d74a167b85fe24ac7 Mark Johnston 2026-06-24 16:54:10
Commit group #3: hwpstate_intel: Use 8bit scale instead of percentage scale
hwpstate_intel: Use 8bit scale instead of percentage scale

Reviewed by:    olce
Relnotes:       yes
Event:          Halifax Hackathon 202606
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55629
8452afeb5682052b2533363ee3351d6d0e183e60 ShengYi Hung 2026-02-26 06:26:06

hwpstate_intel(4): sysctl_epp_select(): Cache again new EPP value

This caching was removed inadvertently in the commit mentioned below.

Fixes:          https://cgit.freebsd.org/src/commit/?id=8452afeb5682 ("hwpstate_intel: Use 8bit scale instead of percentage scale")
Event:          Halifax Hackathon 202606
Location:       jrm@'s living room
Sponsored by:   The FreeBSD Foundation
39975c7778fd6ac56571ec64a2003b06a1ca8a52 Olivier Certner 2026-06-25 00:17:58
Commit group #4: hwpstate_intel(4)
hwpstate_intel(4): Comment the EPB to EPP computation

Explain why the '* 17' instead of '* 16', as suggested in revision
D55629.

Event:          Halifax Hackathon 202606
Location:       jrm@'s living room
Sponsored by:   The FreeBSD Foundation
66d48f02de0fbf4d8efb3d4edc69f37c54f130fd Olivier Certner 2026-06-24 20:14:12
hwpstate_amd(4): Rename remaining 'struct set_autonomous_hwp_data'
For consistency.

No functional change (intended).

Fixes:          https://cgit.freebsd.org/src/commit/?id=c6a0eb7ada62 ("hwpstate_amd(4): Rename '*set_autonomous_hwp*()' => 'enable_cppc*()'")
Event:          Halifax Hackathon 202606
Location:       jrm@'s living room
Sponsored by:   The FreeBSD Foundation
7b107346448a7df2446bc67bf0bc2a6acaef5cbf Olivier Certner 2026-06-25 01:01:41
asmc: Refactor sensor detection and sysctl registration
Replace repeated per-sensor-type blocks for voltage, current, power,
and ambient light sensors with table-driven loops.

Reviewed by:    ngie, adrian
Differential Revision:  https://reviews.freebsd.org/D57595
104b311a03e45ebb8fd7a93e4ac26644bbae9bae Abdelkader Boudih 2026-06-25 02:06:34
firewire: add shared helpers for ISO receive drivers
Add fw_helpers.h with common static inline helpers for FireWire ISO
receive drivers: async xfer wait with timeout and tlabel cleanup,
quadlet read/write, and ISO mbuf management.

Reviewed by:    adrian
Differential Revision:  https://reviews.freebsd.org/D57684
af20f017ec0b75456d9031059bc79be01f141c3b Abdelkader Boudih 2026-06-25 02:18:52
fwcam: add IIDC 1394 FireWire camera driver
Add fwcam(4), a driver for IIDC v1.30 (TA Document 1999023) digital
cameras over IEEE 1394.

Supports Format_0 (VGA) video modes with isochronous receive DMA,
feature control (brightness, exposure, gain, shutter, white balance,
focus, etc.), poll/kqueue, and hot-plug via bus reset handling.

Reviewed by:    adrian
Differential Revision:  https://reviews.freebsd.org/D57685
40e05479718460820cd24c22e59519a4f13eba3d Abdelkader Boudih 2026-06-25 02:14:22
acpi_cpu(4): Remove unused 'acpi_cpu_disabled' boolean
It is not used anywhere.  Disabling acpi_cpu(4) can be done through the
regular ACPI disable mechanism (using the 'debug.acpi.disabled' tunable,
see acpi_disabled()).

Reviewed by:    emaste, obiwac
Fixes:          https://cgit.freebsd.org/src/commit/?id=ac3ede5371af ("x86/xen: remove PVHv1 code")
MFC after:      3 days
Event:          Halifax Hackathon 202606
Location:       Dalhousie CS Faculty building
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D57888
98a77972381c6bb5ceda375fd1db7dccb3a1c89e Olivier Certner 2026-06-26 14:40:50
acpi_hpet(4): Remove unused 'acpi_hpet_disabled' boolean
Same reason as for the previous commit to acpi_cpu(4).  This boolean is
not used anywhere.  Disabling acpi_hpet(4) can be done through the
regular ACPI disable mechanism (using the 'debug.acpi.disabled' tunable,
see acpi_disabled()).

Reviewed by:    emaste (implicit)
Fixes:          https://cgit.freebsd.org/src/commit/?id=ac3ede5371af ("x86/xen: remove PVHv1 code")
MFC after:      3 days
Event:          Halifax Hackathon 202606
Location:       Dalhousie CS Faculty building
Sponsored by:   The FreeBSD Foundation
25df388574ac1d295f4014825de0df1d65cbdc53 Olivier Certner 2026-06-26 15:12:58
acpi_timer(4): Remove unused 'acpi_timer_disabled' boolean
Same reason as for the previous commit to acpi_cpu(4).  This boolean is
not used anywhere.  Disabling acpi_timer(4) can be done through the
regular ACPI disable mechanism (using the 'debug.acpi.disabled' tunable,
see acpi_disabled()).

Reviewed by:    emaste (implicit)
Fixes:          https://cgit.freebsd.org/src/commit/?id=ac3ede5371af ("x86/xen: remove PVHv1 code")
MFC after:      3 days
Event:          Halifax Hackathon 202606
Location:       Dalhousie CS Faculty building
Sponsored by:   The FreeBSD Foundation
ad26a56cf2f55967cc73d04a6ea17c27892d3141 Olivier Certner 2026-06-26 15:21:41
iichid(4): Always release interrupt resource
Reviewed by:  aokblast
Event:          Halifax Hackathon 202606
Location:       Chair
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D57886
0cedb626959c0bbab6497d1f042beddab059bdaa Aymeric Wibo 2026-06-26 18:52:25
tpm_tis: release TPM resources after reading response
Per TIS 1.3 section 5.6.12, write commandReady to TPM_STS after reading the
response so the TPM can free its ReadFIFO and other internal resources.
The subsequent tpmtis_go_ready() provides the second write the spec describes
and waits for the state transition.

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295103
Reported by:    Benoit Sansoni <benoit.sansoni@gmail.com>
Reviewed by:    kevans
Approved by:    kevans
Differential Revision:  https://reviews.freebsd.org/D57841
e4c50d86796d07cf90e6a683234e1c0e9ca5e03c Olivier Cochard 2026-06-26 19:20:30
hwpstate_intel(4): Debug sysctl: Rename struct/field
New names are better descriptions and match what is done in
hwpstate_amd(4).

No functional change (intended).

MFC after:      2 weeks
Event:          Halifax Hackathon 202606
Location:       Dalhousie CS Faculty building
Sponsored by:   The FreeBSD Foundation
9209e04d76c577863210dbc9faa94d4dd7498af6 Olivier Certner 2026-06-26 13:51:10
snd_dummy: advance pointers for both channels
Previously only the play pointer advanced each tick; the record channel
refilled the whole buffer with silence and left the DMA pointer at 0.
Advance the record pointer by one block per tick and fill that block
with silence, so the DMA pointer changes and mmap kqueue consumers can
track progress.

MFC after:      1 week
Reviewed by:    christos
Differential Revision:  https://reviews.freebsd.org/D57834
968e748c439a50ad0a1a4463f4753f58a2bdaf9f Goran Mekić 2026-06-27 13:41:57
sound: Use sx_assert instead of KASSERT(sx_xlocked())
It's redundant.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
72acd1720af365e6fd186cc1706994d72c43650a Christos Margiolis 2026-06-27 14:25:27
virtio_pci_modern: Remove endianness conversion for config space
The bus_* functions already handle converting from PCI endianness
(i.e. little-endian) to native endianness when accessing the config
space (see ofw_pcib_bus_get_bus_tag), so converting again with
virtio_htogX/virtio_gtohX undoes any byte-swapping and breaks
big-endian systems. They should only be used for operating on shared
memory.
Note part of this reverts commit fb53b42e36a9 ("virtio-modern: fix PCI
common read/write functions on big endian targets").

PR:                     https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294706
Reviewed by:            adrian, tuexen
Fixes:                  https://cgit.freebsd.org/src/commit/?id=fb53b42e36a9 ("virtio-modern: fix PCI common read/write functions on big endian targets")
Fixes:                  https://cgit.freebsd.org/src/commit/?id=9da9560c4dd3 ("virtio: Add VirtIO PCI modern (V1) support")
MFC after:              1 week
Differential Revision:  https://reviews.freebsd.org/D57392
07b5d1ca52b113cecad3cda73ff5e782d8f4d07d Timo Völker 2026-06-28 10:39:10

Networking

Network-related commands, library, and kernel.

if_fwsubr: remove ARP target hardware address trimming
Per RFC 2734 section 5, the 1394 ARP packet is a fixed 32-octet structure
with no target hardware address field.

Reviewed by:    adrian
Differential Revision:  https://reviews.freebsd.org/D57617
3ffd2baa268d298201d54c733dc0e635cc1dca9f Abdelkader Boudih 2026-06-22 00:31:29
ipfw/nat64: Fix type confusion panic when using wrong NAT64 instance type
Add etlv type validation to ipfw_nat64clat() and ipfw_nat64stl() to
verify that the retrieved instance is actually a nat64clat instance
before use.

All NAT64 instance types share the same srvstate[] array but have
different struct layouts.
Without type validation, using the wrong instance type with
a handler causes type confusion and kernel panic.

Signed-off-by:  Teddy Engel <engel.teddy@gmail.com>
PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292023
Reviewed by:    pouria
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2259
2e6b22abf44d99b84abf17fe25ca2e8f89716c04 Teddy Engel 2026-06-02 16:24:57
iflib: handle transient errors from isc_txd_encap()
Until we introduced support for nic ktls offload, all error returns
from isc_txd_encap() indicated a permanent failure. Iflib remapped all
those failures to ENOMEM, which was treated by the tcp stack as a
permanent error and passed back to the caller. This was done to avoid
creating "infinite loops" where a packet couldn't be mapped for
transmit, and kept being sent over and over.

Now that we have support for nic ktls offload, some ktls offload
drivers may return ENOBUFS from their encap function to indicate that,
for example, the ktls context may not yet be fully initialized.  This
needs to be treated as a transient error so that the TCP stack may
re-try at a later time. To achieve this, pass the raw error back to
the caller when the encap routine returns an error aside from EFBIG.

Note that I audited all in-tree iflib drivers. Only ice and ixl ran
return anything other than 0 from their encap, which is EFBIG. both of
which are still treated as they were before.

Testing with an out-of-tree ktls offload nic using iflib showed ENOMEM
errors from sendmsg() before this change, and no more errors passed
back to userspace after this change.

Reviewed by: kp, sumit.saxena_broadcom.com
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D57550
074ff8746388b3ed8581a84a7eea7b4b3e1bfe23 Andrew Gallatin 2026-06-15 14:20:41
ctld: Simplify handling of non-iSCSI and non-NVMe kernel ports
Just add these directly to the kports object rather than treating them
as iSCSI ports.

Sponsored by:   Chelsio Communications
Differential Revision:  https://reviews.freebsd.org/D57283
03ac6fe4f6d2bce06a672024152eb894a423dfcb John Baldwin 2026-06-24 15:28:51
pflog: remove unused argument from pflogattach()
efcc183f9b0dad94b7e954556e6e2515ec0f85be Kristof Provost 2026-06-21 16:19:22
netinet6: refactor in6_pcbconnect()
If the inpcb is already bound to a local address, there is no reason to
call in6_pcbladdr().  If the inpcb is already bound to a local port, there
is no reason to call in_pcb_lport_dest().  In the opposite case, if the
inpcb is not bound, and we are about to choose a non-conflicting local
addr:port, then there is no reason to call in6_pcblookup_internal().

This change makes in6_pcbconnect() to look much more alike the IPv4
in_pcbconnect().  I tracked this strange logic all the way down to initial
KAME import and failed to find any reasoning for it.

Reviewed by:            pouria
Differential Revision:  https://reviews.freebsd.org/D57534
90ea8e89d9b751e8b5ae90ef3397883b035788e5 Gleb Smirnoff 2026-06-25 21:34:38
ng_socket: simplify protosw(9) methods
- so_pcb can't be non-NULL in pr_attach.
- so_pcb can't be NULL in all other methods.
- Short circuit data socket attach down to the common attach.
- Short circuit both detach methods down to common one.
- Inline control socket attach.
- Inline control pr_bind.
- Inline data pr_connect.
- Rely on pr_connect_notsupp() for control connect(2).
- Don't use cast on so_pcb, it is void *.

Should be no functional change.
41bc52c89320807c1162f5547b07c29fcb718e19 Gleb Smirnoff 2026-06-26 19:01:30
ng_socket: plug node reference leak
There is no need to reference node in its constructor, the framework
already granted us a reference.  This extraneous reference was later given
back on socket detach.  However, if node is destroyed before the socket,
the node was leaked.  This leak was harmless until VIMAGE, where
vnet_netgraph_uninit() would cycle through all nodes and shut them down
expecting them to not exist after the shutdown.

Fixes: https://cgit.freebsd.org/src/commit/?id=19284374970533e1aa04020d4f840e8877ed6266
4d3cbeb7b407e127a5364f86039745068fbfc61f Gleb Smirnoff 2026-06-26 23:03:14
ctld: Normalize physical port names
Don't require ioctl port names to be fully expanded as this
contradicts the syntax documented in the ctl.conf(5).  However, don't
require users to exactly guess when pp or vp can be omitted.  Instead,
normalize all physical port names by parsing any port name with a pp
or vp value and reformatting them to a standardized format.  This
format is also used when generating names for kernel-enumerated ports.

Reported by:    Seth Hoffert <seth.hoffert@gmail.com>
Fixes:          https://cgit.freebsd.org/src/commit/?id=caef3c50ac06 ("ctld: Refactor ioctl port handling")
Sponsored by:   Chelsio Communications
4907d1c5c7f97ca985611441df5871705b90030c John Baldwin 2026-06-25 16:21:25
ctld: Cleanup redundant handling of duplicate kernel ports
Sponsored by: Chelsio Communications
21e94133eb51ef4eaea5bc37891741dd52d5933b John Baldwin 2026-06-26 19:42:33
loopback: improve checksum offloading
* Allow disabling IFCAP_RXCSUM_IPV6 or IFCAP_TXCSUM_IPV6.
* Do not pretend the checksum is correct by setting the LO_CSUM_SET
  flags if IFCAP_RXCSUM_IPV6 or IFCAP_RXCSUM is enabled. Instead,
  remove the LO_CSUM_SET flags (in case they have been set somehow)
  if IFCAP_RXCSUM_IPV6 or IFCAP_RXCSUM is disabled.
* Do not unset the transmit checksum offload flags LO_CSUM_FEATURES or
  LO_CSUM_FEATURES6 since they now have a meaning for the receive path.

Reviewed by:            glebius, pouria, tuexen
Okayed by:              bz
MFC after:              1 week
Differential Revision:  https://reviews.freebsd.org/D57518
d6c4cea7740d5c5c673a06ba37e4f1bdcddb2ece Timo Völker 2026-06-28 10:50:15
rack_bbr_common: don't use stale pointer after m_pullup()
Reviewed by:          tuexen
MFC after:              1 week
Differential Revision:  https://reviews.freebsd.org/D57816
be23edc1e4028e32a46e8fe7118de787fd5d79a2 Jana Smith 2026-06-28 11:04:05
pflog: create bpf tapping points without ifnet(9)
Just as was done for ipfw's log device stop creating entire struct
ifnet's for pflog devices. Create only a bpf_t.

This does mean we lose the create/destroy infrastructure provided by the
clone interface. Rather than implement this ourselves we allow users to
configure the number of pflog interfaces using the net.pflog.if_count
sysctl. We default to 8 devices, but allow up to 256.

The /etc/rc.d/pflog script will create extra devices as required.

While it was possible to rename pflog devices pfctl expected the pflogX
name, so it's safe to assume users never did this.

Requested by:   glebius
Reviewed by:    glebius
Sponsored by:   Rubicon Communications, LLC ("Netgate")
Differential Revision:  https://reviews.freebsd.org/D57851
e4f3ab161a9e149fd2f657f6d8af2ba3c618255f Kristof Provost 2026-06-24 10:21:20

System administration

Stuff in man section 8 (other than networking).

rtld: Check for -1 as an-end-of-section marker
rtld calls functions in the .init_array section one at a time, until
it finds a distinguished sentinel value. The C runtime does the same
thing (in crtend.c). However, that checks for the sentinel -1 and not
1. If one is using a linker that unifies .ctors and .init_array, then
rtld will miss the sentinel value. I believe the author of this code
intended to write -1 instead of 1. Indeed, changing the code to also
check for -1 prevents rtld from attempting to call a non-existent
function. The same is true of .dtors and .fini_array.

Signed-off-by:  Daniel Levin <daniellevin2607@gmail.com>
Reviewed by:    kib
MFC after:      3 days
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2270
45a0cb52d3d62f8caae420b93e4b8c76ae3bc766 Daniel Levin 2026-06-08 14:42:03
etcupdate: Warn if the tree hasn't been built
Warn the user before trying `make installetc` if etcupdate was invoked
without -b (or with -B) and it appears that `make buildetc` hasn't
already been run (which usually happens as part of `make buildworld`).

MFC after:      1 week
Reviewed by:    jhb
Differential Revision:  https://reviews.freebsd.org/D57504
53a3d4760eb90c89bf04636c957511882d7f347d Dag-Erling Smørgrav 2026-06-22 18:59:18
makefs/zfs: Explicitly include sys/param.h for nitems()
MFC after:    1 week
Sponsored by:   The FreeBSD Foundation
88deb1cff92cb3620c248f32fa6e7bdbc5301213 Mark Johnston 2026-06-22 20:19:32
loader.efi: Fix a comment
Move a comment further up in the file. After the sethead() we need to
use efi_exit(), not after the performance measuring stuff.

Sponsored by:           Netflix
e8a3352e8b5784fe3417a367a488159f0ab30ae8 Warner Losh 2026-06-22 22:17:12
adduser.sh: Add info which separator to use in the question itself
During the non-root user setup (adduser.sh), people are often confused
what the separator is when they are asked which groups to join the new
user into. For example, wheel and operator: users often assume that the
two groups are separated by a comma (and maybe even a space after it),
but the script will check for that and refuses such entries.

Help the users by mentioning that the groups need to be space separated
in the question itself. That way, it does not take up extra space and
avoids confusion about what the separator is.

Reviewed by:            jrm
Event:                  Halifax Hackathon 202626
Differential Revision:  https://reviews.freebsd.org/D57768
15a1ba4a1c467a686573158fd5e49abafa42d587 Benedict Reuschling 2026-06-23 13:13:44
zfskeys - only prompt if zfskeys and zfskeys_prompt are enabled
By default don't block booting with a prompt if a zpool needs a keyboard
password to unlock it.  To enable prompting for keyboard password during
boot require:
    zfskeys_enable="YES"
    zfskeys_prompt_enable="YES"

to both be enabled.  This returns to POLA of prior behaviour.

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=296130
Reviewed by:    kevans
Differential Revision:  https://reviews.freebsd.org/D57750
276a3dacdb60b65d65301aced5d8443cc5d27ea2 Doug Ambrisko 2026-06-22 18:45:42
ping: Flush stdout after printing initial status
MFC after:    1 week
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D57765
141bb8579882f9d1f7e95351573e30f10689f4bf Dag-Erling Smørgrav 2026-06-23 15:20:22
Commit group #5: rc
rc: Fix improper use of load_kld

Fix scripts that needlessly used -e when the simpler -m would work, or
that used -m when the module and file name are the same, or, in one
particularly egregious case, used -m with the wrong name when using
nothing at all would have worked just fine.

MFC after:      1 week
Reviewed by:    imp
Differential Revision:  https://reviews.freebsd.org/D57705
cfe1962a19259fea8f51673f4da6c96656776486 Dag-Erling Smørgrav 2026-06-23 15:23:25

rc: Improve load_kld

* Centralize the usage message.

* Document and enforce that -e and -m are mutually exclusive; previously,
  speficying both would result in only -e being applied.

* If -e was not specified, and -m was not specified or did not match,
  fall back to `kldstat -n file` which will always work for modules that
  aren't built into the kernel.

This means the kld and ntpd scripts can now rely on load_kld to dtrt.

MFC after:      1 week
Reviewed by:    imp
Differential Revision:  https://reviews.freebsd.org/D57706
a95d324dd3107afcbc16767d183acca7a57ebca9 Dag-Erling Smørgrav 2026-06-23 15:23:30

rc: Make devmatch use load_kld

The default behavior of load_kld is now robust enough for devmatch.
Switching means settings from /etc/sysctl.kld.d are now properly applied
when the corresponding modules are loaded by devmatch.

While here, reduce the amount of output produced by devmatch from one
line per module to a single line.

MFC after:      1 week
Reviewed by:    imp
Differential Revision:  https://reviews.freebsd.org/D57707
b9f616d031566e94e6967a2c533b8aa7f36123b9 Dag-Erling Smørgrav 2026-06-23 15:23:34
pciconf: Minor cleanups in the config register methods
This is mostly to provide cleaner code for future changes to copy
from.

- Use NULL instead of casting 0 to pointer types.

- Inline readone() in the sole caller now that it is just a single line.

- Use a helper variable for the count of items on each line of output
  in readit().

- Fix the double space in the middle of byte output to only trigger
  for width 1.  For other widths it would output spurious spaces at
  the end of the line which doesn't really hurt, but is buggy
  nonetheless.

- Avoid using implicit booleans by explicitly comparing integer
  expressions against zero.

- Don't compare the endptr returned from strtol() against NULL.

Differential Revision:  https://reviews.freebsd.org/D57535
c6eb9f16cf0e19b54b382aa44f0c9a7bcec5fc40 John Baldwin 2026-06-23 15:51:43
Commit group #6: makefs cd9660: Populate creation time stamps in RockRidge extensions
makefs cd9660: Populate creation time stamps in RockRidge extensions

Differential Revision:  https://reviews.freebsd.org/D57527
0a301f33306c07e629a2423827238aaef85f5d68 John Baldwin 2026-06-23 15:51:43

makefs: Fix build on systems without st_birthtime such as Linux

Reviewed by:    emaste
Fixes:          https://cgit.freebsd.org/src/commit/?id=0a301f33306c ("makefs https://cgit.freebsd.org/src/commit/?id=cd9660: Populate creation time stamps in RockRidge extensions")
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2297
4e57c2aa307d34ca6e44f01c6fd671734ed5e486 John Baldwin 2026-06-25 15:37:55
ifconfig: Fix handling of unsupported -j option with MK_JAIL=no
The ifconfig(8) utility built with MK_JAIL=no does not support the
-j option.  When the option is specified, Perror() is called without
setting errno, which can result in errno being reported as zero and
a misleading error message being displayed.

Also remove "[-j jail]" from the usage message when built with
MK_JAIL=no.

Event:  Halifax Hackathon 202606
7e093e5780bbf5af416526c1ab6339fe6e94b37b Hiroki Sato 2026-06-23 21:02:47
loader/efi: pre-allocate memory map buffer before ExitBootServices
Move the memory map allocation before the ExitBootServices retry
loop to ensure no boot service calls occur between GetMemoryMap
and ExitBootServices.  This simplifies the control flow by removing
the inner sizing loop and matches the strategy used by the Linux
EFI stub.

Identified while investigating an ExitBootServices hang on
AMD AGESA 1.3.0.0a firmware (Gigabyte B650 GAMING X AX V2).

Signed-off-by:          Christos Longros <chris.longros@gmail.com>
Reviewed by:            imp
Differential Revision:  https://reviews.freebsd.org/D56249
9417b115a283f4c09da35c5ccff9787e2ac95505 Christos Longros 2026-06-24 04:42:12
pciconf: Add option to write into a BAR region
Add option -W that allows to write into a BAR region.

Also, add an option -R that allows to read from a BAR region that
works similar to -r that reads from the PCI config space.

Reviewed by:    bcr (manpages), jhb
Differential Revision:  https://reviews.freebsd.org/D55915
e63fbcc69402d4a1e8681a95710f0ec01a6837b4 Timo Völker 2026-06-24 19:57:34
adduser: Normalize supplemental groups
Rather than insist on a space-separated list, normalize the input so
that any number of spaces, commas, colons, or semicolons are accepted.

Reviewed by:    bcr
Differential Revision:  https://reviews.freebsd.org/D57774
65fba082f44cb9451d2b12bcd99c3287d0a47acc Dag-Erling Smørgrav 2026-06-25 03:05:36
rc.firewall: Use checkyesno for boolean variables
Use the checkyesno function from rc.subr instead of hardcoded checks for
boolean variables.  Also drop an incorrect comment about the default
logamount value; the actual default is zero (unlimited).

MFC after:      1 week
Reviewed by:    kevans, allanjude
Differential Revision:  https://reviews.freebsd.org/D57678
a3c077c1ccbe57ffad6317879bc1e49291892414 Dag-Erling Smørgrav 2026-06-26 14:38:44
rc.firewall: Support on-disk lists
For firewall_allowservices and firewall_trusted, if an element of the
list looks like an absolute path, read the file, skipping comments and
blank lines, and treat the first word on each line as an address or
subnet to be added to the list.

We should probably be using tables instead, but this is still an
improvement over the status quo ante.

MFC after:      1 week
Relnotes:       yes
Reviewed by:    allanjude
Differential Revision:  https://reviews.freebsd.org/D57679
a71abf38e2b46c02965f3224c62bb6ef1971996e Dag-Erling Smørgrav 2026-06-26 14:38:53
rc.d/ddb: Really silently exit
The comment says “silently exit if ddb is not enabled”, but we'd exit
with an error message.

Note that I switched the sysctl variable used to test for the presence
of ddb from debug.ddb.scripting.scripts to d.d.s.script, which has a
smaller value if set.

While here, drop a pointless fork-exec, and use ${SYSCTL_N} for
consistency.

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=177217
MFC after:      1 week
Reviewed by:    kevans
Differential Revision:  https://reviews.freebsd.org/D57686
b0d3a2889a1b8e4b73ad1f396884224e1442b214 Dag-Erling Smørgrav 2026-06-26 14:38:58
rc.d/tmp: Fix dupe mount check
Before mounting a new mfs on /tmp, we check if there already is one.
However, the dupe check only takes /dev/md[0-9]* into account, while the
default mfs type these days is tmpfs.  Rewrite it to look for tmpfs as
well.

Note that the dupe check is redundant in the tmpmfs=auto case, but we
leave moving it for later.

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=182035
MFC after:      1 week
Reviewed by:    kevans, allanjude
Differential Revision:  https://reviews.freebsd.org/D57682
45efa4e61623e3eeee7fd0a3f4436616e24c8e98 Dag-Erling Smørgrav 2026-06-26 14:39:03
local-unbound-setup: Support IPv6-only systems
* In the server configuration, disable protocols not supported by the
  kernel.

* In resolv.conf, instead of only using 127.0.0.1, use either 127.0.0.1,
  ::1, or both depending on which protocols the kernel supports.

MFC after:      1 week
Reviewed by:    jlduran
Differential Revision:  https://reviews.freebsd.org/D57840
f0a861efbafeb81428d5e8c23dac9da73fe14007 Dag-Erling Smørgrav 2026-06-26 14:43:26
ping: Don't mix stdio and direct writes
POSIX does not allow mixing direct writes to STDOUT_FILENO with stdio
operations on stdout like we do here.  More importantly, it causes
tests to fail randomly (or not-so-randomly after I added an fflush in
a previous commit).

MFC after:      1 week
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D57884
8bda488114f330d758e6741ff44882bb12b76c0d Dag-Erling Smørgrav 2026-06-26 14:46:09
loader.efi: Add comments describing the boot protocol
Add some comments about the boot protocol. Need to do a deeper dive into
the networking code since it's the last set of code used here.

Signed-off-by: Warner Losh <imp@FreeBSD.org>
Differential Revision:  https://reviews.freebsd.org/D57800
1e49aa7a984e0d4381538aa6cf16d37b20b000b9 Warner Losh 2026-06-26 14:45:31
loader: Add defines for ZLIB_CFLAGS, BZIP2_CFLAGS and ZSTD_CFLAGS
These are scattered in several places, so centralize the setting of
these flags.

Sponsored by:           Netflix
Differential Revision:  https://reviews.freebsd.org/D57861
53811ed6237972f92a80627ea2c17ece212315a7 Warner Losh 2026-06-26 14:45:42
Commit group #7: loader.efi
loader.efi: Add verbose flag to try_as_currdev

Since we print almost everywhere before we call this, centralize the
devpath to text dance here.

Sponsored by:           Netflix
Differential Revision:  https://reviews.freebsd.org/D57801
7140742c8c684c96644c094ed489ff5167c77c5a Warner Losh 2026-06-26 14:45:46

loader.efi: Refactor try_boot_device_partitions

Break out the probing into try_disk_and_partitions and adjust the trying
message slightly to be a little clearer what we're doing.

Sponsored by:           Netflix
Differential Revision:  https://reviews.freebsd.org/D57802
ce9bfd781679ba67123345352a754c2e2dd1ef0b Warner Losh 2026-06-26 14:45:51

loader.efi: Expand uefi_rootdev to probe disks

uefi_rootdev had to be the exact device to work. This is often difficult
to arrange and awkward. Instead, have it search the specified device: As
a partition if it specifies the partition, and as the whole disk if the
specified partition didn't work or it specifies a disk. This brings it
into lone what we do with other devices. This overrides the boot manager
search we do before we do this for the boot device, but this knob has
always been meant to overload the boot manager search.

Sponsored by:           Netflix
Differential Revision:  https://reviews.freebsd.org/D57803
82eb1970759de3fb7eacbbfc1e53bf64bf48dfe4 Warner Losh 2026-06-26 14:45:55

loader.efi: Improve the trying MD messsages

Expand the tring MD message a little to make it clearer.

Sponsored by:           Netflix
Differential Revision:  https://reviews.freebsd.org/D57804
7f5475594aabf1d6aa3db4c9237a2bd4f4aef6c4 Warner Losh 2026-06-26 14:46:01

loader.efi: Trim ZFS searching for other booting options

When we're searching the system for all the disks in relaxed mode, we
need to do a final pass over all the non-boot disks. We no longer need
to have two loops since ZFS on boot device is selected properly in
try_boot_device_partitions. This also simplifies the code a bit.

Sponsored by:           Netflix
Differential Revision:  https://reviews.freebsd.org/D57805
3e3fd1fde8e168910edc538966111c0b5f03cd5f Warner Losh 2026-06-26 14:47:25

loader.efi: efiblk_memdisk_preload passes the VirtualDisks to FreeBSD

Set hint.md.%d.physaddr and hint.md.%d.len for each of the VirtualDisks.
The memory for these remains after we exit boot services so FreeBSD can
use them. This leverages the BIOS work we did for memdisks. In
hindsight, I should have passed this in via metadata, but it's been in a
release.

Sponsored by:           Netflix
Differential Revision:  https://reviews.freebsd.org/D57806
59219fc76a4bde45039695373a662ad59432d451 Warner Losh 2026-06-26 14:47:31

loader.efi: Recognize new memdisk=<url> and memcd=<url> options

Support ipxe downloading of a memory disk (either presented to the OS as
a harddisk or a cd). This requires an ipxe server since it uses the ipxe
download protocol to grab the disk. If there is a disk, we add it to the
environment as a disk, and then the rest of the bootloader just sees it
and boots from it.

I've cribbed code from https://github.com/russor/memdisk_uefi and
adapted it to work in the context of the FreeBSD bootloader.

The ipxe_download.h file was created from the documentation of the
interface.

So a .ipxe file with the line
chain http://10.2.0.1/loader.efi memdisk=${cwduri}FreeBSD-15.1-RELEASE-amd64-bootonly.iso
would use the FreeBSD boot loader to boot the FreeBSD 15.1 release.

md(9) has a bug at the moment that prevents it from probing the
partitions on it.

Also, we'll automatically decompress gzip, bzip2 and zstd files
automatically.

Sponsored by:           Netflix
Differential Revision:  https://reviews.freebsd.org/D57677
afee781523e45198c7be0a19281bcae2c4ab66db Warner Losh 2026-06-26 14:47:36

loader.efi: Fix build with gcc due to pointer / int issues on 32-bit build

Use (uintptr_t) casts to cast the EFI_PHYSICAL_ADDDRESS to a pointer.

Fixes: https://cgit.freebsd.org/src/commit/?id=afee781523e4 ("loader.efi: Recognize new memdisk=<url> and memcd=<url> options")
Sponsored by:           Netflix
Reviewed by:    rlibby
Differential Revision:  https://reviews.freebsd.org/D57893
9cb1459633a1f96ed2fd5bd37530be3c4f6ae9e6 Warner Losh 2026-06-26 23:12:48

830d7396cd3aaa0bb9980e6d778f8f9c1d17b1a2 Dave Cottlehuber 2026-06-26 23:27:29
gstat: Refactor and polish. Added option for {kB/MB/GB} per second.
c263dd413ca0b43b4513e6e6dd8ed64c0eb9c3aa Poul-Henning Kamp 2026-06-27 11:26:18
rc.d: fix lockd and statd flags processing after scvj
The documented flags are named differently than the script name, this
requires special handling of the flags.

The Service Jails feature requires the handling of the variable to be
differently than it was initially. The change back then did not work,
which resulted in the flags to be ignored.

This commit fixes the issue in head. This affects 15.0 and 15.1 too.

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=296233
Reported by:    Robert Blayzor <rblayzor@inoc.net>
Tested by:      Robert Blayzor <rblayzor@inoc.net>
Fixes:          https://cgit.freebsd.org/src/commit/?id=f99f0ee14e3af81c2 - rc.d: add a service jails config to all base system services
MFC after:      1 month
MFC to: 15-stable
d05d60e958bca778ea193932facb026c48d7ca0b Alexander Leidinger 2026-06-27 13:44:33
gstat: Sanitize code which gcc did not like.
27e292627589172e70ea01a736f639d7aedbab9d Poul-Henning Kamp 2026-06-27 15:10:25

Libraries

iconv: Update availability of bool
While here, drop duplicate include.

MFC after:      1 week
Reviewed by:    kevans
Differential Revision:  https://reviews.freebsd.org/D57733
8f750231d4b58ac71cbd3ac3548e1d7eb849f04b Dag-Erling Smørgrav 2026-06-22 13:23:23
Commit group #8: libusb
libusb: implement IAD parser

libusb provide functions to parse interface association descriptor. This
descriptor indicates that a function is composed by multiple interface
and which interfaces is associate to the target function. This
descriptor is not a separate USB require, instead, it comes with the
config descriptor.

Reviewed by:    adrian
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D50958
ae489991d1c0b550ead309abc1eade3b185e7499 ShengYi Hung 2025-06-11 17:24:04

libusb: implement libusb_set_option

Implement libusb_set_option for API compatibility of libusb upstream
The implementation status of each option is as following:

LIBUSB_OPTION_LOG_LEVEL: just like libusb_set_debug
LIBUSB_OPTION_LOG_CB: add callback support for DPRINTF
LIBUSB_OPTION_NO_DEVICE_DISCOVERY: disable initialization of devd and
netlink when register. Also, create no thread when registration of
callback happens.
LIBUSB_OPTION_USE_USBDK: no needed as USBDK is for Windows

Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D50818
2879c818e5535e9c9dc592714c7d4ef0c1c9e8c1 ShengYi Hung 2025-06-11 19:07:39

libusb: refactor the process of setting option when init the context.

From
https://github.com/libusb/libusb/commit/6622f386f52807dac76c8a260c98aa02c311bc93#diff-c1f9bc250077d41456a3e580fca0ddf5d8c25b741bff6d9b9505990a8b70b254R2358.
We are able to set all of the option from the init_context. To address
this, we modify the process of setting option in init_context to make it be more clear and then
adapat libusb_set_option inside to all other option.

Reviewed by:    adrian
Sponsored By:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D51224
be95871347a85f6feac59d036f62182fce847f23 ShengYi Hung 2025-07-09 09:36:07

libusb: implement libusb_get_max_alt_packet_size

The libusb has a function to calculate the size from given interface,
alt_setting, endpoint. Implementing it by refactoring the calculating
function for libusb_get_max_iso_packet_size.

Reviewed by:    adrian
Sponsored By:   FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D51225
964823a18e116e86c05e1d6a6fd80b1bb3274e57 ShengYi Hung 2025-07-09 10:49:24

libusb: implement zlp flag in libusb transfer

The USB protocol defines a Zero-Length Packet (ZLP) to signal the end of
a transfer when the data size is an exact multiple of the Maximum Packet
Size (MPS). Without a ZLP in such cases, the device may not be able to
determine that the transfer has completed.

This flag is added to libusb to allow the user send a ZLP in the end
of libusb_xfer.

Reviewed by:    adrian
Sponsored by:   The FreeBSD Foundataion
Differential Revision: https://reviews.freebsd.org/D51759
d84b639a684e7e0640e7c24a1a6dbc09da4bc3d4 ShengYi Hung 2025-08-06 12:48:05

libusb: Add missing default in handling option switch

This makes GCC happy

Fixes:  https://cgit.freebsd.org/src/commit/?id=2879c818e553 ("implement libusb_set_option")
Event:  Halifax Hackathon 202606
Sponsored by:   The FreeBSD Foundation
08dca5971b08b65f227883502d9bb9f59eebd578 ShengYi Hung 2026-06-23 14:29:57
libusb: Implement libusb20_tr_get_flags
Reviewed by:    adrian, bapt
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57543
1a8701e2e9a97cabb18ed58d236382796d7f7aa7 ShengYi Hung 2026-06-11 15:39:44
librpcsec_gss: Fix an off-by-one in rpc_gss_get_principal_name()
Include an extra byte for the nul-terminator, otherwise we may end up
with an out-of-bounds write.

The corresponding bug in the kernel implementation was fixed by commit
e3081f7e3e2d ("kgssapi(4): Fix string overrun in Kerberos principal construction").

Reviewed by:    markj
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D57738
635ad6f2ec97e9c6b1f15620cd5ee84eb632082f Jane Smith 2026-06-22 21:40:53
libusb: Implement libusb_set_log_cb
Reviewed by:    adrian
Event:  Halifax Hackathon 202606
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57770
25c2251064752b0ced310b1ed3795c8a68849b1c ShengYi Hung 2026-06-23 14:03:09
netlink: decode netlink message flags symbolically
Generate an nlm_flag table definition for mktable from
netlink/netlink.h, add a sysdecode_nlm_flag() helper to
libsysdecode, and use it when decoding netlink message headers.

This enables mktable to generate netlink message flag lookup tables and
replaces raw hexadecimal output for recognized NLM_F_* flag values
with their symbolic names.

Reviewed by:    kp
Signed-off-by:  Ishan Agrawal <iagrawal9990@gmail.com>
Sponsored by:   Google LLC (GSoC 2026)
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2294
4c932a4d45fb3130ffa80176f5ff9dcacabd49f1 Ishan Agrawal 2026-06-24 04:08:07
libnetbsd: Avoid bringing in all of sys/param.h in sys/types.h
It's okay to hard-code NBBY, as the value is somewhat unlikely to
change.

The pollution from sys/param.h makes it harder to import test code from
NetBSD since it can introduce conflicting definitions, e.g.,
MIN()/MAX().

Reviewed by:    ngie
MFC after:      1 week
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D57754
0976744085bcd7ebda9779b02d78a85254b3e352 Mark Johnston 2026-06-24 13:16:45
libusb: don't treat EINVAL from USB_FS_COMPLETE as device detach
ugen20_process() treats any non-EBUSY errno returned by USB_FS_COMPLETE
as device detach and returns LIBUSB20_ERROR_OTHER. This causes libusb10
to set device_is_gone and fail all subsequent transfer with
LIBUSB_ERROR_NO_DEVICE.

However, USB_FS_COMPLETE can also return EINVAL when a completion
references an endpoint that no longer exists, for example after
SET_INTERFACE or SET_CONFIG removes and recreates endpoints. This is a
transient condition and does not indicate device detach.

Treat EINVAL the same as EBUSY and stop draining completions. This
prevents a guest selecting an isochronous streaming altsetting from
permanently breaking the passed-through device.

Reviewed by:    bapt
Event:          Halifax Hackathon 202606
Location:       Peggy's Cove Rock
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D57542
240330a85e5f7f5d448123902ebee4136ef221fd ShengYi Hung 2026-06-25 22:38:17
locale: make install Unicode 17.0.0/CLDR 48.2
Data changes:

48.1:
- Update RSD (Serbian Dinar) to use 2-digits for non-cash and 0-digits
  for cash.
- Fix issue with tippi and bindi in Punjabi exemplars.
- Fix parsing issue in numeric date+time patterns for zh_Hant and yue.
- Fix issues with hour cycle display names for several languages.

https://cldr.unicode.org/downloads/cldr-48#481-changes

48.2:
- Group separator for number formatting was updated to ' in fr-CH
  consistent with other Swiss locales.
- Some fixes to date formats including: Hv available formats were
  updated to match behavior in CLDR 47 due to web compatibility issues
  related to current JS capabilities.
- Emoji annotations fixes including collisions between emoji short
  names.
- Updated AM/PM for ko & ps to be consistent with how the wide forms are
  localized.

https://cldr.unicode.org/downloads/cldr-48#482-changes

MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D57627
cfd5bdcb4ee56c658ebc7cf7ea941261d1cd7f73 Jose Luis Duran 2026-06-28 23:07:38

Filesystems

cd9660: Add various length checks when parsing RRIP extensions
Pass the length of a RockRidge attribute to the handler functions and
validate that length in each handler.  If a parsing error is detected,
abort the entire parsing pass.

Reviewed by:    des
Differential Revision:  https://reviews.freebsd.org/D57136
9cd0d6231311bc5609403fb35377a7bb97a3cfaf John Baldwin 2026-06-22 16:41:04
nfscl: Add support for flexible file layout striping
Commit 72e57bc26417 added support for striping to the pNFS
server configuration.  This patch adds support for striping
to the NFS client.

For striped flexible file layouts, an extra structure
must be malloc()d for each stripe, since the number
of stripe servers can vary from one mirror to another.
This new structure is called nfsffs and a single one
of these structures is in the nfsffm structure so that
the non-striped layouts can avoid the additional malloc()'s.

This patch only affects NFSv4.1/4.2 mounts that use the
"pnfs" mount option against servers that support the
flexible file layout.
cf523f4beb8ff148828694485ab56f2c1f8f0159 Rick Macklem 2026-06-23 01:21:08
cd9660: Adjust parsing of timestamps in the extended atttributes record
The extended attribute record includes four different timestamps: file
creation, file modification, file expiration, and file effective date.
Only the first two are meaningful for stat(2).  The latter two (if
handled) would presumably affect if a file is visible for not.

Previously, the logic here was a bit contorted and made use of the
effective time.  It also seemed to treat the creation time as a change
time timestamp.

Instead, simplify the logic such that the modification time is set to
either the modification time (if present), or the creation time.  The
access and change times are then set to the modification time.

NB: This is not used if RockRidge extensions are present, and makefs
does not generate the extended attributes record.

Differential Revision:  https://reviews.freebsd.org/D57748
f6dd01b417dcf247904b4653063f5fb7f22a0878 John Baldwin 2026-06-23 15:51:43
cd9660: Add support for birth times
Both the Extended Attribute Record in the base ISO-9660 standard and
the RockRidge timestamp extension support a file creation timestamp.
Use this to populate the birthtime if present.

Reviewed by:    markj (earlier version)
Differential Revision:  https://reviews.freebsd.org/D57526
3d945604ef8e1aaa49e153d82821fb4c6c1e67f2 John Baldwin 2026-06-23 15:51:43
zfsd: Improve spare selection
Port OpenZFS PRs #18597 and #18578 from zed to zfsd.

When activating a spare, sort candidates before trying them:
 1. Distributed dRAID spare matching the failed vdev's group (fastest
    rebuild via sequential resilver)
 2. Regular spares
 3. Non-matching distributed spares (kernel will reject anyway)
 4. Within each tier: prefer rotational match, then smallest
    sufficient size

Also try all healthy spares in order rather than stopping at the
first one, and use sequential rebuild for distributed spares.
6aaaf7ba4bba5e01008924a61261b43a8356f591 Alexander Motin 2026-06-25 19:33:59
zfs: merge openzfs/zfs@37af89948
Notable upstream pull request merges:
 #18509 f16b3744d zstream: refactor common functions
 #18573 -multiple Persist z_seq across znode eviction
 s18611 eb0c674c2 zfs_ioctl: fix EBUSY race between quota queries and mount
 #18637 77e64d86e Fix self-deadlock when setting the "allocating"/"path"
                  vdev property
 #18645 e3082b923 freebsd: set mnt_time on the rootfs at mountroot time
 #18652 50d012b2a zbookmark_compare: handle "marker" bookmarks with negative
                  levels
 #18664 520eeeaa6 Improve performance of "zpool offline" for log devices
 #18668 6b8f79877 Avoid more abd_t allocations in RAIDZ/dRAID
 #18669 99ab859c3 Optimize metaslab_set_selected_txg()
 #18673 97b9ba7a9 delegate: add 'send:encrypted' permission
 #18687 2ea519c2a Avoid lookup overhead for nonexistent xattr directories
 #18688 87593ea2b Fix handling of _PC_HAS_HIDDENSYSTEM for FreeBSD
 #18693 0483a8e0c Clean up embedded slog metaslab across txgs
 #18695 41311c665 RAIDZ: Optimize single data column writes
 #18706 37af89948 ddt_log: Fix refcount tagging for begin/commit

Obtained from:  OpenZFS
OpenZFS commit: 37af899488652c55c456d3f160fb8b295db2ec70
d0b3ecdc274930e190ea233b6b69ff03782eaf8d Martin Matuska 2026-06-27 06:15:42
nfs_clstate.c: Fix CB_RECALL handling for NFSv4.1/4.2
Recent testing with a modified NFSv4.1/4.2 client that
sometimes ignored CB_RECALL callbacks, identified a few
problems when handling the unusual case of CB_RECALL not
be performed by the client.
- The csa_cachethis argument to CB_SEQUENCE was being ignored.
- The CB_SEQUENCE operation would reply NFSERR_DELAY
  after the first CB_RECALL attempt, making retries
  ineffective.
- The code could return NFSERR_RESOURCE, which is a
  NFSv4.0 specific error code.

This patch fixes the above three problems.

The patch only affects the NFSv4.1/4.2 client when
delegations are being issued and the client somehow
fails to handle a CB_RECALL callback of a delegation,
which is an unusual case.

MFC after:      2 weeks
9e1bbfb88e986b209709ea765189a3ebb6581bcd Rick Macklem 2026-06-27 23:35:20

Kernel

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

Commit group #9: LinuxKPI
LinuxKPI: 802.11: leave a comment for sta->rates (mt7615, ?)

While we currently try to fill most rates places (e.g., basic_rates,
supp_rates, (*set_bitrate_mask)), sta->rates are not populated.

They are likely managed by the 802.11 rate control code (given no
ieee80211_hw_check HAS_RATE_CONTROL), which for use would be net80211,
which will require some extra code just to manage that.

At least Mediatek mt76 (mt7615) driver seems to fall into the category
of this need.  See about that once/if we get to it.

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
557eed60d2a34d061350ac37acebe6686cd80d83 Bjoern A. Zeeb 2026-06-21 14:04:36

LinuxKPI: 802.11: add/improve/correct comments

Adjust/add comments to clarify certain situations.

No functional changes.

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
08a78a296c840aa95ec13895c3c9bf1349becbae Bjoern A. Zeeb 2026-06-22 00:07:16

LinuxKPI: 802.11: add 11g check to lkpi_ic_getradiocaps()

Replace an early comment with code and add a (simplified) 11g check.
We make use of the annotated bitrate flags we added (see
lkpi_wiphy_band_annotate()) and check if on the 2GHz band there are
any bitrates which are 11g.  Upon the first one found we do set the
IEEE80211_MODE_11G to announce to net80211 that the 2.4Ghz channels
may operate on 11g as well.

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
d4a529ad0d5638ad3e8d27815948b0a7c4628e3f Bjoern A. Zeeb 2026-06-22 00:10:22

LinuxKPI: 802.11: introduce TRACE_RATES()

Add a tracing bit for tracing rates related changes introduced in
followup commits.

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
b58d8df5829233ced7024c30a0a979e2e0a722fd Bjoern A. Zeeb 2026-06-22 00:17:26

LinuxKPI: 802.11: initalize br_mask and basic_rates for each vap

During vap creating we inialize most [l]vif related variables.
Add a br_mask (bit rate mask) to the lvif and setup the legacy component
as it seems to be static.
Given we are looping over the bands, also initialize the bss_conf
basic_rates. At this point we only have all bitrates for the band
or the mandatory bitrates for the band available.  In order to not
hint usage of possibly unsupported bit rates set it up with the
manadatory bit rates only, which should get us through the mgmt
frames, etc. to get to assoc state.  By then we will do updates.

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
7bf2eec68a293a22f332fc1592dffaa4ed9f0809 Bjoern A. Zeeb 2026-06-22 00:27:21

LinuxKPI: 802.11: make lkpi_sta_sync_from_ni() return bss_changes

This is a preparatory change with no functional changes.

Sponosred by:   The FreeBSD Foundation
MFC after:      3 days
038489e46ea3e77484ea85c4369610ba3ee8381b Bjoern A. Zeeb 2026-06-17 14:37:42

LinuxKPI: 802.11: add function to update some rate related fields

Add lkpi_sta_supp_rates() which serves multiple purposes:
(a) build (and update) the supp_rates field on a sta link (deflink only
    in our case still),
(b) build and update basic_rates on the vif->bss_conf and print a
    warning in case we end up without any basic rate (should not happen
    anymore, not even on initial startup sync),
(c) if HT or VHT are supported, then update the relevant br_mask fields
    for the current band.

Deal with the various flags which trigger different updates by returning
them so the caller can act upon.

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
0d3cd54642f6695f9f82b82402f27e10bbee7cfc Bjoern A. Zeeb 2026-06-22 00:41:38

LinuxKPI: 802.11: add/change rate related tracing

Make use of the TRACE_RATES() macro and add various tracing events.
Also adjust some events formerly under TRACEOK to TRACE_RATES().

Ignoring the tracing, no other functional changes.

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
42cf2798110e12df6ccc22a138ed89617ac7d407 Bjoern A. Zeeb 2026-06-22 01:01:15

LinuxKPI: 802.11: consider emulate_chanctx in lkpi_sync_chanctx_cw_from_rx_bw()

Only return early if the bandwidth has not changed and we are not
using emulate_chanctx or the chandef.width already matches the new
bandwidth.  Otherwise we have to continue to get all the values
updated.

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
cff565a4c0335e12376ea43f99ef5328c45ce933 Bjoern A. Zeeb 2026-06-22 01:04:36

LinuxKPI: 802.11: track bandwidth/rx_nss change in lkpi_sta_sync_from_ni()

In lkpi_sta_sync_from_ni() track the bandwidth and rx_nss at the
beginning so at the end we can diff if they changed in order to generate
the appropriate RC*CHNAGED flags for the (*link_sta_rc_update) downcall.

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
53d9c14af6a65dcc037527c6ff5308c94806fafe Bjoern A. Zeeb 2026-06-22 01:11:18

LinuxKPI: 802.11: adjust timing of sync_from_ni in lkpi_sta_assoc_to_run()

We used to call the (*sta_state) downcall into the driver to set the
sta state to ASSOC.  After that we did a lot of sync operations incl.
the lkpi_sta_sync_from_ni() which does a lot of rate and bandwith
adjustments.   This sync call needs to happen before we set the sta
to assoc as drivers rely on some of this information, e.g., ht_cap and
vht_cap (and equivalents for later standards) at that point.  Moving
this will make, e.g., mt7921 transmit at higher rates than just
basic_rates.

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
75aadc902298005c47d2b931c483452027ceae69 Bjoern A. Zeeb 2026-06-22 01:16:45
Commit group #10: OFED
OFED: Use prandom_u32() to reduce diff with upstream

Tested by:      Wafa Hamzah <wafah@nvidia.com> (mlx5_ib)
Tested by:      John Baldwin <jhb@FreeBSD.org> (iw_cxgbe)
Sponsored by:   Chelsio Communications
1a9ef1a3430036581b5a136091fc492bf2fa50ac John Baldwin 2026-01-20 20:42:55

OFED: Implement ib_process_cq_direct

This is largely pulled from the original Linux commit to add cq.c.
Note that irq_poll is still not supported, but polling should now be
possible whereas it wasn't really before.

Tested by:      Wafa Hamzah <wafah@nvidia.com> (mlx5_ib)
Tested by:      John Baldwin <jhb@FreeBSD.org> (iw_cxgbe)
Obtained from:  Linux commit 14d3a3b2498edadec344cb11e60e66091f5daf63
Sponsored by:   Chelsio Communications
259a763e343d36a6030e0bba5ae7ed05c123c2fe John Baldwin 2025-12-05 20:56:35

OFED: Use vmalloc() and vzalloc() in various places

This contains changes from the following Linux commits:

10313cbb9220 IPoIB: Allocate priv->tx_ring with vmalloc()
b1404069f644 IPoIB/cm: Use vmalloc() to allocate rx_rings
948579cd8c6e RDMA: Use vzalloc() to replace vmalloc()+memset(0)

Tested by:      Wafa Hamzah <wafah@nvidia.com> (mlx5_ib)
Tested by:      John Baldwin <jhb@FreeBSD.org> (iw_cxgbe)
Sponsored by:   Chelsio Communications
fbe76ea44c4b35ff1226b19c8e3913716686e4f4 John Baldwin 2026-05-28 15:52:03
IB/ipoib: Prevent hung task or softlockup processing multicast response
Tested by:    Wafa Hamzah <wafah@nvidia.com> (mlx5_ib)
Tested by:      John Baldwin <jhb@FreeBSD.org> (iw_cxgbe)
Obtained from:  Linux commit 3874397c0bdec3c21ce071711cd105165179b8eb
Sponsored by:   Chelsio Communications
49ee94b291b424caaafd456d52f0aa9da6ba168c John Baldwin 2026-05-28 15:50:58
RDMA: dma-mapping: use unsigned long for dma_attrs
Tested by:    Wafa Hamzah <wafah@nvidia.com> (mlx5_ib)
Tested by:      John Baldwin <jhb@FreeBSD.org> (iw_cxgbe)
Obtained from:  Linux commit 00085f1efa387a8ce100e3734920f7639c80caa3
Sponsored by:   Chelsio Communications
e4c4c6eeb2a29f7549d28e6ce51fc36125c08e68 John Baldwin 2026-05-28 15:51:30
kern: add a security knob to disable unprivileged access to kenv
We sometimes store sensitive things in the kenv that get zapped, but we
really shouldn't rely on that zapping to actually happen.  Most
unprivileged processes don't really need to read from the kernel
environment in the first place, so add a knob that allows it to be
disabled.

Note that we consider jailed root to be unprivileged from this
perspective; they have their own meta/env concepts and we should
encourage users to take advantage of those for passing information to
jails.

"Hey we should do something about that":      dch
Reviewed by:    imp, ziaee, zlei (all slightly previous version)
Differential Revision:  https://reviews.freebsd.org/D57697
4fd518fcb2bbee4c8c41215d6993b923ef57a0e5 Kyle Evans 2026-06-22 20:22:25
power: Make POWER_STYPE_COUNT equal to POWER_STYPE_UNKNOWN
This avoids having to list POWER_STYPE_COUNT, which is semantically not
an allowed value, in 'switch' statements along with POWER_STYPE_UNKNOWN.

No functional change (intended).

Reviewed by:    obiwac
Event:          Halifax Hackathon 202606
Sponsored by:   The FreeBSD Foundation
Pull Request:   https://github.com/OlCe2/freebsd-src/pull/8
f7eff1236d5fc0895c38dac4bb7f6b8d0eedbec3 Olivier Certner 2026-06-04 11:17:32
Commit group #11: sys: use curthread_pflags_set/restore to manage TDP_DEADLKTREAT for uio
sys: use curthread_pflags_set/restore to manage TDP_DEADLKTREAT for uio

For i386, remove now unused label.
Remove unneeded initialization of the 'save' local.

Reviewed bu:    brooks
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D57726
4c419570024951ad1e477c8d6c3d9968199faf4a Konstantin Belousov 2026-06-21 18:48:06

uiomove_fault(): initialize save with ~0 when no flags are cleared

Reported by:    markj
Fixes:  https://cgit.freebsd.org/src/commit/?id=4c4195700249 ("sys: use curthread_pflags_set/restore to manage TDP_DEADLKTREAT for uio")
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
3377f38cfe284a8490b49611614aae3a2bea78e4 Konstantin Belousov 2026-06-24 22:27:45
ktls: Make ktls_mbuf_crypto_state private and simplify
Sponsored by: Chelsio Communications
1a03b40a134318f26c93d85087de6a588b65f217 John Baldwin 2026-06-23 15:51:43
LinuxKPI: Retire <linux/dma-attrs.h>
Move the attribute constants to <linux/dma-mapping.h> to match
upstream.

Reviewed by:    bz, emaste
Sponsored by:   Chelsio Communications
Differential Revision:  https://reviews.freebsd.org/D57749
0e0d46422657c5042fcb33729305d3fb60dd76b6 John Baldwin 2026-06-23 15:52:57
sched_ule: sched_priority(): More accurate __unused annotation
Change a '__unused' to '__diagused', which is more precise for that use.

No functional change.

MFC after:      1 week
Event:          Halifax Hackathon 202606
Sponsored by:   The FreeBSD Foundation
83a6946595829407c80075f33e49329d1b621522 Olivier Certner 2026-06-15 21:07:00
sched_ule: sched_clock(): Remove a superfluous space
MFC after:      1 week
Event:          Halifax Hackathon 202606
Sponsored by:   The FreeBSD Foundation
5f376d52f2c86fd19e3f774a02c4b0debeb3f2cf Olivier Certner 2026-06-16 16:11:58
linuxkpi ioctl handler: restore the user data pointer
instead of trying to hack around it with LINUX_IOCTL_MIN_PTR.  Since
linux file ioctl methods expect the user address in the data argument,
this should work for all ioctls, including the variable-length cases
like ibcore.

Only do it for the FreeBSD ABI, where we know how to reliably access the
original syscall arguments.

Reviewed by:    Ariel Ehrenberg <aehrenberg@nvidia.com>, markj
Discussed with: zishun.yi.dev@gmail.com
Sponsored by:   NVidia networking
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D57612
91413e8e6311b4d4891dc2299d144feb31e04628 Konstantin Belousov 2026-06-16 22:12:01
vfs: rename vop_mmapped() to vop_update_atime()
This reflects the actual functionality of the VOP.  While there, add the
explicit struct timespec argument for the VOP allowing the caller to set
specific atime, not just request an update for it.

Requested by:   rmacklem
Reviewed by:    rmacklem
Discussed with: jah
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D57681
8177936ac293210251390e44d109ece0f3868df9 Konstantin Belousov 2026-06-19 19:52:45
qat: driver updates to enhance qat infrastructure
- Updated QAT infrastructure FW version/AE mask/num_banks fields
  to facilitate integration of future QAT products.
- Exposed service as sym;asym instead of cy for gen4
- Enhanced cpaGetInstances() for accurate instance retrieval
- Added 57-bit virtual address support to lac_lock_free_stack
- Minor bug fixes and improvements

Signed-off-by: Hareshx Sankar Raj <hareshx.sankar.raj@intel.com>

Reviewed by:    markj
MFC after:      1 month
Differential Revision:  https://reviews.freebsd.org/D57746
682f135f5de39cfc24cfd529ea8a161e94c76c8e Hareshx Sankar Raj 2026-06-24 15:08:16
Commit group #12: linuxkpi
linuxkpi: Define `struct vfsmount` in <linux/mount.h>

In the context of the DRM drivers, this is used to show GEM objects in a
shmfs virtual filesystem. The new `shmem_file_setup_with_mnt()` - also
introduced in this commit as an alias to `shmem_file_setup()` - takes a
`struct vfsmount` as its first argument to indicate which shmfs mount
should be used.

For now, the structure is empty. As we don't present GEM objects in a
virtual filesystem right now, we can defer the actual implementation of
this structure once we have an actual use for it.

The DRM generic code started to use it in Linux 6.13.

Reviewed by:    emaste
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57572
272a12639440c2865fefba8b38771f8dd0ac5778 Jean-Sébastien Pédron 2026-05-08 10:09:59

linuxkpi: Add const qualifier to `bitmap_weight()` 1st arg

Reviewed by:    emaste
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57581
8aa685153bd6a05f6c0f89ae067d67a00a984c05 Jean-Sébastien Pédron 2026-06-12 17:21:59

linuxkpi: Define and fill `struct cpuinfo_x86->x86_stepping`

This will be used in a follow-up commit to implement `x86_match_cpu()`.

Reviewed by:    emaste
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57698
a68dcfaf0236468703201e4f9a52139bd955bc45 Jean-Sébastien Pédron 2026-06-17 13:55:19

linuxkpi: Defined more Intel vendor/family/model constants

The i915 DRM driver started to use them in Linux 6.14.

Reviewed by:    emaste
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57699
de51e9ae5f695b70c81a9dcb9f791af86765b097 Jean-Sébastien Pédron 2026-06-17 13:57:34

linuxkpi: Add <linux/cgroup_dmem.h>

In this header, we declare empty stubs for all functions, as if
`CONFIG_CGROUP_DMEM` was disabled is Linux.

The DRM TTM memory manager started to use this in Linux 6.14.

Reviewed by:    emaste
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57702
b55cc81fcf9718887a51b22f1436f6cc369fa47b Jean-Sébastien Pédron 2026-06-17 17:22:12

linuxkpi: Define `ULL()`

It simply appends "ULL" to its argument.

The amdgpu DRM driver used it at some point in the development cycle of
Linux 6.14 but the use case was dropped later. Let's still add it to
linuxkpi because it will help if we need to do a git bisect in drm-kmod.

Reviewed by:    emaste
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57703
72a6197df998bb6aa36cf33aa44f6d5b50247537 Jean-Sébastien Pédron 2026-06-17 18:43:01
p9fs: Remove the "cancel" transport method
Nothing calls it, and the existing virtio transport doesn't implement
it.  No functional change intended.

MFC after:      1 week
94989248641a17f5c2afc367df4845e4113779a1 Mark Johnston 2026-06-24 16:54:20
Commit group #13: OFED
OFED: Use _ib_modify_qp to implement ib_modify_qp

This was missed when merging in ib_modify_qp_with_udata() previously.

Tested by:      Wafa Hamzah <wafah@nvidia.com> (mlx5_ib)
Tested by:      John Baldwin <jhb@FreeBSD.org> (iw_cxgbe)
Fixes:          https://cgit.freebsd.org/src/commit/?id=b633e08c705f ("ibcore: Kernel space update based on Linux 5.7-rc1.")
Sponsored by:   Chelsio Communications
eaf9f1aafa82b110a38fe3cb7cf4fa8b820e5bf4 John Baldwin 2026-06-24 19:30:55

OFED: Various changes from Linux 4.10

This contains changes from the following Linux commits:

850d8fd76507 IB/mlx4: Handle IPv4 header when demultiplexing MAD
a0b3455fcb2d IB/core: Remove debug prints after allocation failure
74226649f42d IB/ipoib: Remove and fix debug prints after allocation failure
870b28524552 IB/mthca: Remove debug prints after allocation failure
aa6aae38f7fb IB/core: Release allocated memory in cache setup failure
f73a1dbc45a5 infiniband: remove WARN that is not kernel bug
5f24410408fd rdma_cm: add rdma_consumer_reject_data helper function
5042a73d3e9d rdma_cm: add rdma_is_consumer_reject() helper function
d3f4aadd614c RDMA/core: Add the function ib_mtu_int_to_enum

Tested by:      Wafa Hamzah <wafah@nvidia.com> (mlx5_ib)
Tested by:      John Baldwin <jhb@FreeBSD.org> (iw_cxgbe)
Sponsored by:   Chelsio Communications
38d9ce1f58ea6e2dc185fda0d9541a38d594ffc1 John Baldwin 2026-06-24 19:30:55

OFED: Various changes from Linux 4.11

This contains changes from the following Linux commits:

55efcfcd7776 RDMA/core: Fix incorrect structure packing for booleans
aaaca121c7cf RDMA/core: add port state cache
9e2c3f1c7f3e RDMA/core: export ib_get_cached_port_state
93b1f29de71f RDMA/cma: resolve to first active ib port
d43dbacfc063 IB/core: Change the type of an ib_dma_alloc_coherent() argument
6532c380bf40 IB/core: Remove ib_dma_*map_single_attrs()
0bbb3b7496ea IB/rxe, IB/rdmavt: Use dma_virt_ops instead of duplicating it
f57e8ca50e23 IB/mad: Add port_num to error message
828f6fa65ce7 IB/umem: Release pid in error and ODP flow
19b752a19dce IB/cma: Allow port reuse for rdma_id
21d6454a392d RDMA/core: create struct ib_port_cache
25bf14d6f589 IB/core: Add implicit MR flag
d9d0674c0f8a IB/umem: Indicate that process is being terminated
d07d1d70ce1a IB/umem: Update on demand page (ODP) support
a748d60df32e IB/mlx4: Take source GID by index from HW GID table
89052d784bc9 IB/cma: Add default RoCE TOS to CMA configfs
6df6b4a9ce43 IB/cma: Destination and source addr families must match

On FreeBSD, the default RoCE TOS setting is available as per-port
sysctls similar to the existing default RoCE mode sysctls.

Tested by:      Wafa Hamzah <wafah@nvidia.com> (mlx5_ib)
Tested by:      John Baldwin <jhb@FreeBSD.org> (iw_cxgbe)
Sponsored by:   Chelsio Communications
8d57de34d51eeb70d758f2d463cf7cf2d829dd49 John Baldwin 2026-06-24 19:30:55

OFED: Various changes from Linux 4.12

Most of the changes involve renaming InfiBand address handles (AH) to
RDMA address handles including renaming various types and functions.
Address handles now also include type-specific fields and a set of
wrapper accessor functions for getting and setting fields.  For some
of the type and function renames, drivers in sys/dev had to be updated
directly (typically via sed).

This contains changes from the following Linux commits:

f039f44fc331 IB/core: Add support for draining IB_POLL_DIRECT completion queues
fedd9e1f7582 IB/cq: Don't process more than the given budget
403cd12e2cf7 IB/umem: Add contiguous ODP support
0008b84ea9af IB/umem: Add support to huge ODP
3e7e1193e28a IB: Replace ib_umem page_size by page_shift
cb8637660ae8 IB/SA: Move functions update_sm_ah() and ib_sa_event()
680562b56939 IB/SA: Remove unwanted braces
dbb6c91fd8e0 IB/SA: Add braces when using sizeof
f96a31871449 IB/SA: Fix lines longer than 80 columns
94d595c56077 IB/core: Add rdma_cap_opa_ah to expose opa address handles
ee1c60b1bff8 IB/SA: Modify SA to implicitly cache Class Port info
aa4656d9a429 IB/core: Move opa_class_port_info definition to header file
2196f2716292 IB/SA: Add support to query opa classport info.
64b4646eaf3d IB/core: Define 'opa' rdma_ah_attr type
44c58487d51a IB/core: Define 'ib' and 'roce' rdma_ah_attr types
d8966fcd4c25 IB/core: Use rdma_ah_attr accessor functions
2224c47ace23 IB/core: Add accessor functions for rdma_ah_attr fields
365231593409 IB/core: Rename ib_destroy_ah to rdma_destroy_ah
bfbfd661c9ea IB/core: Rename ib_query_ah to rdma_query_ah
67b985b6c755 IB/core: Rename ib_modify_ah to rdma_modify_ah
0a18cfe4f6d7 IB/core: Rename ib_create_ah to rdma_create_ah
766b7f6cf0c0 IB/mthca: Rename to_ib_ah_attr to to_rdma_ah_attr
38349389fece IB/mlx5: Rename to_ib_ah_attr to to_rdma_ah_attr
71d53ab47ee6 IB/mlx4: Rename to_ib_ah_attr to to_rdma_ah_attr
90898850ec4e IB/core: Rename struct ib_ah_attr to rdma_ah_attr
4ba66093bdc6 IB/core: Check for global flag when using ah_attr
cf0b9395d084 IB/core: Add braces when using sizeof
cfd519358f50 IB/IPoIB: Remove 'else' when the 'if' has a return.
82ffc226483c IB/CM: Add braces when using sizeof
dfa834e1d97e IB/SA: Introduce path record specific types
c2f8fc4ec440 IB/SA: Rename ib_sa_path_rec to sa_path_rec
9fdca4da4d8c IB/SA: Split struct sa_path_rec based on IB and ROCE specific fields
4c33bd1926cc IB/SA: Add support to query OPA path records
57520751445b IB/SA: Add OPA path record type
87f0faadc685 IB/SA: Add OPA addr header
eed7624552ca RDMA/mlx4: Fix MAD tunneling when SRIOV is enabled
f937d93a9122 RDMA/uverbs: Declare local function static and add brackets to sizeof
d3957b86a406 RDMA/SA: Fix kernel panic in CMA request handler flow

The IPoIB portions of ee1c60b1bff8 were already present in FreeBSD
from an earlier sync with OFED.  Likewise, the ib_uverbs_cmd.c
changes from 4ba66093bdc6 were also already present.

Tested by:      Wafa Hamzah <wafah@nvidia.com> (mlx5_ib)
Tested by:      John Baldwin <jhb@FreeBSD.org> (iw_cxgbe)
Sponsored by:   Chelsio Communications
774a6620632ff621bd840c6945b705420efcd55d John Baldwin 2026-06-24 19:30:55

OFED: Various changes from Linux 4.13

This contains changes from the following Linux commits:

28b5b3a23ba6 RDMA/core: Document confusing code
5fff41e1f89d IB/core: Fix race condition in resolving IP to MAC
b1a89257f28e IB/umem: update to new mmu_notifier semantic

Tested by:      Wafa Hamzah <wafah@nvidia.com> (mlx5_ib)
Tested by:      John Baldwin <jhb@FreeBSD.org> (iw_cxgbe)
Sponsored by:   Chelsio Communications
ba5c6caae735d9658d193eaac9243e3f6d556efe John Baldwin 2026-06-24 19:30:55

OFED: Various changes from Linux 4.14

This contains changes from the following Linux commits:

1cb2fc0db764 IB/mad: Change slid in RMPP recv from 16 to 32 bits
7e93e2cb835c IB/IPoIB: Increase local_lid to 32 bits
d541e45500bd IB/core: Convert ah_attr from OPA to IB when copying to user
6b3c0e6e6d5a IB/CM: Create appropriate path records when handling CM request
e92aa00a5189 IB/CM: Add OPA Path record support to CM
7db20ecd1d97 IB/core: Change wc.slid from 16 to 32 bits
db58540b021a IB/core: Change port_attr.sm_lid from 16 to 32 bits
582faf3150f5 IB/core: Change port_attr.lid size from 16 to 32 bits
ac3a949fb2ff IB/CM: Set appropriate slid and dlid when handling CM request
06f8174a9782 IB/core: Protect sysfs entry on ib_unregister_device
62ede7779904 Add OPA extended LID support
13c19222889d IB/rdmavt, hfi1, qib: Modify check_ah() to account for extended LIDs
d98bb7f7e6fa IB/hfi1: Determine 9B/16B L2 header type based on Address handle
dcc9881e6767 RDMA/(core, ulp): Convert register/unregister event handler to be void
f808c13fd373 lib/interval_tree: fast overlap detection

Tested by:      Wafa Hamzah <wafah@nvidia.com> (mlx5_ib)
Tested by:      John Baldwin <jhb@FreeBSD.org> (iw_cxgbe)
Sponsored by:   Chelsio Communications
687057e712edbbc31e33613d99d9f8cc436cfa1f John Baldwin 2026-06-24 19:30:55

OFED: Various changes from Linux 4.15

This contains changes from the following Linux commits:

c0b64f58e8d4 RDMA/cma: Avoid triggering undefined behavior
c0348eb06968 IB: Let ib_core resolve destination mac address
5a3dc3237243 IB/cm: Fix memory corruption in handling CM request
fec99ededf6b RDMA/umem: Avoid partial declaration of non-static function
19b57c6c4499 IB/core: Convert OPA AH to IB for Extended LIDs only
e08ce2e82b2f RDMA/core: Make function rdma_copy_addr return void
4190b4e96954 RDMA/core: Rename kernel modify_cq to better describe its usage

Tested by:      Wafa Hamzah <wafah@nvidia.com> (mlx5_ib)
Tested by:      John Baldwin <jhb@FreeBSD.org> (iw_cxgbe)
Sponsored by:   Chelsio Communications
85893a8399bce2dd66e8693037395e1979277967 John Baldwin 2026-06-24 19:30:55

OFED: Various changes from Linux 4.16

This contains changes from the following Linux commits:

c5c4e40e90b5 IB/CM: Change sgid to IB GID when handling CM request
54a6d63f14bd IB/mlx4: Potential buffer overflow in _mlx4_set_path()
56d0a7d9a0f0 IB/core: Depend on IPv6 stack to resolve link local address for RoCEv2
1060f8653414 IB/{core/cm}: Fix generating a return AH for RoCEE
981b5a2384b7 RDMA/cma: Introduce and use helper functions to init work
c42388053758 RDMA/cma: Avoid setting path record type twice
4367ec7fe2dd RDMA/cma: Simplify netdev check
151ed9d70097 IB/core: Refactor to avoid unnecessary check on GID lookup miss
b0dd0d335364 IB/core: Avoid unnecessary type cast
86937fcd6ed2 RDMA/core: Avoid redundant memcpy in rdma_addr_find_l2_eth_by_grh
1c43d5d308f0 IB/core: Avoid exporting module internal ib_find_gid_by_filter()
dbb12562f7c2 IB/{core, ipoib}: Simplify ib_find_gid to search only for IB link layer
f6bdb14267ba IB/{core, umad, cm}: Rename ib_init_ah_from_wc to ib_init_ah_attr_from_wc
4ad6a0245ec8 IB/{core, cm, cma, ipoib}: Rename ib_init_ah_from_path to ib_init_ah_attr_from_path
33f93e1ebcf5 IB/cm: Fix sleeping while spin lock is held
16c72e402867 IB/cm: Refactor to avoid setting path record software only fields
af808ece5ce9 IB/SA: Check dlid before SA agent queries for ClassPortInfo
8d20a1f0ecd5 RDMA/cma: Fix rdma_cm raw IB path setting for RoCE
fe75889f2794 RDMA/{cma, ucma}: Simplify and rename rdma_set_ib_paths
9327c7afdce3 RDMA/cma: Provide a function to set RoCE path record L2 parameters
89838118a515 RDMA/cma: Fix rdma_cm path querying for RoCE
cd2a6e7d384b IB/core: Fix ib_wc structure size to remain in 64 bytes boundary
f2290d6d522d IB/core: Attempt DMAC resolution for only RoCE
a6532e713966 RDMA/core: Clarify rdma_ah_find_type
246d8b184c10 IB/cq: Don't force IB_POLL_DIRECT poll context for ib_process_cq_direct
aaebd377c0e9 IB/core: postpone WR initialization during queue drain
15cbc5197693 RDMA/core: Simplify rdma_addr_get_sgid() to not support RoCE
7a2f64ee4a95 RDMA/ucma: Use rdma cm API to query GID
411460ac50b0 RDMA/cma: Introduce API to read GIDs for multiple transports
2493a57bc10f RDMA/cma: Refactor to access multiple fields of rdma_dev_addr
00db63c128dd RDMA/cma: Check existence of netdevice during port validation
925f7ea7a6ba RDMA/cm: Fix access to uninitialized variable
87daac68f77a IB/core: Map iWarp AH type to undefined in rdma_ah_find_type
87915bf82eea RDMA/verbs: Return proper error code for not supported system call
d3b9e8ad425c RDMA/core: Reduce poll batch for direct cq polling

Parts of 1060f8653414 were already merged into FreeBSD.  Cosmetic
changes made in rdma_addr_find_l2_eth_by_grh while merging this change
were just to reduce the diff with Linux to ease merging future
changes.

The merge of 56d0a7d9a0f0 differs slightly from the Linux commit as
FreeBSD was missing the original changes to check for link-local
addresses in ib_resolve_eth_dmac.

The merge of 2493a57bc10f is mostly a cosmetic change to reduce diffs
with upstream as local changes in FreeBSD passed the dev_addr as the
last argument instead of the dev_type and if_index already.

Tested by:      Wafa Hamzah <wafah@nvidia.com> (mlx5_ib)
Tested by:      John Baldwin <jhb@FreeBSD.org> (iw_cxgbe)
Sponsored by:   Chelsio Communications
1d99feddd681da05dfa9091870403bc9ceb94550 John Baldwin 2026-06-24 19:30:56

OFED: Various changes from Linux 4.17

This contains changes from the following Linux commits:

a3b641af72ba RDMA/CM: move rdma_id_private to cma_priv.h
6612b4983f7e IB/core: Fix comments of GID query functions
b26c4a1138df IB/{core, ipoib}: Simplify ib_find_gid() for unused ndev
5ac08a341303 IB/cma: Use rdma_protocol_roce() and remove cma_protocol_roce_dev_port()
a9c06aeba997 IB/core: Remove rdma_resolve_ip_route() as exported symbol
a22af59ea9a5 IB/cm: Add and use a helper function to add cm_id's to the port list
cb12a8e2fa5f IB/cm: Introduce and use helper function to get cm_port from path
0a5141593567 IB/core: Refactor ib_init_ah_attr_from_path() for RoCE
e41a7c41947d IB/core: Move rdma_addr_find_l2_eth_by_grh to core_priv.h
98f1f4e0ed26 IB/core: Refer to RoCE port property instead of GID table property
114cc9c4b182 IB/cma: Resolve route only while receiving CM requests
9137108cc3d6 RDMA/rdma_cm: Fix use after free race with process_one_req
190fb9c4d130 IB/core: Refer to RoCE port property to decide building cache
22d24f75a193 IB/core: Search GID only for IB link layer
4ab7cb4bf362 IB/core: Refer to RoCE port property instead of GID table property
3401857ea347 IB/core: Generate GID change event regardless of RoCE GID table property
218b9e3eb8b5 RDMA/cma: Move rdma_cm_state to cma_priv.h
8435168d50e6 RDMA/ucma: Don't allow setting RDMA_OPTION_IB_PATH without an RDMA device
72e1ff0fb7e0 RDMA/core: Update query_gid documentation for HCA drivers
0e1f9b924471 RDMA/providers: Simplify query_gid callback of RoCE providers
598ff6bae689 IB/core: Refactor GID modify code for RoCE
f35faa4ba956 IB/core: Simplify ib_query_gid to always refer to cache
14169e333e71 IB/providers: Avoid zero GID check for RoCE
414448d249d8 RDMA: Use ib_gid_attr during GID modification
ee6548d1d98d RDMA/rdma_cm: Delete rdma_addr_client
44e75052bc2a RDMA/rdma_cm: Make rdma_addr_cancel into a fence
e19c0d237873 RDMA/rdma_cm: Remove process_req and timer sorting
a66ed149b0da IB/core: Don't allow default GID addition at non reseved slots
dc5640f294e4 IB/core: Fix deleting default GIDs when changing mac adddress
22c01ee4b8a8 IB/core: Fix to avoid deleting IPv6 look alike default GIDs
9aa169213d11 RDMA/cma: Do not query GID during QP state transition to RTR
aec05afe641b IB/core: Remove redundant return

Tested by:      Wafa Hamzah <wafah@nvidia.com> (mlx5_ib)
Tested by:      John Baldwin <jhb@FreeBSD.org> (iw_cxgbe)
Sponsored by:   Chelsio Communications
75cde38e949345c9d63e400bd4707d6eec817941 John Baldwin 2026-06-24 19:30:56

OFED: Various changes from Linux 4.18

This contains changes from the following Linux commits:

e822ff213fe6 IB/cm: Store and restore ah_attr during CM message processing
0e225dcb7681 IB/cm: Store and restore ah_attr during LAP msg processing
a5c57d327272 IB/cm: Avoid AV ah_attr overwriting during LAP message handling
724631a9c6e9 IB/core: Introduce and use rdma_gid_table()
25e62655c793 IB/core: Reduce the places that use zgid
08bb558ac11a IB/core: Make testing MR flags for writability a static inline function

Commit 0e225dcb7681 was partially merged previously as
cm_init_av_for_lap() already existed in FreeBSD matching the version
from the Linux commit.

Tested by:      Wafa Hamzah <wafah@nvidia.com> (mlx5_ib)
Tested by:      John Baldwin <jhb@FreeBSD.org> (iw_cxgbe)
Sponsored by:   Chelsio Communications
cd567a22e28a68aebf12cc320d83648b5b68c274 John Baldwin 2026-06-24 19:30:56

OFED: Malloc API cleanups from Linux 4.18

This contains changes from the following Linux commits:

acafe7e30216 treewide: Use struct_size() for kmalloc()-family
fad953ce0b22 treewide: Use array_size() in vzalloc()
6396bb221514 treewide: kzalloc() -> kcalloc()
6da2ec56059c treewide: kmalloc() -> kmalloc_array()

Tested by:      Wafa Hamzah <wafah@nvidia.com> (mlx5_ib)
Tested by:      John Baldwin <jhb@FreeBSD.org> (iw_cxgbe)
Sponsored by:   Chelsio Communications
f08a98090229a7d13a8ff2e320696458f6b7c126 John Baldwin 2026-06-24 19:30:56

OFED: Various changes from Linux 4.19

Many of these changes deal with shifting from fetcing SGID attributes
via an index in drivers to including references to SGID attributes in
other structures passed to driver callbacks which can be used directly
avoiding the need for fetching attributes via lookup functions.  I had
to fixup the ROCE GID management code directly as the version in
FreeBSD is very different from Linux.

I also tweaked the change from commit
475c8de7bf2dc86d9806709a04e9c8f524d4ec32 to use a goto to reduce diffs
with upstream to minimize conflicts when merging upstream changes.

This contains changes from the following Linux commits:

a1a4caeebac9 IB/core: Do not set the gid type when reserving default entries
1c36cf912ad1 IB/core: Store default GID property per-table instead of per-entry
1dfce2945771 IB: Replace ib_query_gid/ib_get_cached_gid with rdma_query_gid
83f6f8d29dd3 IB/core: Make rdma_find_gid_by_filter support all protocols
c3d71b69a75c IB/core: Provide rdma_ versions of the gid cache API
77e786fcbe2e IB/core: Replace ib_query_gid with rdma_get_gid_attr
bf399c2cadfa IB/core: Introduce GID attribute get, put and hold APIs
f4df9a7c34d8 RDMA: Use GID from the ib_gid_attr during the add_gid() callback
b150c3862d21 IB/core: Introduce GID entry reference counts
47ec38666210 RDMA: Convert drivers to use sgid_attr instead of sgid_index
d97099fe53ed IB{cm, core}: Introduce and use ah_attr copy, move, replace APIs
947c99ecfcb4 IB/core: Tidy ib_resolve_eth_dmac
8d9ec9addd6c IB/core: Add a sgid_attr pointer to struct rdma_ah_attr
89af969a6653 RDMA: Convert drivers to use the AH's sgid_attr in post_wr paths
1a1f460ff151 RDMA: Hold the sgid_attr inside the struct ib_ah/qp
7492052a186b IB/mlx4: Use GID attribute from ah attribute
59d40813328f IB/core: Free GID table entry during GID deletion
881456789248 RDMA/cma: Consider net namespace while leaving multicast group
4ed13a5f2d60 IB/cm: Keep track of the sgid_attr that created the cm id
aa74f4878d61 IB: Make init_ah_attr_grh_fields set sgid_attr
f685c19529f0 IB: Make ib_init_ah_from_mcmember set sgid_attr
b7403217656d IB: Make ib_init_ah_attr_from_wc set sgid_attr
ea8c2d8f6014 RDMA/core: Remove unused ib cache functions
a8872d53e9b7 IB/cm: Use sgid_attr from the AV
398391071f25 IB/cm: Replace members of sa_path_rec with 'struct sgid_attr *'
815d456ef21a IB/cm: Pass the sgid_attr through various events
4eefd62c17a9 include/rdma/opa_addr.h: Fix an endianness issue
f8c2d2280cf6 RDMA/core: Remove set-but-not-used variables
28e39894ed4f RDMA/core: Remove ib_find_cached_gid() and ib_find_cached_gid_by_port()
07e7056aff6c IB/core: Simplify check for RoCE route resolve
40ddacf2dda9 RDMA/umem: Don't hold mmap_sem for too long
1215cb7c88ec RDMA/umem: Refactor exit paths in ib_umem_get
c012691508f5 IB/cm: Remove cma_multicast->igmp_joined
4b4671a0f269 IB/IPoIB: Simplify ib_post_(send|recv|srq_recv)() calls
1fec77bf8fcd RDMA/core: Simplify ib_post_(send|recv|srq_recv)() calls
bb039a870c05 IB/core: Allow ULPs to specify NULL as the third ib_post_(send|recv|srq_recv)() argument
643d213a9a03 RDMA/cma: Do not ignore net namespace for unbound cm_id
d274e45ce1ed RDMA/cma: Consider netdevice for RoCE ports
cee104334c98 IB/core: Introduce and use sgid_attr in CM requests
7150c3d5544b RDMA/core: Remove {create,destroy}_ah from mandatory verbs
854633165164 RDMA/core: Prefix _ib to IB/RoCE specific functions
7582df826734 RDMA/core: Avoid holding lock while initializing fields on stack
79d684f02647 RDMA/core: Simplify gid type check in cma_acquire_dev()
ca3a8ace2b12 RDMA/core: Return bool instead of int
05e0b86c413d RDMA/cma: Get rid of 1 bit boolean
e7ff98aefc9e RDMA/cma: Constify path record, ib_cm_event, listen_id pointers
2df7dba855e1 RDMA/core: Constify dst_addr argument
219d2e9dfda9 RDMA/cma: Simplify rdma_resolve_addr() error flow
26e551c5aec5 RDMA: Fix return code check in rdma_set_cq_moderation
58796e67d5d5 IB/ucm: Initialize sgid request GID attribute pointer
dd81b2c8a333 IB/core: Change filter function return type from int to bool
93065ac753e4 mm, oom: distinguish blockable mode for mmu notifiers
0d23ba6034b9 RDMA/ucma: check fd type in ucma_migrate_id()

Part of cee104334c98 was previously merged into FreeBSD.  Namely, SGID
index fields had been added to the two param structures instead and
roce_get_net_dev_by_cm_event was implemented using SGID indices.

Tested by:      Wafa Hamzah <wafah@nvidia.com> (mlx5_ib)
Tested by:      John Baldwin <jhb@FreeBSD.org> (iw_cxgbe)
Sponsored by:   Chelsio Communications
6a75471dbcf0fb187cf7918ee1a918fd7c9d002d John Baldwin 2026-06-24 19:30:56

OFED: Various changes from Linux 4.20

This contains changes from the following Linux commits:

627212c9d49b RDMA/core: Replace open-coded variant of get_device
adee9f3f3bbb RDMA/core: Depend on device_add() to add device attributes
954a8e3aea87 RDMA/cma: Protect cma dev list with lock
722c7b2bfead RDMA/{cma, core}: Avoid callback on rdma_addr_cancel()
f9d08f1e1939 RDMA/core: Rate limit MAD error messages
e1f540c3ed0e RDMA/core: Define client_data_lock as rwlock instead of spinlock
2d65f49ff961 RDMA/core: Use simpler spin lock irq API from blocking context
4512acd0d34c RDMA/core: Remove context entries from list while unregistering device
f7b65d9bf2db RDMA/core: Use simplified list_for_each
93688ddbe1da RDMA/core: No need to protect kfree with spin lock and semaphore
50704e039ab1 RDMA/umem: Restore lockdep check while downgrading lock
eb93c82ed8c7 RDMA/core: Document QP @event_handler function
4269024639f6 RDMA/core: Document CM @event_handler function
77addc524473 RDMA/core: Rename rdma_copy_addr to rdma_copy_src_l2_addr
a362ea1d9e1a RDMA/core: Introduce and use rdma_set_src_addr() between IPv4 and IPv6
89c5691cdd95 RDMA/core: Let protocol specific function typecast sockaddr structure
caf1e3ae9fa6 RDMA/core Introduce and use rdma_find_ndev_for_src_ip_rcu
c31d4b2ddf07 RDMA/core: Protect against changing dst->dev during destination resolve
0e9d2c19bff1 RDMA/core: Consider net ns of gid attribute for RoCE
d6b1764a8c5a RDMA/core: Introduce rdma_read_gid_attr_ndev_rcu() to check GID attribute
6aaecd385685 RDMA/core: Simplify roce_resolve_route_from_path()
0965cc953a23 RDMA/core: Properly return the error code of rdma_set_src_addr_rcu
d4b4dd1b9706 RDMA/umem: Do not use current->tgid to track the mm_struct
c9990ab39b6e RDMA/umem: Move all the ODP related stuff out of ucontext and into per_mm
597ecc5a0954 RDMA/umem: Get rid of struct ib_umem.odp_data
41b4deeaa123 RDMA/umem: Make ib_umem_odp into a sub structure of ib_umem
b5231b019d76 RDMA/umem: Use ib_umem_odp in all function signatures connected to ODP
56ac9dd9177c RDMA/umem: Avoid synchronize_srcu in the ODP MR destruction path
be7a57b41ad8 RDMA/umem: Handle a half-complete start/end sequence
ca748c39ea3f RDMA/umem: Get rid of per_mm->notifier_count
f27a0d50a4bc RDMA/umem: Use umem->owning_mm inside ODP

Tested by:      Wafa Hamzah <wafah@nvidia.com> (mlx5_ib)
Tested by:      John Baldwin <jhb@FreeBSD.org> (iw_cxgbe)
Sponsored by:   Chelsio Communications
4726b80d9379cdefd00ae77d0b91973bde573790 John Baldwin 2026-06-24 19:30:56

OFED: A few channges from Linux 5.0

The main point of these changes is the last commit adding a couple of
helper functions used in ROCE drivers.

This contains changes from the following Linux commits:

a70c07397fd8 RDMA: Introduce and use GID attr helper to read RoCE L2 fields
8f9748602491 IB/cm: Reduce dependency on gid attribute ndev check
adb4a57a7a1d RDMA/cma: Use rdma_read_gid_attr_ndev_rcu to access netdev
b4fb4cc5ba83 RDMA/cma: Fix unbalanced cm_id reference count during address resolve
d5665a21250e RDMA/core: Add hash functions to calculate RoCEv2 flowlabel and UDP source port

Tested by:      Wafa Hamzah <wafah@nvidia.com> (mlx5_ib)
Tested by:      John Baldwin <jhb@FreeBSD.org> (iw_cxgbe)
Sponsored by:   Chelsio Communications
45c0d87c57298599397204179c2c4fa0f580a5d9 John Baldwin 2026-06-24 19:30:56

OFED: Calculate UDP source port based on flow label or lqpn/rqpn

Calculate and set UDP source port based on the flow label. If flow label
is not defined in GRH then calculate it based on lqpn/rqpn.

Tested by:      Wafa Hamzah <wafah@nvidia.com> (mlx5_ib)
Tested by:      John Baldwin <jhb@FreeBSD.org> (iw_cxgbe)
Obtained from:  Linux commit 18451db82ef7f943c60a7fce685f16172bda5106
Sponsored by:   Chelsio Communications
b6354f04081823cc0ccf2af573a59a826d7763c8 John Baldwin 2026-06-24 19:30:56
cpufreq: Fix the incorrect format
Event:          Halifax Hackathon 202606
Location:       jrm@'s dining room
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D57275
35255280e51ca8f7a8f350b944aa6ffe42a7e5b5 ShengYi Hung 2026-06-25 01:13:17
kern: osd: abstract away the math for locating a slot method
It's relatively simple, but we'll do it a couple of times; pull it
out into a macro.

Reviewed by:    imp (previous version), jamie
Differential Revision:  https://reviews.freebsd.org/D48074
72ebcfae48c42cb28ab6142980416082f8d70abc Kyle Evans 2026-06-25 03:08:05
kern: osd: trash a slot's methods upon deregistration
This both lets us quickly identify a slot that's been deallocated while
debugging, and forces us to take a fault if something tries to call one
of the methods anyways somehow with osd_destructors[slot - 1] == NULL.

Reviewed by:    imp, jamie
Differential Revision:  https://reviews.freebsd.org/D48075
4ffa7e126ed0081b804bda6fb71a60acf49dabda Kyle Evans 2026-06-25 03:08:05
jail: clean up locking around do_jail_attach
jail_attach_jd passed PD_DEREF to do_jail_attach, assuming it would take
care of freeing the held prison. This is not true, as do_jail_attach
immediately cleared that flag, leaving the jail stock in dying state
when it is later removed.

Reported by:    markj
Reviewed by:    markj
MFC after:      3 days
Differential Revision:  <https://reviews.freebsd.org/D57674>
3584cde63e416d150214192721cead4b735ca0b5 Jamie Gritton 2026-06-25 03:21:18
sched_ule: Fix off by one in preempt_thresh definition
Since 'preempt_thresh' is set to PRI_MIN_KERN by default, and comparison
of the considered thread's priority with that threshold is done with
'<=', PRI_MIN_KERN threads actually can preempt other threads, contrary
to other non-interrupt kernel ones (between PRI_MIN_KERN + 1 and
PRI_MAX_KERN).

So, replace the comparison operator '<=' by '<'.  The alternative would
be to change the default value, but changing the comparison instead has
the benefit to be consistent with the 0 setting (which forbids
preemption entirely), since allowing only threads with priority 0 to
preempt becomes possible.

Consequently, we also change the default value for the FULL_PREEMPTION
option by adding 1 to PRI_MAX_IDLE (in practice, that does not make any
difference in the current setting, since no preemption will happen if
the new priority value is not strictly lower than the current one, and
PRI_MAX_IDLE is PRI_MAX, the highest possible priority).

Reviewed by:    markj
Fixes:          https://cgit.freebsd.org/src/commit/?id=ae7a6b38d53f ("ULE 3.0:  Fine grain scheduler locking and affinity improvements. (...)")
MFC after:      2 weeks
Event:          Halifax Hackathon 202606
Location:       jrm@'s dining room
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D57828
961f4814286820f242d8d5407b9fd7238e896936 Olivier Certner 2026-06-19 01:51:32
sys/systm.h: use __nodiscard consistently and correctly
__nodiscard is closer to (and sometimes expands to) [[nodiscard]] from
C23 and C++17 so prefer it to the homegrown __result_use_check and put
it in the right place so it is correct when expanded to [[nodiscard]].

Reviewed by:    markj, emaste
Sponsored by:   DARPA, AFRL
Differential Revision:  https://reviews.freebsd.org/D57882
b207b1562a2f099b4e763460891fa6761549091a Brooks Davis 2026-06-26 16:42:06
files: riscv, arm64: Remove redundant 'ofw_cpu.c'
Should have been removed when that line was moved from 'files.arm' to
'files'.

Fixes:          https://cgit.freebsd.org/src/commit/?id=14e1a2cd295d ("Move ofw_cpu file to the main files conf file.")
MFC after:      2 weeks
Event:          Halifax Hackathon 202606
Location:       Seat 36K in AC667, over Maine near Canadian border
Sponsored by:   The FreeBSD Foundation
10213f01773f22ab948ec1e87c880b1d19a1fc45 Olivier Certner 2026-06-26 21:23:57
VOP_VPUT_PAIR(): handle the case when dvp == vp
Reviewed by:  jah, markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D57824
be9295deedd1e837ee3645583d07e1dffbe1ead0 Konstantin Belousov 2026-06-24 18:21:49

Build system

vgrind: Tear down vgrind support
vgrind has been disconnected from the build for a while.  Remove from
the build, and gc vgrid support in the few remaining places.

Reviewed by:            jhb
Sponsored by:           Netflix
Differential Revision:  https://reviews.freebsd.org/D57648
198637a6869c703c2d01cd87e222c1dc3761c853 Warner Losh 2026-06-22 22:16:55
qemu: Add tools to generate useful tables from FreeBSD sources
This generates a table of all the socket options with fixed types
so that programs like qemu can use those tables rather than having
to free code thigs.

Sponsored by:           Netflix
7f5539d6a66471f59de0550f4b8e3369e0b1b2c7 Warner Losh 2026-06-22 22:17:07
ntsync.4: add the man page
Reviewed by:  ziaee
Discussed with: Alex S <iwtcex@gmail.com>
Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
Differential revision:  https://reviews.freebsd.org/D57659
f6b37f47c09903413bd980a5ebd4c7c3e19ba8a5 Konstantin Belousov 2026-06-19 12:40:03
Add kernel manpages for bcopy, memcpy, and memmove
We will add variants of memcpy and memmove to support CHERI so
bootstrap the manpages from section 3.

Mark bcopy as deprecated.

Reviewed by:    imp, kib, emaste
Effort:         CHERI upstreaming
Sponsored by:   Innovate UK
Differential Revision:  https://reviews.freebsd.org/D57661
b94f438906451d4826d190d36b07e870443439ac Brooks Davis 2026-06-25 10:05:02
Commit group #14: memory_model(7): create and document pointer provenance
memory_model(7): create and document pointer provenance

Add a skeleton manpage intended to describe the FreeBSD memory model.

To start out, add documentation of pointer provenance and a cross link
to atomic(9).

Provide some advice on preserving provenance in CHERI and reference
more detailed discussions elsewere.

Effort:         CHERI upstreaming
Reviewed by:    kib, adrian, markj, emaste
Sponsored by:   Innovate UK
Differential Revision:  https://reviews.freebsd.org/D57812
1366a87c9cb5ed47910636d17972f1bcad27fb9f Brooks Davis 2026-06-26 11:23:48

memory_model.7: Correct typo

perserving -> preserving

Reviewed by: jrm
Event: Halifax Hackathon 202606
Fixes: https://cgit.freebsd.org/src/commit/?id=1366a87c9cb5 ("memory_model(7): create and document pointer provenance")
2f7a8222b6a5c7bedf6835eb6a93b35346e50777 Ed Maste 2026-06-26 13:10:13
loader: Don't need add these flags to ZSTD_SRC
These are zfs-only flags, don't add them when we're building ZSTD.

Sponsored by:           Netflix
Differential Revision:  https://reviews.freebsd.org/D57860
01ef8f4555cfa46c8030cf623e6e3e857fa25430 Warner Losh 2026-06-26 14:45:37
pxeldr: Bump the limit by 30k for loader size
We have a ltitle wiggle room, so go ahead and bump the pxeldr size.
It should be a little larger than the limit we have for the /boot/loader
since we embed that in this loader...

Sponsored by:           Netflix
4e9d303c8300c6674230ff1cdcb317edb27b48cc Warner Losh 2026-06-26 14:48:04
loader: Test GCC cross builds as part of universe.sh
Sicne we have gcc15 in Jenkins, and since people are actually using it,
add cross building tests to universe.sh to avoid build breakage when
hacking on loader.efi (and others). UEFI makes it too easy to mix
pointers and integers since it deals in an odd mix of
EFI_PHYSICAL_ADDRESS and pointers...

Sponsored by:           Netflix
1fc6923e6a40cf0ba9b6cb5aaeee3d87cacab507 Warner Losh 2026-06-26 23:12:55
locale: Do not strip the suffix from CLDRVERSION
The upstream CLDR directory structure requires the full version string.
Remove the ':R' modifier to fix the fetch paths.

Previously this worked because major releases were published in a
directory without the ".0" suffix, while the filenames included it.
Starting with CLDR 47, the upstream layout changed to use the full
version string exclusively, causing the fetch URLs to break for point
releases.

MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D57625
77ca1ce66283aa84258ef2323b692711df16158c Jose Luis Duran 2026-06-28 23:07:23
locale: Update Unicode to CLDR 48.2
Notable changes:

- Group separator for number formatting was updated to ' in fr-CH
  consistent with other Swiss locales.
- Some fixes to date formats including: Hv available formats were
  updated to match behavior in CLDR 47 due to web compatibility issues
  related to current JS capabilities.
- Emoji annotations fixes including collisions between emoji short
  names.
- Updated AM/PM for ko & ps to be consistent with how the wide forms are
  localized.

Reviewed by:    bapt
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D57626
9edbff33aa299dfe7693e18f5bff682bd7ac6b40 Jose Luis Duran 2026-06-28 23:07:30

Internal organizational stuff

-- no commits in this category this week --

Testing

Commit group #15: tests: Fix race condition in aslr_setuid
tests: Fix race condition in aslr_setuid

Use a cloexec pipe to block the parent until the child is ready.

While here, redirect the output from ping to /dev/null, and mark the
test as requiring the inet feature since we ping the IPv4 loopback.

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=296116
MFC after:      1 week
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D57734
080a4087014e1d19136cc77028019d98b5c69e1e Dag-Erling Smørgrav 2026-06-22 13:23:31

tests: Fix race condition in aslr_setuid, take 2

Instead of a cloexec pipe, ingest ping's stdout and block until it has
printed its initial summary, then close the pipe and return to the main
test loop.  Run ping in quiet mode so it won't mind that stdout is gone.

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=296116
MFC after:      1 week
Fixes:          https://cgit.freebsd.org/src/commit/?id=080a4087014e ("tests: Fix race condition in aslr_setuid")
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D57763
86950cf9ffe89b7978fca019019692b3ea492044 Dag-Erling Smørgrav 2026-06-23 15:20:26
Commit group #16: fusefs: fix a race in the pre-init tests
fusefs: fix a race in the pre-init tests

These tests allow the user to customize the INIT response.  But it's
necessary to block the daemon's service loop from running until those
expectations have been set.  This race has never caused failures before
simply due to luck.  But now it's failing on slower platforms.

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=296236
Reported by:    siva
MFC after:      2 weeks
Sponsored by:   ConnectWise
Reviewed by:    siva
Differential Revision: https://reviews.freebsd.org/D57781
2c1482e305368af182a7bde0e53d0d180b319326 Alan Somers 2026-06-23 17:12:04

fusefs: proofread an error message in the tests

Reported by:    otis
Fixes:          https://cgit.freebsd.org/src/commit/?id=2c1482e3053 ("fusefs: fix a race in the pre-init tests")
MFC after:      2 weeks
Sponsored by:   ConnectWise
381ebe25f0b9fae5b3470e9c6e0767909e0fa85a Alan Somers 2026-06-23 20:48:06
fusefs: fix two intermittency bugs in the destroy tests
* Though undocumented, statfs(2) can sometimes return EBADF or ENOENT
  while an unmount is in progress.

* In MockFS::write_response, write(2) may fail if m_fuse_fd has already
  been closed.  This doesn't happen in the normal sequence of events,
  but it can happen if some process unrelated to the test nosily decides
  to access the test file system while it's being unmounted.

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=296237
Reported by:    siva
MFC after:      2 weeks
Sponsored by:   ConnectWise
Reviewed by:    siva
Differential Revision: https://reviews.freebsd.org/D57787
b7d2f7c1a68c270ae5f46b8cfcfb85aa792b6b12 Alan Somers 2026-06-23 20:42:25
tests/test_rtsock_l3: fix flaky temporal route addition tests
If RTM_DELETE arrives before RTM_ADD, the test will skip the first
reply and then timeout after attempting to read another message from
the rtsock_fd.

See the CI test failure[0] for more details.

[0] https://ci.freebsd.org/job/FreeBSD-main-riscv64-test/16628/testReport/sys.net.routing/test_rtsock_l3/rtm_add_v6_temporal1_success/

Reviewed by:    pouria
Fixes:          https://cgit.freebsd.org/src/commit/?id=e02d3fe70c7247027c85d60179c331618554ba34
MFC after:      3 days
Sponsored by:   The FreeBSD Foundation
9e2d8ec2df414a8019d9c31a9a09a5cc728b4c19 Siva Mahadevan 2026-06-18 15:33:00
ping/tests: expect bell chars from stderr after initial status
After 141bb85798 and 8bda488114f3, ping(8) first writes and flushes the
initial status to stdout, then writes notification bell characters to stderr.

This patch corrects the expected order of the output to stdout and stderr.
This is a temporary fix; the test should be rewritten to separate the output
streams and run expectations on each individually.

Reviewed by:    des
MFC after:      3 days
Sponsored by:   The FreeBSD Foundation
5b8c28adb829b50fb8ac065637fa99f717858bab Siva Mahadevan 2026-06-26 12:22:57

Style, typos, and comments

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

.git-blame-ignore-revs: sys/kern/kern_cpu.c whitespace changes
Event:          Halifax Hackathon 202606
Location:       jrm@'s kitchen
Sponsored by:   The FreeBSD Foundation
5f43a84d049ec3451c7c5fa5b4f00a299d5f4c34 Olivier Certner 2026-06-25 01:25:31
heimdal: Fix some manpage typos
Reviewed by:  hrs
Event:          Halifax Hackathon 202606
Location:       jrm@'s couch
e4fdaaaed14e6b11cf622bde87e1da102e5b3257 Aymeric Wibo 2026-06-25 01:32:59
nfs_nfsdport.c: Fix a typo in a KASSERT
Reported by:  rlibby
fe7426b2c9f7c0242aa32e47de5f78967563833c Rick Macklem 2026-06-26 00:55:31
hwpstate_amd(4): Style: End brace of struct initializers on new line
Fixes:          https://cgit.freebsd.org/src/commit/?id=191f47bcd650 ("hwpstate_amd: Refactor the cpufreq code by using delegation pattenr")
MFC after:      2 weeks
Event:          Halifax Hackathon 202606
Location:       Dalhousie CS Faculty building
Sponsored by:   The FreeBSD Foundation
bdc3dca135c239cbbce3a437f49bc4e08828833f Olivier Certner 2026-06-26 14:15:57
hwpstate_intel(4): Fix comment for 'req', whitespace
MFC after:      2 weeks
Event:          Halifax Hackathon 202606
Location:       Seat 36K in AC667, over Thetford Mines
Sponsored by:   The FreeBSD Foundation
6b54e961528d83bcc7fd41051e66d01aa9c6d3fe Olivier Certner 2026-06-26 21:31:17
ps(1): Fix a few typos in the manual page
- s/occurence/occurrence/
- s/occurences/occurrences/
- s/ouput/output/

MFC after:      3 days
dd2127b54f97fd7445bb4f4187a148e979c9c944 Gordon Bergling 2026-06-27 10:48:11
bectl(8): Fix a typo in the manual page
- s/envionments/environments/

MFC after:      3 days
c94302609a5999786f0be77d1bd0b016153b6b11 Gordon Bergling 2026-06-27 10:49:15
ipfilter(4): Fix a couple of typos in the manual pages
- s/heirarchical/hierarchical/
- s/itnerface/interface/
- s/conjuction/conjunction/

MFC after:      3 days
0223ae33ad6dd29215bbb6efd041aa5b6c67dc1f Gordon Bergling 2026-06-27 10:51:19
ipfw(8): Fix a typo in the manual page
- s/exept/except/

MFC after:      3 days
1e36ffffe21042983304290a5742ad7e0e0ffe05 Gordon Bergling 2026-06-27 10:53:14
devd.conf(5): Fix a typo in the manual page
- s/betwen/between/

MFC after:      3 days
050962ab04a68756b45ff967af42eb2541b0ff5f Gordon Bergling 2026-06-27 10:54:18
natd(8): Fix a typo in the manual page
- s/appplications/applications/

MFC after:      3 days
be8c82bc8e83570474afa78c07f7583bb6813046 Gordon Bergling 2026-06-27 10:56:02
ggated(8): Fix two typos in the manual page
- s/colunm/column/
- s/operaions/operations/

MFC after:      3 days
e2339370737bdbebc8bd34a84f5b869da3a9ed43 Gordon Bergling 2026-06-27 10:58:09
nvmecontrol(8): Fix typos in the manual page
- s/givne/given/
- s/assocation/association/
- s/reporing/reporting/

MFC after:      3 days
26ffa3d4e70358e49811158d7d36f3c9b9097d8d Gordon Bergling 2026-06-27 10:59:32

Contrib code

mt76: mt7925: prevent PM from scheduling another delayed work on detach
This duplicates 009d92b25f7c from mt7921 which has the full description.

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
482fda9814937691557ebadd0930535ff3d301b0 Bjoern A. Zeeb 2026-06-21 20:05:04
edk2: Fixup imported files line endings
Since these files were a direct commit, I don't have to fix the vendor
branch. Remove the DOS line endings. It doesn't matter one way or another,
but we should be consistent within the tree.

Sponsored by:           Netflix
c7b1b95a8ca6cdbb5bf48d32c8c7e25c36f5ba6c Warner Losh 2026-06-22 21:56:47
edk2: Bring in some more files from edk2-stable202502
These are needed for memdisk support, so import them separately.
These are from 202502, like all the other files here.

Sponsored by:           Netflix
e985c628a0e4082d9b953897d6f56c81d177cea7 Warner Losh 2026-06-22 22:06:24
libcxxrt: Fix diagnostics for derived classes
In terminate_with_diagnostics the cast_to arguments were swapped, so it
always failed.  The diagnostic handler produced output like "Terminating
due to uncaught exception 0x24891e08000 of type std::runtime_error".

Now, e->what() will actually be included in the output, e.g.
"Terminating due to uncaught exception 0x2bba49208000 'Model file
doesn't exist' of type std::runtime_error".

Reviewed by:    dim
Event:          Halifax Hackathon 202606
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57822
3a5c2899fc7bd0865b5aacccc3465e46e9bc6df3 Ed Maste 2026-06-24 15:06:51
contrib/expat: import expat 2.8.2
Changes: https://github.com/libexpat/libexpat/blob/R_2_8_2/expat/Changes

Security:       CVE-2026-50219
Security:       CVE-2026-56131
Security:       CVE-2026-56132
Security:       CVE-2026-56403
Security:       CVE-2026-56404
Security:       CVE-2026-56405
Security:       CVE-2026-56406
Security:       CVE-2026-56407
Security:       CVE-2026-56408
Security:       CVE-2026-56409
Security:       CVE-2026-56410
Security:       CVE-2026-56411
Security:       CVE-2026-56412
MFC after:      1 week
c82aeee8a6d39371006f5eeb1b51704e7b97e2b7 Philip Paeps 2026-06-25 14:34:28
libdtrace: Fix dt_print_sym() not printing symbols in non-oformat mode
dt_print_sym() fills the symbol string via snprintf() in non-oformat
mode but the guarding `dtp->dt_oformat != 0 &&` for the dt_printf()
call causes the symbol is computed but never emitted.

This fixes tests:

- common.profile-n.t_dtrace_contrib.tst_sym_ksh
- common.profile-n.t_dtrace_contrib.tst_func_ksh

Reviewed by:    markj
Fixes:          https://cgit.freebsd.org/src/commit/?id=93f27766a7e1 ("dtrace: Add the 'oformat' libdtrace option")
MFC after:      3 days
Event:          Halifax Hackathon 202606
Location:       Room 208, Computer Science Building, Dalhousie University
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D57895
8e61d8707f8a10acc143210089fea2502a3f2922 Li-Wen Hsu 2026-06-27 02:26:05
openresolv: Trim leading dot from domain name
Merge upstream change d9f6b1a2d292

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=296305
MFC after:      1 week
4b26ea54713941243b3a0d4263bebbf192ee68c7 Dag-Erling Smørgrav 2026-06-27 21:15:29

Reverted commits

Commit & revert pair: fts: refactor to use fd-relative operations internally
fts: refactor to use fd-relative operations internally

Replace all _open() calls with _openat() in __fts_open(), fts_read(),
and fts_children().

Add fts_dirfd to FTSENT. Callers can use
openat(ent->fts_dirfd, ent->fts_name, ...) to access files
safely without relying on fts_accpath, which enables:

1. Capsicum capability mode where path-based operations fail
2. Security-sensitive programs that avoid TOCTOU races

Replace statfs(ent->fts_path) with _fstatfs(ent->fts_dirfd) in
fts_ufslinks() when fts_dirfd is valid, falling back to statfs() for
root-level entries where fts_dirfd is -1

This is a preparatory change for fts_openat() which will allow
callers to provide a pre-opened directory fd, enabling fts(3)
traversal inside Capsicum capability mode.

Sponsored by:   Google LLC (GSoC 2026)
Reviewed by:    asomers, jillest
MFC after:      2 weeks
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2278
e03ed9daeb49fffa1d16b8d00240c65e92650d01 Jitendra Bhati 2026-06-12 17:07:55

Revert "fts: refactor to use fd-relative operations internally"

This reverts commit e03ed9daeb49fffa1d16b8d00240c65e92650d01.

The change to the size of struct FTSENT is breaking backwards
compatibility for some binaries.  Jitendra is working on a new version
that will move the new field into a private struct.

Reported by:    bdrewery
Fixes:          https://cgit.freebsd.org/src/commit/?id=e03ed9daeb4 ("fts: refactor to use fd-relative operations")
Sponsored by:   ConnectWise
bd1c0ff49c48950dbd999c024a17199022f81d36 Alan Somers 2026-06-24 16:56:50

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

This work is supported by Tarsnap Backup Inc.

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