FreeBSD git weekly: 2026-04-27 to 2026-05-03

Introduction

This is a display of mostly-automatically-classified git commits from 2026-04-27 to 2026-05-03.

Table of contents and commits per category:

(3) Highlighted commits (these are copies, not in stats)
5 2.5% Userland programs
16 7.9% Documentation
52 25.6% Hardware support
14 6.9% Networking
19 9.4% System administration
13 6.4% Libraries
4 2.0% Filesystems
27 13.3% Kernel
21 10.3% Build system
1 0.5% Internal organizational stuff
10 4.9% Testing
10 4.9% Style, typos, and comments
4 2.0% Contrib code
7 3.4% Reverted commits
0 0.0% Unclassified commits
203 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.

groups.7: New manual page of standard group names
Import groups(7) from NetBSD, with tweaks for our system. The group
list is sorted by GID. All the group names from /usr/src/etc/group
are described, except "uucp". The FILES section was added on top of
the original manual page.

PR:                     https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=264966
Relnotes:               yes
MFC after:              3 days
Obtained from:          NetBSD
Reviewed by:            des, ziaee
Differential Revision:  https://reviews.freebsd.org/D54114
e09104dfb76a36b65a64bd315bd1520941c4beed Artem Bunichev 2026-04-28 13:48:52
RELNOTES: Add an entry for recent improvements to multicast routing
Reviewed by:  kevans
Sponsored by;   Stormshield
Sponsored by:   Klara, Inc.
Differential Revision:  https://reviews.freebsd.org/D56710
6c09b7608905af2eaff4b5dfa6cbbd42ce286db6 Mark Johnston 2026-04-29 14:22:41
ports.7/FILES: Expand and refactor into 3 tables
Add make.conf, CHANGES, CONTRIBUTING.Md, UPDATING, and Tools/scripts.
Refactor the FILES section of the ports reference manual into a bigger
table with three sections separated by root directory. Remove preceeding
article from all but "the big Kahuna", and root dirs where reasonable.

MFC after:              3 days
Relnotes:               yes
Reported by:            adamw, arrowd, linimon
Differential Revision:  https://reviews.freebsd.org/D55441
28deec9b7e2b08b00160eb39de84ade6f27eb125 Alexander Ziaee 2026-05-03 17:25:41

Userland programs

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

bin/sh: make it possible to use as interactive init
If the /sbin/init binary is broken somehow, the way out is to set the
loader environment variable init_path to something else.  The most
natural choice would be either /bin/sh or /rescue/sh.  Unfortunately,
this does not work because the init process starts withoud stdin/out
descriptors.

Make it nicer to users by teaching /bin/sh startup code to open standard
descriptors on /dev/console if the shell is run as init.

Reviewed by:    imp, jilles, zlei
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D56536
d7338bb4914d120e5719d3216b23a509c49ed3be Konstantin Belousov 2026-04-20 18:03:39
Commit group #0: stat: fix use of devname(3)
stat: fix use of devname(3)

Besides being a little hard to parse through visually, this had its own
bug of inspecting st->st_mode to determine what to pass to devname(3),
which is only correct for st_rdev.

For st_dev, you're likely to be looking at files or directories and
attempting to assess what device they're located on, so the mode is
meaningless- we just have to assume that our filesystems are on
character devices and attempt to resolve st_dev as such.

Reviewed by:    des, kib (previous version)
Differential Revision:  https://reviews.freebsd.org/D56565
4d4acdbfc22c84081037f31cff4fb03d18373036 Kyle Evans 2026-05-01 03:00:26

stat: The devname test case requires root

Fixes:          https://cgit.freebsd.org/src/commit/?id=4d4acdbfc22c ("stat: fix use of devname(3)")
72b1aae09bf0bcc01c76df757699e27ad7cf7ecc Dag-Erling Smørgrav 2026-05-02 17:28:50
stat: Drop unused code and conditionals
We haven't pulled from upstream in over 15 years, and the codebases
have diverged so far it is unlikely that we ever will.

* Drop NetBSD and OpenBSD version control information.

* Drop support for building on non-BSD / non-POSIX platforms.

* Fix a few minor style issues.

Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D56771
0095c1425633cb6a40fd86fc870ac5945363df2f Dag-Erling Smørgrav 2026-05-03 15:35:06
lockf: Avoid spinning when operating on an fd
When operating on a file descriptor, acquire_lock() would ignore the
flags argument and always operate in non-blocking mode, resulting in
unnecessary busy-looping.

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294832
MFC after:      1 week
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D56722
d90513ea85693da0ca5955173609f4e81e38ae16 Christian Ullrich 2026-05-03 15:35:10

Documentation

Man pages, release notes, etc.

init.8: document init_path among loader tunables
Reviewed by:  imp, jilles
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D56536
9e6ae89d831a4ddce0925ac3682d602a71f1b26d Konstantin Belousov 2026-04-26 10:20:16
init.8: add RECOVERING section
Reviewed by:  imp, jilles
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D56536
e378d97eeb2b8961f312cc04d4751579a7b70741 Konstantin Belousov 2026-04-26 10:28:05
chroot.2: "filedescriptors" => "file descriptors"
"filedescriptors" is the odd one out when looking at other manual pages.

MFC after:      3 days
Sponsored by:   The FreeBSD Foundation
4c6d8aa069f2ac22f801fa69add61085631b3356 Olivier Certner 2026-04-27 10:16:30
intro.7: Reference groups.7
0f91468c040eb2129618e5ac251afc2529edb462 Alexander Ziaee 2026-04-28 13:56:23
build.7: Explain update-packages repo signing
MFC after:            3 days
Reported by:            kevans
Reviewed by:            kevans, ngie
Differential Revision:  https://reviews.freebsd.org/D56607
ab98fd3234304ea10db3dee70205828d372c443a Alexander Ziaee 2026-04-28 16:55:11
reallocarray.3: Fix formatting
c1650792b8dd354c964b55999a712f5ae2ad6c0b Mark Johnston 2026-04-28 17:30:46
group.7: spell priority
d5db883af2cc46bf884ba3fd067cec68f44fc66d Maxim Konovalov 2026-04-28 17:44:40
RELNOTES: Add an entry for recent improvements to multicast routing
Reviewed by:  kevans
Sponsored by;   Stormshield
Sponsored by:   Klara, Inc.
Differential Revision:  https://reviews.freebsd.org/D56710
6c09b7608905af2eaff4b5dfa6cbbd42ce286db6 Mark Johnston 2026-04-29 14:22:41
kerneldoc: also ingest .md (markdown files)
The doxygen tooling has supported ingesting markdown files for a number
of years.  Adding this option allows them to be ingested into the
subsys builds.

Reviewed by:    netchild
Differential Revision:  https://reviews.freebsd.org/D56652
4c99836ac72abb3ec64ee801ac5758ae70cf9a9b Adrian Chadd 2026-04-29 14:58:19
debug.sh.8: Add FILES section
Which contains only the source code file.

While here, remove trailing empty lines in the end of the page.

Reviewed by:    mhorne
Differential Revision:  https://reviews.freebsd.org/D56659
0ed292531e0457f271b838dd9dc99a86534d3a99 Artem Bunichev 2026-04-30 13:49:14
fexecve(2): call out a scenario where you want !O_EXEC
We note a reason why you might need it, but there's an equally important
reason you may need to omit it: interpreted programs.  Add a note
accordingly, along with the workaround configuration if there's reason
you can't help it.

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294780
Reviewed by:    Jan Bramkamp <crest_freebsd_rlwinm.de>, kib
Differential Revision:  https://reviews.freebsd.org/D56704
9c18d55a768a3e60ecaba1325e9a3e00a25dee26 Kyle Evans 2026-05-01 03:02:55
man/math.3: mention fmaximum_mag_num, fminimum_mag_num
9f98195ff615417f7af875b65cdaf220239206db Robert Clausecker 2026-05-02 14:53:08
ports.7/FILES: Expand and refactor into 3 tables
Add make.conf, CHANGES, CONTRIBUTING.Md, UPDATING, and Tools/scripts.
Refactor the FILES section of the ports reference manual into a bigger
table with three sections separated by root directory. Remove preceeding
article from all but "the big Kahuna", and root dirs where reasonable.

MFC after:              3 days
Relnotes:               yes
Reported by:            adamw, arrowd, linimon
Differential Revision:  https://reviews.freebsd.org/D55441
28deec9b7e2b08b00160eb39de84ade6f27eb125 Alexander Ziaee 2026-05-03 17:25:41
nvram.8: Align option list and tag SPDX
MFC after:    3 days
33fbfceeb4d9daf1145089a10ce7b25110d8840f Alexander Ziaee 2026-05-03 17:39:27
man: Kill off MANSUBDIRs
Three architecture dependent manuals are installed to MANSUBDIRs,
creating at least two empty manual page directories on everyone's
boxxen. Move those manuals to their canonical area, enhancing clarity,
grepability, removing useless inodes, and increasing consistency with
the rest of the architecture dependent manuals which are unconditionally
installed, and noted at the top of the rendered manual.

MFC after: 3 days
809504f331fd3588e36b54255196379bdb59890a Alexander Ziaee 2026-05-03 17:53:25
ocs_fc.4: Cleanup
+ more consistent document description
+ enumerate available options in synopsis in vt.4 style
+ tag spdx
+ tweak list rendering
+ cleanup HARDWARE
+ reflow excessively long lines silencing linter warnings
+ fix link macros

MFC after:              3 days
Reported by:            michaelo (hardware notes)
Differential Revision:  https://reviews.freebsd.org/D56753
dd97c3d83f9a92bbeb9740ceff4c1c74c451293e Alexander Ziaee 2026-05-03 18:27:05

Hardware support

Hardware drivers and architecture-specific code.

amd64: ia32_fetch_syscall_args() does not need to check params != NULL
Whatever params pointer is, it does not matter.  copyin() handles any
values.  In fact, params cannot be ever NULL.

Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D56630
912f9dfca451e359dda7cdf45539b7c19764f54d Konstantin Belousov 2026-04-25 09:46:50
amd64 ia32_syscall(): only allow for ILP32 processes
64bit processes can issue INT $0x80 instruction, and get the syscall
dispatched through ia32_syscall().  This works because syscall argument
fetch and result return are selected from the process sysent.

But, ia32_syscall() does not verify some conditions and does not perform
some actions which are considered unnecessary because the caller is
supposed to only access lower 4G.  The INT syscall path breaks this
assumption.

We never supported such hack, so disable it.  Send the offending thread
SIGBUS as if #GP was issued by hardware due to IDT vector 0x80 having
not numerically high enough DPL value.

Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D56630
bd8edba0792b71be3f8ed5dea9c22287e95c986a Konstantin Belousov 2026-04-25 09:49:08
if_awg: Add missing awg_poll() prototype
The function awg_poll() was missing a prototype, which causes the build
to fail if DEVICE_POLLING is enabled, which it is in the ARMADAXP config.

MFC after:      2 weeks
Reviewed by:    tuexen, mmel, adrian
Sponsored by:   https://www.patreon.com/bsdivy
Differential Revision:  https://reviews.freebsd.org/D56651
c73cd9ca3ff875a65b6969b7183eb7fcdb23857c Lexi Winter 2026-04-27 06:57:13
virtio_net: Use bus_dma for rxq/txq buffers
While the majority of virtio platforms will be fully coherent, some may
require cache maintenance or other specific device memory handling (eg for
secure partitioning). Using bus_dma allows for these usecases.

The virtio buffers are marked as coherent; this should ensure that sync
calls are no-ops in the common cases.

Reviewed by:    andrew
Sponsored by:   Arm Ltd
Differential Revision:  https://reviews.freebsd.org/D55492
c16c95192f01237a876eb7bc336e3bbda9310171 Sarah Walker 2026-02-16 14:19:13
virtio_net: Use bus_dma for command/ack buffers
While the majority of virtio platforms will be fully coherent, some may
require cache maintenance or other specific device memory handling (eg for
secure partitioning). Using bus_dma allows for these usecases.

The virtio buffers are marked as coherent; this should ensure that sync
calls are no-ops in the common cases.

Reviewed by:    andrew
Sponsored by:   Arm Ltd
Differential Revision:  https://reviews.freebsd.org/D55564
b5bad6df467cc95bea641afe674c55cd5b9f1510 Sarah Walker 2026-02-27 14:17:15
arm64: Stop using cpu_tlb_flushID in kexec
It will be removed soon & replaces with pmap_s1_invalidate_all_kernel.
This allows us to handle errata that cpu_tlb_flushID is missing
workarounds for.

Sponsored by:   Arm Ltd
4bdbb6f7f7c6913d6296279a856a0bb229ecb83f Andrew Turner 2026-04-27 11:34:56
arm64: Remove cpu_tlb_flushID now it's unused
Reviewed by:  alc
Sponsored by:   Arm Ltd
Differential Revision:  https://reviews.freebsd.org/D52185
04e4268f60e432097427e3d757aac6bc0ae24044 Andrew Turner 2026-04-27 10:57:32
arm64: Ditch arm64-specific unsound PCPU optimisation
The current arm64 PCPU implementation uses a global register asm
variable to use x18, which we reserve with -ffixed-x18, from C. Inside a
critical_enter() or sched_pin(), it is vital that any PCPU reads use the
right PCPU pointer, as often the whole point of the critical_enter() or
sched_pin() is to ensure consistent PCPU use (e.g. for SMR it relies on
zpcpu giving the same SMR state). critical_enter() and sched_pin() both
include atomic_interrupt_fence(), i.e. asm volatile("" ::: "memory"),
barriers to ensure that memory accesses don't get moved by the compiler
outside the critical section, which on most architectures will also
order the read of the PCPU pointer itself (whether due to the read being
another asm volatile statement, or due to using a segment-relative
memory access as on x86). However, this approach on arm64 is in no sense
a memory access, and therefore the register access is not ordered with
respect to the the critical_enter() or sched_pin(), or more specifically
the curthread->td_critnest++ / curthread->td_pinned++ within.

In practice upstream today this works out ok because the read of x18 is
inlined into the actual PCPU_GET/ADD/SET memory accesses (i.e. you will
get something like ldr xN, [x18, #imm-or-xM] for PCPU_GET, etc.), and
since *that* instruction is ordered properly due to being a memory
access, the x18 ends up being read in the right place. However, that is
not in any way guaranteed, it just relies on the hope that compiler
optimisations will be perfect at inlining the use. Moreover, PCPU_PTR is
definitely not a memory access in this world, it's just pointer
arithmetic on x18, and so that has nothing ordering it. This can be
observed with the following test function compiled into the kernel:

    void
    pcpu_test(void)
    {
            extern void __weak_symbol use_pcpu_ptr(void *);
            critical_enter();
            use_pcpu_ptr(PCPU_PTR(curthread));
            critical_exit();
    }

Obviously, this is a bit contrived as you could just read curthread
directly via its atomic definition that bypasses any worries about PCPU
atomicity, but it illustrates the point. With the in-tree LLVM*, this
ends up being compiled for me to:

    paciasp
    stp     x29, x30, [sp, #-0x10]!
    mov     x29, sp
    ldr     x8, [x18]
    ldr     w9, [x8, #0x4fc]
    mov     x0, x18
    add     w9, w9, #0x1
    str     w9, [x8, #0x4fc]
    bl      use_pcpu_ptr
    ...

Note that, although the PCPU_PTR was within the critical section in the
C source, the read of x18 into x0, the argument register passed to
use_pcpu_ptr, has been hoisted to before the str, which is storing the
new, incremented, value of td_critnest to curthread, and so there is a
window within which we have to hope the thread is not preempted and
migrated to a different CPU, otherwise it will pass a pointer to the
wrong CPU's pc_curthread PCPU member.

Initially it would seem as though the solution to this would be to add
an additional barrier to critical_enter() / sched_pin() to ensure the
register reads could not be hoisted like this. However, I have not been
able to find a sequence that works reliably across both GCC and Clang,
independent of optimisation level. Using inline asm with x18 marked as a
clobber, using "=r"(pcpup), and using "+r"(pcpup) all run into various
issues; some combinations don't actually seem to be a barrier, and for
Clang at -O0 some combinations will actually generate writes to x18**,
at which point you then have to hope that the kernel is compiled with
optimisations, and that the redundant writes are optimised away such
that x18 is just passed through. But that just gets us back to hoping
optimisation works, which isn't a solution to the problem, it just
trades one point of fragility for another.

In talking to GCC developers, who seemed rather horrified by the
implications of trying to do this (which is effectively "register
volatile", a combination that's explicitly forbidden), we could not find
a solution to this, and so I have concluded that the only reliable to
have a sound PCPU implementation is to ditch this optimisation and
follow other non-x86 architectures in using inline asm in one form or
another; specifically, this adopts riscv's approach of just calling
get_pcpu(), which, curiously, was already implemented in inline asm here
on arm64, rather than reading pcpup.

Anyone who feels strongly enough about PCPU performance is welcome to
try to find a working approach, but such proposals should be heavily
scrutinised to be certain that they won't come back to bite us in
future. In particular, this caused a lot of problems downstream in
CheriBSD's experimental compartmentalised kernel, which is trialling
interposing on PCPU accesses in order to restrict access within
compartments. As a result, even PCPU_GET/SET/ADD can look like PCPU_PTR,
as they pass an opaque PCPU reference to wrapper functions, and so this
case gets hit all over the kernel, giving highly-confusing panics with
locks that aren't owned by the current thread or SMR use allegedly not
within an smr_enter().

The ia64 port encountered the same issue and reached the same conclusion
in e31ece45b7a4 ("Fix the PCPU access macros."), though went to the
trouble of trying to fold the offset into the inline assembly (assuming
it fit, with no fallback if not, since it's using the add pseudo-op that
will be expanded to either adds with a 14-bit immediate or, if somehow
that doesn't fit, addl with a 22-bit immediate). Curiously though it
left pcpup around as a footgun. sparc64 had similar code but was never
fixed. It also defined a curpcb in the same manner which was presumably
similarly broken, but looks to have been entirely unreferenced from C,
only referenced in actual assembly files. Alpha also had the same
design, but it was removed whilst critical_enter() was extern rather
than static inline so uses of the pointer could not have been hoisted,
and whilst sched_pin() didn't have any form of atomic_interrupt_fence()
to even try to make PCPU well-ordered.

 * At time of writing, when that was LLVM 19, not verified at time of
   commit with LLVM 21.

** For "+r"(pcpup), Clang's initial code generation is to do:

       mov xTtmp1, x18
       mov x18, xTmp1
       /* asm (empty) */
       mov xTmp2, x18
       mov x18, xTmp2

   since its interpretation of what that means is "read the value of
   pcpup, and make sure that value is in x18 for the duration of the
   assembly due to the asm("x18") on pcpup", and similarly for the output
   side.

Reviewed by:    andrew, jhb
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D56601
551d47c5677a5eaf0a1ed2ea3b2b1406b192764d Jessica Clarke 2026-04-27 12:53:29
Commit group #1: qcom_tlmm
qcom_tlmm: prepare for supporting multiple TLMM platforms

* Create a set of callbacks implementing the hardware specific
  GPIO bus operations
* Migrate the IPQ4018 TLMM setup code into qcom_tlmm_ip4018.c

Differential Revision:  https://reviews.freebsd.org/D56349
20baee6bfed2f39008955dce1f0ce31eb10805f3 Adrian Chadd 2025-02-10 00:49:45

qcom_tlmm: extend the IPQ4018 pinmux function mask to 4 bits

It's 4 bits, not 3. Oops.

Differential Revision:  https://reviews.freebsd.org/D56350
fedc032e110aea98cc976f71ef934c564fc0a8ad Adrian Chadd 2026-04-07 10:08:20

qcom_tlmm: add i2c pull up strength config option

The X1E and others have a separate configuration bit to increase the
pull-up drive strength for i2c busses.

Add the plumbing; it doesn't do anything just yet.

Differential Revision:  https://reviews.freebsd.org/D56351
f65a4854bf82f60002e268928614e379da852005 Adrian Chadd 2026-04-07 10:09:44
ena: Report RX overrun errors
Extract rx_overruns from the keep alive descriptor reported by
the device and expose it via sysctl hw stats.

RX overrun errors occur when a packet arrives but there are not
enough free buffers in the RX ring to receive it.

MFC after: 2 weeks
Sponsored by: Amazon, Inc.
Differential Revision: https://reviews.freebsd.org/D56640
e3f4a63af63bea70bc86b6c790b14aa5ee99fcd0 David Arinzon 2026-04-15 12:13:56
ena: Update driver version to v2.8.3
Features:
* Report RX overrun errors via sysctl hw stats

Bug Fixes:
* Budget rx descriptors, not packets, to fix jumbo frame throughput

Minor Changes:
* pmap_change_attr void * API change for FreeBSD 16.0+
* Adjust ena_[rt]x_cleanup to return bool

MFC after: 2 weeks
Sponsored by: Amazon, Inc.
Differential Revision: https://reviews.freebsd.org/D56641
af7911d3b732b8e0d4254c5d0bf60d74ced89157 Arthur Kiyanovski 2026-04-25 18:47:26
Commit group #2: bnxt_en
bnxt_en: Add core SR-IOV infrastructure

Introduce the foundational building blocks for SR-IOV Virtual Function
support on Broadcom NetXtreme-C/E adapters.

* Add bnxt_sriov.h: defines the extended bnxt_vf_info structure (per-VF
  firmware FID, MAC addresses, VLAN, flags, DMA command buffers, resource
  counts), the bnxt_resc_map helper, flag macros (BNXT_VF_TRUST,
  BNXT_VF_SPOOFCHK, etc.), and prototypes for all SR-IOV functions.

* Add bnxt_sriov.c: implements the SR-IOV attachment sequence
  (bnxt_sriov_attach), the iflib IOV callbacks (bnxt_iov_init,
  bnxt_iov_uninit, bnxt_iov_vf_add), VF resource allocation and
  firmware configuration helpers (bnxt_alloc_vf_resources,
  bnxt_cfg_hw_sriov, bnxt_hwrm_func_vf_resc_cfg, bnxt_hwrm_func_buf_rgtr,
  bnxt_hwrm_func_vf_resource_free), and the per-VF parameter helper.

* Extend bnxt.h: include bnxt_sriov.h; extend bnxt_pf_info with VF-
  tracking fields (vf array, firmware FID/MAC, resource-reservation
  strategy, DMA page management, sysctl context); replace the upstream
  bnxt_vf_info stub with the full definition from bnxt_sriov.h; extend
  bnxt_func_qcfg with allocation counters required by the VF resource
  configuration path; add vf_resc_cfg_input and sriov_lock to bnxt_softc.

* Update Makefile to build bnxt_sriov.c and include bnxt_sriov.h.

* Wire up PCI-IOV device methods (pci_iov_init / pci_iov_uninit /
  pci_iov_add_vf) and iflib IOV callbacks (ifdi_iov_init / ifdi_iov_uninit
  / ifdi_iov_vf_add) in if_bnxt.c; call bnxt_sriov_attach() from
  bnxt_attach_post() on P5+ Physical Functions.

MFC after:      1 month
Reviewed by:    ssaxena
Differential Revision: https://reviews.freebsd.org/D56197
f2f831b2c151a9d989a94fc7c894118c802ef348 Chandrakanth Patil 2026-03-31 16:59:00

bnxt_en: Add VF load path and PF/VF context differentiation

Teach the driver to distinguish a Physical Function from a Virtual
Function at probe time and configure each appropriately.

* Introduce bnxt_is_vf_device() to identify all known VF device IDs
  (NetXtreme-C/E Gen1-3, Thor1/2, Hyper-V variants).  Add corresponding
  PVID entries to bnxt_vendor_info_array.

* Refactor the iflib shared context: rename bnxt_sctx_init to
  bnxt_sctx_template, add a Thor2-specific bnxt_sctx_template_p7, and
  build per-call PF/VF instances via bnxt_init_sctx_variants(); the VF
  instance carries IFLIB_IS_VF.  bnxt_register() selects the correct sctx.

* bnxt_attach_pre(): replace the hard-coded NPAR/VF switch with
  bnxt_set_flags_by_devid(); on a VF call bnxt_approve_mac() to request
  PF approval for the firmware-assigned MAC address.

* bnxt_hwrm_func_qcaps(): populate fw_fid and MAC for PF and VF contexts
  separately; for PF call iflib_set_mac() and record max_msix_vfs; for VF
  handle the case where the PF has not yet assigned a MAC.

* bnxt_hwrm_func_qcfg(): populate the new alloc_* counters used by the VF
  resource configuration path; record registered_vfs for PF and VLAN/trust
  state for VF.

* bnxt_init(): call bnxt_update_vf_mac() on VFs after each bring-up.

MFC after:      1 month
Reviewed by:    ssaxena
Differential Revision: https://reviews.freebsd.org/D56198
a5bedb41e5d6b3680981f109c3e89fb5ffd8eee1 Chandrakanth Patil 2026-03-31 16:59:01

bnxt_en: Add VF forwarded HWRM request handling

Enable the Physical Function to proxy HWRM commands issued by Virtual
Functions through the firmware forwarded-request mechanism.

When a VF issues a command that requires PF arbitration, the firmware
delivers a CMPL_BASE_TYPE_HWRM_FWD_REQ completion to the PF async ring.

* bnxt_process_async_msg() recognises CMPL_BASE_TYPE_HWRM_FWD_REQ,
  identifies the originating VF by its firmware function ID, sets the
  corresponding bit in pf.vf_event_bmap, and raises
  BNXT_HWRM_EXEC_FWD_REQ_SP_EVENT to schedule deferred processing.

* bnxt_sp_task() dispatches to bnxt_hwrm_exec_fwd_req(), which iterates
  over all pending VF bits and calls bnxt_vf_req_validate_snd() for each.

* bnxt_vf_req_validate_snd() inspects the encapsulated request type:
  HWRM_FUNC_VF_CFG (MAC change) is handled by bnxt_vf_configure_mac()
  which enforces trust/existing-MAC rules; HWRM_CFA_L2_FILTER_ALLOC is
  handled by bnxt_vf_validate_set_mac(); HWRM_FUNC_CFG is forwarded
  as-is; all other commands are rejected.

All forwarded-request code is guarded by #ifdef PCI_IOV.

MFC after:      1 month
Reviewed by:    ssaxena
Differential Revision: https://reviews.freebsd.org/D56199
fcf100da9b381ad9d81f94499fdadea15ae2b431 Chandrakanth Patil 2026-03-31 16:59:01

bnxt_en: Add per-VF trust, spoof-check and promiscuous controls

Expose per-VF policy knobs via the FreeBSD sysctl tree and enforce
them at the data-path level.

Trust (dev.bnxt.<unit>.vfN.trusted):
  bnxt_set_vf_trust() sets/clears BNXT_VF_TRUST and sends
  HWRM_FUNC_CFG with FLAGS_TRUSTED_VF_ENABLE/DISABLE.
  bnxt_create_trusted_vf_sysctls() / bnxt_destroy_trusted_vf_sysctls()
  manage the sysctl lifetime with VF creation/teardown.

Spoof-check (dev.bnxt.<unit>.vfN.spoofchk):
  bnxt_set_vf_spoofchk() issues HWRM_FUNC_CFG with
  SRC_MAC_ADDR_CHECK_ENABLE/DISABLE.

Promiscuous gating:
  bnxt_is_trusted_vf() queries firmware via HWRM_FUNC_QCFG.
  bnxt_promisc_ok() returns false for untrusted VFs, preventing them
  from entering promiscuous mode.  bnxt_promisc_set() is updated to
  gate the PROMISCUOUS and ANYVLAN_NONVLAN mask bits on bnxt_promisc_ok().

bnxt_iov_vf_add() applies the initial trust/spoof-check policy from the
nvlist schema.  bnxt_iov_init() creates the sysctl trees after
bnxt_cfg_hw_sriov() succeeds.  bnxt_iov_uninit() tears them down.

MFC after:      1 month
Reviewed by:    ssaxena
Differential Revision: https://reviews.freebsd.org/D56200
ea4ab7e36ed9cf153c374782be446254a7d11822 Chandrakanth Patil 2026-03-31 16:59:01

bnxt_en: Re-enable SR-IOV after firmware reset

When the firmware undergoes a hot-reset and the driver re-opens the
device, previously active Virtual Functions lose their resource
configuration.  bnxt_reenable_sriov() restores that configuration by
replaying bnxt_cfg_hw_sriov() with the saved resource parameters.

The function is called from bnxt_fw_reset_task() in the
BNXT_FW_RESET_STATE_OPENING state, guarded by #ifdef PCI_IOV.
Because bnxt_cfg_hw_sriov() is a no-op when active_vfs is zero the
call is safe on any PF regardless of whether VFs were ever created.

MFC after:      1 month
Reviewed by:    ssaxena
Differential Revision: https://reviews.freebsd.org/D56201
8743209350cb4b7db6d367df99da0a7ae3bc5d39 Chandrakanth Patil 2026-03-31 16:59:02

bnxt_en: VF ring reservation, HWRM registration, and PF-only operation guards

VFs require separate HWRM commands for ring reservation and async
completion ring setup, so a common PF/VF dispatcher is introduced and
the async CR path is extended to handle both.  The PF must populate the
VF request forwarding bitmap during driver registration so the firmware
correctly forwards VF-originated HWRM commands.  VF reservation strategy
and min-guaranteed capability flags are now parsed for correct resource
partitioning, and PF-only operations (DCB, NVM, package version sysctl)
are guarded against VF invocation.

The short command buffer allocation is also reordered before the function
reset to ensure extended HWRM messages are available when needed, a
prerequisite uncovered during VF bring-up.

MFC after:      1 month
Reviewed by:    ssaxena
Differential Revision: https://reviews.freebsd.org/D56232
c972c5acbac472a5dc797856f39f478862b6c6ea Chandrakanth Patil 2026-04-02 23:04:45

bnxt_en: Address review comments for core SR-IOV support

This patch addresses the code review comments provided for:
https://reviews.freebsd.org/D56197

* P7 VF PCI ID: rename NETXTREME_E_P7_VF to E_P7_VF (P7/Thor2 line drops the
  Netxtreme name in product strings; other VF device IDs are unchanged).
* Use the return value of bnxt_vf_parse_schema() in bnxt_iov_vf_add() to
  decide when to call bnxt_set_vf_admin_mac(); make parse_schema() return
  bool and remove the has_admin_mac field.
* In bnxt_free_vf_resources(), fix indentation after dma_free_coherent() so
  the NULL assignment is clearly separate from the call.
* In bnxt_hwrm_func_vf_resource_free(), use first_vf_id/last_vf_id in the
  HWRM_FUNC_VF_RESC_FREE loop.

MFC after:      1 month
Reviewed by:    ssaxena
Differential Revision: https://reviews.freebsd.org/D56644
7c450d1127c7f08361f848c0ac57189910da8d3b Chandrakanth Patil 2026-04-26 18:11:31

bnxt_en: add bnxt_sriov.c to sys/conf/files for built-in kernel builds

The SR-IOV series added bnxt_sriov.c and listed it in sys/modules/bnxt/bnxt_en/Makefile,
but kernels that build bnxt into the image only compile sources named in sys/conf/files.
Add bnxt_sriov.c next to the other bnxt_en entries so built-in bnxt (including LINT)
links the SR-IOV implementation and avoids undefined symbols referenced from if_bnxt.c.

Fixes: https://cgit.freebsd.org/src/commit/?id=f2f831b2c151 ("bnxt_en: Add core SR-IOV infrastructure")

MFC after:      1 month
Reviewed by:    ssaxena
Differential Revision: https://reviews.freebsd.org/D56688
c21c63fb565f1bc7f9564dbf12068c864f8891d8 Chandrakanth Patil 2026-04-28 14:10:13
amd64: Make EFI runtime faults look less like panics
EFI runtime faults may be mistaken for kernel panics, and do not
necessarily represent actual problems.  Try to differentiate them some
more by printing "EFI runtime trap" rather than "Fatal trap".

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=291193
Reviewed by:    kib
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56309
ddabf7f3ea4f0497dc5a5ffcbbb1d852ea77a4cd Ed Maste 2025-11-26 19:28:13
hwpmc: Add IBS capability control policy
Reject unsupported AMD IBS and PMU control bits before programming the
MSRs.

Initialize IBS fetch/op allow masks from CPUID feature bits and validate
user-provided IBS control values against those masks. Keep the
load-latency filter dependency on L3MissOnly, but avoid decoding fields
that are already constrained by the mask.

Apply the same reserved-bit policy to the AMD PMU raw-config path by
checking core, L3, and data fabric configs against subclass-specific
masks.

Fix the IBS CPUID feature bit definitions used by the policy.

Reviewed by:    mhorne, Ali Mashtizadeh <ali@mashtizadeh.com>
Sponsored by:   AMD
Signed-off-by:  Andre Silva <andasilv@amd.com>
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2140
39f48829a045e22c39e7099fa39c1a8b7d3fa7f4 Andre Silva 2026-04-23 19:45:26
hwpmc: Add extra_mask sysctls per counter type
Expose kern.hwpmc.{ibs_fetch,ibs_op,amd_core,amd_l3,amd_df}_extra_mask
as RWTUN uint64s that OR into the CPUID-derived allow mask at
validation time. Default 0, so the strict policy applies unless an
administrator opts bits back in — intended for testing the wrmsr_safe
path in PR #2157.

Reviewed by:    mhorne, Ali Mashtizadeh <ali@mashtizadeh.com>
Sponsored by:   AMD
Signed-off-by:  Andre Silva <andasilv@amd.com>
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2140
146b30bad9f65a098e6c09ae93bb1da2ff59616d Andre Silva 2026-04-23 19:27:06
arm64: Support some per-thread sctlr_el1 fields
This will be used to enable MTE from userspace.

Sponsored by:   Arm Ltd
Differential Revision:  https://reviews.freebsd.org/D55950
01ff0fa77d33dde6b6f6a0ff83b0028f76243796 Andrew Turner 2026-04-29 11:34:39
arm64: Fix a MTE check
It should be for FEAT_MTE2 as the registers aren't implemented for
FEAT_MTE.

While here fix the style of the comment explaining the check.

Reported by:    markj
Fixes:          https://cgit.freebsd.org/src/commit/?id=58de79153622 ("arm64: mte: configure initial state for system registers")
Sponsored by:   Arm Ltd
2783fb7e7321911b4159d7f41d1c80cae40a7552 Andrew Turner 2026-04-29 11:34:49
netmap: check for possible out-of-bound write with options
Submitted by: hari.thirusangu@sophos.com
MFC after:      2 weeks
0216ea8598af7d4170a8660f48981fb12b7b1d67 Vincenzo Maffione 2026-04-29 20:59:17
Commit group #3: powerpc/pic: Add a PIC_AP_INIT() to set up AP PIC info
powerpc/pic: Add a PIC_AP_INIT() to set up AP PIC info

pc_cpuid may not match the PIC's idea of a given CPU.  Since openpic
has a WHOAMI register, we can use that to get the PIC's idea of the CPU.
This needs to be done on each AP, so add a PIC_AP_INIT device method so
the PIC can perform any AP-specific initialization at AP bootstrap time.

This fixes SMP on e6500, which is still lacking SMT support.

Differential Revision:  https://reviews.freebsd.org/D56421
40bcad56f1b8b3a0eed9af68de5535a784c004d9 Justin Hibbits 2026-04-30 00:12:18

powerpc/pic: fix the openpic CPU logic to work on powermac

Earlier work (40bcad56f - powerpc/pic: Add a PIC_AP_INIT() to
set up AP PIC info) broke booting my dual G5 powermac.

After much digging, jhibbits@ and I discovered that the openpic
implementation for the memory/bus controller used in the G5 CPUs
doesn't implement /all/ of the openpic specification.
Notably it sticks the WHOAMI register in a different location.
This is reading 0x0 back for all the PICs which is .. very not great.

So to restore the previous behaviour, use a quick for now that jhibbits@
can set appropriately to trust WHOAMI.

I've tested this on my dual G5 PPC and it boots/runs fine.

Fixes: https://cgit.freebsd.org/src/commit/?id=40bcad56f

Reviewed by:    jhibbits
Differential Revision:  https://reviews.freebsd.org/D56751
6a0610cb50181d1797d1a8c5d60ad76c666a625e Adrian Chadd 2026-05-01 00:07:48
powerpc/openpic: Increase the maximum number of IRQs allowed
The Freescale MPIC supports up to 2048 IRQs, but since we only build an
array of 768 interrupts in intr_machdep, clamp the max at 512.  The most
any Freescale PowerPC chip actually supports is 452 on the T4240, so 512
is sufficient.

As part of this, increase the vector mask to the full openpic vector
mask, and use this limit as the terminator for the dispatch loop,
instead of a hard-coded 255.

Differential Revision:  https://reviews.freebsd.org/D56422
605f53705d6dc57ed391353cecf3ce84a4283740 Justin Hibbits 2026-04-30 00:13:11
iicmux: Return the right error codes
I2C subsystem errors belong in the IIC_* error space.  It's pretty clear
this is what is intended in the code.
0a705587e4720cdb0317efb80e9452d236c5cfcf Justin Hibbits 2026-04-22 22:49:16
mpc85xx/msi: Add compat string for T208x/T4xxx SoCs
59a844b9cea7bbe92b3899805acd1699c5006ed7 Justin Hibbits 2026-04-16 01:48:21
asmc: replace hardcoded model table with universal probing
Probe SMC keys at attach time to detect hardware capabilities,
supporting all Intel Apple machines without per-model entries.

Sensors are discovered by scanning sorted SMC key ranges for
known prefixes and types. Capabilities such as SMS, fan safe
speed, and ambient light are detected by key presence.

A global key description table provides human-readable names
for well-known temperature sensors.

Tested on:
 - MacBook Pro (Early 2007, Mid 2014, Mid 2015)
 - MacBook Air (Early 2015, Mid 2017)
 - iMac (Mid 2011, Late 2013)
 - Mac mini (Mid 2011)

Reviewed by:    adrian
Differential Revision:  https://reviews.freebsd.org/D56405
e7f4269dbfad02119934c35d523cb33ff8c93493 Abdelkader Boudih 2026-04-30 00:38:38
dev/ichsmb: disable block buffer if supported
In order to improve the efficiency of block read/write calls, Intel has
introduced a block buffer. Instead of generating an interrupt after
receiving/sending a single byte, the data is buffered in the block buffer. It
allows the SMBus controller to generate a single interrupt for the whole
transfer. At the moment, we don't support that and don't expect the SMBus
controller to behave in that way. Unfortunately, BIOS code can also access the
SMBus controller and may enable the block buffer. Poorly written BIOS code may
also keep the block buffer enabled breaking our driver. Therefore, we should
check if the device supports a block buffer and disable it for every request
because we don't know if some BIOS code has reconfigured the SMBus controller
in between.

Reviewed by:            emaste
MFC after:              1 week
Sponsored by:           Beckhoff Automation GmbH & Co. KG
Pull Request:           https://github.com/freebsd/freebsd-src/pull/2161
226b37dc3ad5641c18f8542c18baea3ea641c5af Corvin Köhne 2026-03-30 09:33:20
snd_uaudio: Support Roland UA-33
Apply the appropriate quirk. Also, introduce a new uaudio_vendor_audio
table, similar to uaudio_vendor_midi, which includes non-standard USB
audio devices. The Roland UA-33 needs this, bceause it comes with
bInterfaceClass = 0xff (vendor-specific), so snd_uaudio(4) doesn't
detect it.

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294814
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    emaste
Pull Request:   https://ron-dev.freebsd.org/FreeBSD/src/pulls/24
549e740619873716b796a841a10f56fae3c3ad49 Christos Margiolis 2026-04-28 16:39:45
sound: Retire unused snddev_info->bufsz
Sponsored by: The FreeBSD Foundation
MFC after:      1 week
5e9f2a6aefabec01c587a169fd5efe3a2720a8e5 Christos Margiolis 2026-04-30 18:45:20
mfi(4)/mrsas(4): Set sysctl name for driver versions consistently
Instead of printing the driver version over and over again if multiple
controllers are used, set a sysctl name for the used driver version.

Approved by:    imp, ziaee
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D56110
ea1764e5fcf0fc11680dc104e663ae3d1d0fd7be Michael Osipov 2026-02-25 19:48:34
amdsmu: Add Krackan Point support
Reviewed by:  obiwac, emaste
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56619
9c77fb6aaa366cbabc80ee1b834bcfe4df135491 Tom Jones 2026-04-24 12:47:04
Remove extraneous tab characters at EOL in various _stdint.h files
MFC after:    3 days
daeab702f9adbbb718ecf48e17de8dd619cfe7b8 Dimitry Andric 2026-05-01 18:08:26
Define stdint.h macros unconditionally
Similar to glibc, define all the stdint.h macros such as `SIZE_MAX`,
`UINT64_C`, etc unconditionally. I.e. no longer check whether
`__STDC_CONSTANT_MACROS` or `__STDC_LIMIT_MACROS` are defined. See also
<https://sourceware.org/bugzilla/show_bug.cgi?id=15366>.

This is part of reverting base 00bee6fcd77f, which reverted an upstream
libc++ commit that eliminated libc++'s stdint.h wrapper header.

Submitted by:   Nikolas Klauser <nikolasklauser@berlin.de>
MFC after:      1 week
Reviewed by:    imp
Differential Revision: https://reviews.freebsd.org/D56746
966fb94cb3575ccd39da211165d0858fd0eb0ef2 Dimitry Andric 2026-05-01 18:07:11
Commit group #4: powerpc
powerpc: initial straight port of busdma_machdep.c -> busdma_bounce.c

This is a straight port of the code and doesn't yet handle
different implementations (which will be in a subsequent commit.)

Locally tested:

* G5 SMP (2x PPC970mp)
* power8 / power9 pseries QEMU VM
* power8 powernv

Differential Revision:  https://reviews.freebsd.org/D55313
3bcb7c2a33206d52cecb349b77b2a631728bc7d1 Adrian Chadd 2026-02-14 17:03:27

powerpc: create a tag with the parents implementation if supplied

If a parent tag is supplied then use its implementation.

Differential Revision:  https://reviews.freebsd.org/D55314
330e4f6acbdc360c0dc466f4d54bc63e663d307a Adrian Chadd 2026-02-15 02:10:31

powerpc: add in some busdma domain setup

* Implement the basic tag domain set routine
* Set the domain to the parent domain if provided

This is just plumbing for eventual work to re-allocate things into
the currently configured domain.

Differential Revision:  https://reviews.freebsd.org/D55315
df3bd7201efc88b0518c9fe7997f3dbf656eccd5 Adrian Chadd 2026-02-15 02:28:07

powerpc: refactor common busdma tag setup

Refactor the common busdma tag setup code into busdma_machdep.c

Locally tested:

* qemu VM, pseries-9 / power9
* qemu VM, pseries-8 / power8

Differential Revision:  https://reviews.freebsd.org/D55340
00ec88d2aa8d8267b1e80991d5e632bb9f012b07 Adrian Chadd 2026-02-18 06:50:12

powerpc: use local flags for bounce buffers instead of common flags

Migrate to using local flags for bounce buffers instead of the
common flag field.

Differential Revision: https://reviews.freebsd.org/D56208
7c57d2499ceee81aa386430d4d9e6d9080d50f94 Adrian Chadd 2026-04-01 00:04:28

powerpc: busdma declaration shuffling

Shuffle some of the declarations around to match other implementations.
Expected to be a no-op.

Differential Revision: https://reviews.freebsd.org/D56243
c7040d3eaa03a9dd27fde69ccf585a76dfbb2c6c Adrian Chadd 2026-04-01 00:23:56

powerpc: refactor dmamap setup; free dmamap in error paths

* refactor the dmamap allocation / setup path for future code changes
  to align with arm64 busdma code;
* free the dmamap allocation if the dma segment list can't be allocated;
* free the dmamap allocation during the busdma dmamem allocation path
  if the actual memory allocation itself fails.

Locally tested:

* POWER9 ppc64le native boot, Raptor Engineering Blackbird
* POWER8 ppc6le, IBM POWER S822LC

https://reviews.freebsd.org/D56244
0de6295af231aa5c13e1da2f40b29106962b6363 Adrian Chadd 2026-04-01 05:21:15
vt_core: don't draw the splash if a panic occurred
The shutdown splash draws over all the useful info if ddb(4) is
disabled. Don't draw the splash screen if we're rebooting because of a
panic.

MFC after:      3 days
bc83f414583ccaf337ef3b7c019df7727d6a3aae Ahmad Khalifa 2026-05-03 13:18:38
iicbus/rtc: Add driver for the Ricoh rs5c372 RTC
This RTC chip supports 2 alarm timers in addition to RTC functionality,
but this driver only supports the RTC at this time.
d22051b18e9b7512c5cf033d7b6eee2df03c985b Justin Hibbits 2026-04-22 02:15:02
Commit group #5: dpaa
dpaa: Migrate from NCSW base to a home-grown driver

The NCSW reference base requires tuning for each target, and currently
is configured for FMANv2.  This doesn't readily work on FMANv3 devices,
such as the T-series powerpc, or the LS1043 ARM.  Since Freescale/NXP
abandoned the NCSW driver a decade ago, it makes sense to abandon it
ourselves as well.  This new driver uses a combination of the NCSW
driver and the Linux driver (BSD/GPL dual licensed) as a reference, but
contains no actual code from them.

The DPAA (Data Path Acceleration Architecture) subsystem consists of the
following components:

* BMan -- Buffer Manager.  Manages buffer pools of different sizes (one
  size per pool, up to 64 pools)
* QMan -- Queue Manager.  Manages the interfaces between DPAA-based
  components and the CPU(s).
* FMan -- Frame Manager.  Responsible for all ethernet-related
  processing.  Consists itself of the following components:
  * Ports -- interfaces to the QMan.  An ethernet interface consists of
    2 ports.
    Ports use "Next-invoked action" (NIA) descriptors to form a pipeline
    for processing on receive and transmit.
  * Parser -- performs protocol header parsing and validation.  Both
    hardware and software parsers are available.
  * KeyGen -- Key generator, used to start the classification process
    (for the Policer), generating FQIDs and other keys based on the
    frame input.
  * Policer -- performs traffic shaping and classification
* MAC -- SoC specific ethernet MAC (dTSEC, TGEC, mEMAC).  Currently
  supports dTSEC and mEMAC, along with their MDIO blocks.

Additional components not yet handled:
SEC -- Security engine (crypto)
RE -- RAID engine
RapidIO
DCE -- Decompression/Compression engine, supports ZLIB, DEFLATE, and
GZIP, as well as base64 encoding and decoding.

BMan and QMan are accessed via cache-coherent portals, using ring
buffers as I/O.  The intent is for portals to be per-CPU (core/thread)
to reduce locking contention and improve performance.  This driver pins
interrupt handlers to the CPU "owning" a given portal, and uses critical
sections to prevent switching while accessing the portal.
fd8d34ce272ba40f3e0218198ba542a29c390a4a Justin Hibbits 2026-04-24 03:38:19

dpaa: Enable checksum offloading for IPv4 and IPv6

Enable the FMan hardware parser to take advantage of some offloading.
This enables receive and transmit checksum offloading for both IPv4 and
IPv6.

Additional offloading capabilities the DPAA supports include:
* vlan parsing
* Transmit rate limiting
* IEEE-1588 timestamps
* Soft parsing for custom protocol checking
* Congestion handling
6464974c5a56a9f899f8a673385711253f9fcbd0 Justin Hibbits 2026-04-25 20:50:34

dpaa: Support jumbo frames as multi-buffer frames
9d423705db8b4188ed7c02d31b93393f0f8e680e Justin Hibbits 2026-04-29 20:22:56

Networking

Network-related commands, library, and kernel.

tests/tcp_hpts_test: Fix resource leaks
When a KTEST_EQUAL assertion fails, the test function returns, but this
can cause it to leak locks, which can trigger a panic under witness.
Add a variant which causes control flow to jump to a label in case of
failure, and use that to prevent this problem.

Reviewed by:    Nick Banks <nickbanks@netflix.com>, tuexen
MFC after:      1 weeks
Differential Revision:  https://reviews.freebsd.org/D56647
f7bf9fd6199c99284dbc899928d8ad62861da414 Mark Johnston 2026-04-27 01:17:36
pf: improve ASCONF chunk validation
When processing an ASCONF chunk we failed to verify that the chunk
length was at least 8 bytes. As a result we might end up passing a
negative length to pf_multihome_scan(). Fortunately this merely meant
the function did nothing, but we should discard such invalid packets, so
explicitly check for this.

MFC after:      1 week
Reported by:    Mark Johnston
Sponsored by:   Orange Business Services
bea1c2fcd7839fd90a8ce96d6dc6a033779bc3c2 Kristof Provost 2026-04-28 08:54:24
ctld: kernel-sourced portal groups are not dummies
The current and historical versions of ctld would flag our initial set
of kernel ports as dummies, because their portal groups were empty since
portals come from the configuration on-disk.

As a result, we would never try to remove a kernel port at startup that
didn't exist in the configuration (possibly a feature if you wanted
concurrent ctld(8)), and we would always try to port->kernel_add() on
ports in the configuration (even if they actually did have an existing
kernel port).

Flag these portal groups as kernel groups so that we avoid trying to add
ports that already exist.  It may be the case that the kernel_remove()
loop in conf::apply() needs to do something other than the current
`oldport->is_dummy()` to avoid removing ports that it isn't supposed to
be managing, but that wuld also seem to apply to LUNs that would be
removed today.

Reviewed by:    jhb
Differential Revision:  https://reviews.freebsd.org/D51782
d9c0594191f5c45d7f3c737350321ee59bfce9bf Kyle Evans 2026-04-28 20:51:50
pf: improve SCTP validation
As per RFC5061 "4.2.  New Parameter Types" the add/delete IP address
parameters (0xc001, 0xc002) may not be present in an INIT or INIT-ACK
chunk. They are only allowed to be present in an ASCONF chunk.

This also prevents unbounded recursion while parsing an SCTP packet.

Approved by:    so
Security:       FreeBSD-SA-26:14.pf
Security:       CVE-2026-7164
PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294799
Reported by:    Igor Gabriel Sousa e Souza
Sponsored by:   Orange Business Services
6f9ddb329b07099e392c78b6e4fef1c6252de0dc Kristof Provost 2026-04-26 09:34:55
inpcb: improve some internal function names
The 'hash' subword doesn't bring any additional information.  All inpcb
lookup functions operate on hashes.

For lookup functions that work on either exact hash or wild hash just
perform s/hash_//.  Rename in_pcblookup_hash() into
in_pcblookup_with_lock(), emphasizing its difference to
in_pcblookup_smr().  Rename in_pcblookup_hash_locked() to
in_pcblookup_internal(), as it doesn't return a locked inpcb and is used
only for internal purposes.  Note that the IPv6 sibling of this function
already lives by name in6_pcblookup_internal().  Some future changes will
make such naming more justified.

No functional change.

Reviewed by:            pouria, markj
Differential Revision:  https://reviews.freebsd.org/D56482
9b8eb70ca974c2c700f228adaceb9a6b9e918d00 Gleb Smirnoff 2026-04-29 16:19:03
inpcb: allow to specify different sizes for port and load balance hashes
Understand zero size as instruction to not allocate the hash.  Do not
allocate both hashes for rawip(4).  There are no functional changes to TCP
or UDP.

Reviewed by:            markj
Differential Revision:  https://reviews.freebsd.org/D56705
6883b120c53735ff1681ef96d257f376731f56b3 Gleb Smirnoff 2026-04-29 16:19:14
if_gre(4): Fix gre_clone_dump_nl address dump
Fix stack overflow by passing in_aliasreq instead of ifr
during netlink dump.

Fixes:  https://cgit.freebsd.org/src/commit/?id=e1e18cc12e68 ("if_gre: Add netlink support with tests")
c5a92616c41f9132d585c533e66dee88e98c73f2 Pouria Mousavizadeh Tehrani 2026-04-29 17:42:27
routing: Implement merge of nhgrp in new multipath route
Routing subsystem allows creating new multipath routes by
nexthop groups (e.g RTA_MULTIPATH in netlink), in case of
a second nexthop group on the same route, don't panic and
merge the existing nhgrp with new one.

Reviewed by: melifaro (except one comment)
Differential Revision: https://reviews.freebsd.org/D56187
dd945c6ba4ff8d444c4cb90a911d96c66b6fc4aa Pouria Mousavizadeh Tehrani 2026-03-31 19:13:48
netlink: Fix RTA_MULTIPATH on RTM_GETROUTE
Before this patch, netlink never returned RTA_MULTIPATH.
Also, add RTA_MULTIPATH attribute in way that don't confuse
non-mpath support consumers.

Differential Revision: https://reviews.freebsd.org/D56188
84bb3648d2151576ebd707b592942a1fd77aa2c4 Pouria Mousavizadeh Tehrani 2026-04-08 19:16:35
routing: Expire nhops inside the nhgrp
Fix route expiration of nhops that exists inside a nhgrp.

Differential Revision: https://reviews.freebsd.org/D56189
8a64738f5a93ea878425ee3f51e1b9efbd3f5d6e Pouria Mousavizadeh Tehrani 2026-04-19 10:58:25
Commit group #6: krb5: import MIT 1.22.2
krb5: import MIT 1.22.2

Merge commit '90c687295e2d62f9411fc5b571f5af4e8ee187a7'
736e411a737b9f57c1303e6d15c5afd4f63af0d3 Cy Schubert 2026-04-30 19:24:20

krb5: Adjust version to 1.22.2

Fixes:          https://cgit.freebsd.org/src/commit/?id=736e411a737b
8f46ba065143d9d89968a20b23844287d54c04a2 Cy Schubert 2026-05-01 00:57:39

krb5: Adjust additional version strings

Fixes:          https://cgit.freebsd.org/src/commit/?id=736e411a737b
c64ee36e5d09ecee4ce4951047014c8461734fb5 Cy Schubert 2026-05-01 14:40:19
krb5: Fix two NegoEx parsing vulnerabilities
Bring in upstream commit 2e75f0d93 fixing two CVEs. Upstream commit
log is:

 In parse_nego_message(), check the result of the second call to
 vector_base() before dereferencing it.  In parse_message(), check for
 a short header_len to prevent an integer underflow when calculating
 the remaining message length.

 Reported by Cem Onat Karagun.

 CVE-2026-40355:

 In MIT krb5 release 1.18 and later, if an application calls
 gss_accept_sec_context() on a system with a NegoEx mechanism
 registered in /etc/gss/mech, an unauthenticated remote attacker can
 trigger a null pointer dereference, causing the process to terminate.

 CVE-2026-40356:

 In MIT krb5 release 1.18 and later, if an application calls
 gss_accept_sec_context() on a system with a NegoEx mechanism
 registered in /etc/gss/mech, an unauthenticated remote attacker can
 trigger a read overrun of up to 52 bytes, possibly causing the process
 to terminate.  Exfiltration of the bytes read does not appear
 possible.
c9dd7bffa58c50b2f7ed9e66ace39197c468d8e6 Cy Schubert 2026-04-30 19:27:31

System administration

Stuff in man section 8 (other than networking).

caroot: Clean up
* Get certdata.txt directly from the NSS Mercurial repository, rather
  than from the Mozilla Firefox repository which imports it from NSS at
  irregular intervals.

* Instead of always fetching the latest certdata.txt, fetch a specific
  version.  For this commit, we set this to the version that was last
  imported in May 2025.

* Add a refrence to the MPL to the generated files.

* Regenerate with latest OpenSSL.  This is purely cosmetic; mostly, the
  certificate names now contain less unnecessary whitespace and some
  elements are quoted.

MFC after:      1 week
Reviewed by:    michaelo, kevans
Differential Revision:  https://reviews.freebsd.org/D56620
ce33d6396aadb0613f1e74661bdbec571f836a60 Dag-Erling Smørgrav 2026-04-27 09:32:19
caroot: Regenerate
Regenerate using certificate data from NSS 3.123.1.

MFC after:      1 week
Reviewed by:    kevans
07b52233e8b74c5ac884b9c9a894f57fad8dbd00 Dag-Erling Smørgrav 2026-04-27 09:32:51
Commit group #7: mixer(8): Deprecate some unintuitive control values
mixer(8): Deprecate some unintuitive control values

This is a follow-up to cc7479d7dc9b ("mixer(8): Improve mute and recsrc
controls"). These deprecated values will be completely removed on
2026-06-15.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    0mp
Pull Request:   https://ron-dev.freebsd.org/FreeBSD/src/pulls/21
a28bb575c89c8de62684419ece1ff5e070e4ce24 Christos Margiolis 2026-04-23 12:06:15

mixer(8) tests: Remove tests for deprecated control values

Fixes:          https://cgit.freebsd.org/src/commit/?id=a28bb575c89c ("mixer(8): Deprecate some unintuitive control values")
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
54922e4ec8909829a7ca8d2158c2a514a06df094 Christos Margiolis 2026-04-27 22:59:38
bsdinstall: Add SPDX-License-Identifier tags
Reviewed by:  emaste
Sponsored by:   The FreeBSD Foundation
80c73c89dc6a156a119350d7c28c6db1f3b741df Tuukka Pasanen 2026-02-16 09:10:57
bsdinstall: Improve auto-partition message
Manually tuning ZFS for systems with <8GB ram hasn't been necessary at
least since the switch to OpenZFS. We have users reporting using 1GB RAM
with no manual tuning/issues. Further, the page this links to is a stale
wiki page, which is causing complaints. Remove this misleading note and
replace it with a similar message for UFS. While here, reword that note
to be a bit clearer.

PR:                     https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=287719
MFC after:              3 days
Differential Revision:  https://reviews.freebsd.org/D50971
5ed26c21e4ff1d478d4611abbf3dc14cc1b77244 Alexander Ziaee 2026-04-28 16:59:19
efibootmgr: Show attributes, category and optional data when verbose
Also rework a bit the way device path are displayed for consistency.

Signed-off-by:  stephane.rochoy@stormshield.eu
Reviewed by:    imp
Sponsored by:   Stormshield
Pull-Request:   https://github.com/freebsd/freebsd-src/pull/2167
76de40889eed130442b67e14249f96e2e8f88f48 Stéphane Rochoy 2026-04-24 07:03:31
cron: log when a crontab path is too long
Log via syslog when snprintf truncates the crontab path, instead of
silently skipping the entry.

Signed-off-by:  Christos Longros <chris.longros@gmail.com>
Reviewed by:    bcr, kevans
Differential Revision:  https://reviews.freebsd.org/D56235
91bfba010bcda665cc24a76af631cc85fcb0c688 Chris Longros 2026-04-29 04:06:29
Commit group #8: dhclient: Check for unexpected characters in some DHCP server options
dhclient: Check for unexpected characters in some DHCP server options

Some options are written directly to the lease file, which may be parsed
by subsequent dhclient invocations.  We must make sure that a malicious
server can't control the "medium" field of a lease definition, otherwise
they can achieve RCE by injecting one into the lease file, whereupon it
will be passed to dhclient-script, which passes it through eval.

Approved by:    so
Security:       FreeBSD-SA-26:12.dhclient
Security:       CVE-2026-42511
Reported by:    Joshua Rogers of AISLE Research Team (https://aisle.com/)
8008e4b88daf37015d16c4ac709b91804b586575 Mark Johnston 2026-04-27 20:03:09

dhclient: Improve server and filename validation

* Don't iterate over each string three times; once is enough.

* Reject control characters (anything below space) in addition to the
  double quote and backslash.

* If an unsafe character is encountered, discard the string instead of
  rejecting the entire lease.

* If backslashes are encountered in the file name option, convert them
  to forward slashes instead of rejecting the option.

* Tweak the warning messages a bit.  Looking through the rest of the
  code, it seems to me that notes generally end with a period while
  warnings generally don't.

Fixes:          https://cgit.freebsd.org/src/commit/?id=8008e4b88daf ("dhclient: Check for unexpected characters in some DHCP server options")
PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294886
MFC after:      1 week
Reviewed by:    brooks, markj
Differential Revision:  https://reviews.freebsd.org/D56740
873a195ba63575e46686cfd6ea9670a0ca340fa0 Dag-Erling Smørgrav 2026-04-30 16:45:35
dhclient: Fix reallocation of dhclient script environments
When the number of DHCP options exceeds a threshold, script_set_env()
will reallocate the environment, stored as an array of pointers.  The
calculation of the array size failed to multiply by the pointer size,
resulting in a smaller than expected buffer which admits out-of-bounds
writes.

Approved by:    so
Security:       FreeBSD-SA-26:15.dhclient
Security:       CVE-2026-42511
Reported by:    Joshua Rogers of AISLE Research Team (https://aisle.com/)
5d8e32aad2a8316b0aab8a93a677a63e4c3df422 Mark Johnston 2026-04-27 20:56:21
md5: Encode non-printable filenames
Encode filenames in the VIS_CSTYLE | VIS_OCTAL style regardless of
output mode.  When reading filenames from a checksum file, attempt to
decode them, and use the decoded name unless the decoded name does not
exist but the undecoded one does.

This breaks compatibility with GNU coreutils, which unfortunately uses
a non-reversible encoding when outputting filenames containing
non-printable characters.

While here, drop a sentence about preimage attacks against MD5 and SHA1
from the manual page, as I no longer trust it to be true.

MFC after:      1 week
Reviewed by:    bcr, markj
Differential Revision:  https://reviews.freebsd.org/D56615
70fde0ed6bbbb1f84c440190ba1e5435f8c90e13 Dag-Erling Smørgrav 2026-04-29 18:41:05
bhyve: allow read/write to full CRB buffer
For some reason, we've incorrectly calculated the size of the CRB data buffer
register. There's no need to divide the CRB data buffer size by 4. We should
allow access to the whole buffer instead.

Reviewed by:            markj
MFC after:              1 week
Sponsored by:           Beckhoff Automation GmbH & Co. KG
Pull Request:           https://github.com/freebsd/freebsd-src/pull/2169
75909086a45da3c5aeaff8152728111cf798c6bc Corvin Köhne 2026-04-02 06:36:40
etcupdate: fix arguments order of diff command
Due to misplacement of the second -L argument of diff command, it is
treated by getopt_long as an error.

Also add -l option for a diff command that alters the way it shows
differences. Instead of printing full diff, it reports changed file
the same way as added/removed files are reported.

Reviewed by:    imp
Obtained from:  Yandex LLC
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D56708
6d65c91b9a4743bbffc3508bf754e68b65bbd494 Boris Lytochkin 2026-04-30 11:31:34
dmesg(8): Add -t and -f options for converting timestamps
Kernel timestamps are relative to kern.boottime.
With -t, kern.boottime is added and converted to either
a default format or the one specified using the -f option.

Signed-off-by:  Andre Albsmeier <mail@ghub.e4m.org>
Reviewed by:    kib, pouria
Discussed with: imp
Pull-Request:   https://github.com/freebsd/freebsd-src/pull/1985
a7233085558db6d2ee0251891a85a7e74dddcb7e Andre Albsmeier 2026-01-23 11:10:18
devfs: add bpf example
Add an example for allowing members of the network group to read from
bpf devices. In particular, this allows members of the network group
to monitor traffic without running with root privileges.

Reviewed by:            markj, glebius
Sponsored by:           Netflix, Inc.
Differential Revision:  https://reviews.freebsd.org/D56742
cf678e30ca015c93edc8a43aeff58cce3249c3af Michael Tuexen 2026-04-30 20:35:07
route(8): Add route get for multipath routes with -o flag
Get the next hops of the specified route.
route.8 manual will be updated when other actions for
this option are implemented.

Reviewed by: glebius
Differential Revision: https://reviews.freebsd.org/D56191
39b19ce77bc0f1b9a6a685fff22f52932dcb7cf3 Pouria Mousavizadeh Tehrani 2026-04-19 11:07:22
Commit group #9: ping: use CLOCK_REALTIME for ICMP Originate Timestamp
ping: use CLOCK_REALTIME for ICMP Originate Timestamp

RFC 792 defines the ICMP Originate Timestamp field as milliseconds
since midnight UTC.  However, ping(8) currently derives this value
from CLOCK_MONOTONIC, which represents time since an unspecified
starting point and is not related to UTC.

The issue was introduced by commit 1ad76f1b6047, which replaced
gettimeofday(2) with clock_gettime(CLOCK_MONOTONIC) for timekeeping
in ping(8).

Fix this by using CLOCK_REALTIME when generating the ICMP originate
timestamp.

Before:

$ ping -Mt -c1 127.0.0.1
ICMP_TSTAMP
PING 127.0.0.1 (127.0.0.1): 56 data bytes
<...> time=0.061 ms tso=16:50:31 tsr=17:38:28 tst=17:38:28

(note the tso is off)

After:

$ ping -Mt -c1 127.0.0.1
ICMP_TSTAMP
PING 127.0.0.1 (127.0.0.1): 56 data bytes
<...> time=0.038 ms tso=17:42:09 tsr=17:42:09 tst=17:42:09

Reviewed by:            asomers, glebius
Fixes:                  https://cgit.freebsd.org/src/commit/?id=1ad76f1b6047
MFC after:              1 month
Differential Revision:  https://reviews.freebsd.org/D56759
069681afd58a711eb7407be4a9c9a05f787d250f Maxim Konovalov 2026-05-01 17:45:27

tests/ping: Fix date(1) invocations

Fixes:  https://cgit.freebsd.org/src/commit/?id=069681afd58a ("ping: use CLOCK_REALTIME for ICMP Originate Timestamp")
667dd9eafa4d5352efdfcdc1a9e228c23fbc60f5 Mark Johnston 2026-05-03 19:05:55

Libraries

libgcc_s: Add a linker script to link to libgcc
When using outline atomics on arm64 the compiler will create a call to
a function that performs the atomic operation. This allows us to use
the fastest operation depending on the hardware.

As these functions are implemented in libgcc create a linker script
so libraries that link against libgcc_s will include libgcc to pull
them in.

Reviewed by:    imp, jhb
Sponsored by:   Arm Ltd
Differential Revision:  https://reviews.freebsd.org/D45268
e63eee84cad59f63338a539e73bed07917932088 Andrew Turner 2026-04-27 10:54:18
hwpmc_ibs: Add external error handling
Add EXTERR_CAT_HWPMC_IBS to the external error categories and replace generic
EINVAL returns in ibs_allocate_pmc() with EXTERROR() calls that provide
detailed error messages.

This will be augmented with additional cases in the near future.

Reviewed by:    mhorne
Sponsored by:   AMD
Signed-off-by:  Andre Silva <andasilv@amd.com>
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2134
a9a562a08e77ac024066a6ca7ab77e7e25e007dc Andre Silva 2026-04-06 20:55:43
libiscsiutil: preserve errno across warning logs
Various calls in the implementation can clobber errno; preserve it for
the caller since none of these will bubble up pass/fail to simplify
some future error handling in ctld.

Reviewed by:    jhb
Differential Revision:  https://reviews.freebsd.org/D56539
fe9d81d7c6602e9b18cde2aaf8cbd5f65b87c091 Kyle Evans 2026-04-28 20:51:50
efivar: Move dump functions into libefivar
To allow their use by efibootmgr.

Signed-off-by:  stephane.rochoy@stormshield.eu
Reviewed by:    imp
Sponsored by:   Stormshield
Pull-Request:   https://github.com/freebsd/freebsd-src/pull/2167
48363f39f1417df3e39da53f219596f8501c9452 Stéphane Rochoy 2026-04-24 12:10:19
libifconfig: Skip bridge VLAN config for span members
bridge(4) doesn't support BRDGGIFVLANSET for span members, which
means if a span interface is configured, libifconfig will fail to
fetch bridge members.  Skip this for IFBIF_SPAN members.

PR:     https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292634
MFC after:      3 days
Reported by:    Emrion <kmachine@free.fr>
Reviewed by:    pouria, zlei
Sponsored by:   https://www.patreon.com/bsdivy
Differential Revision:  https://reviews.freebsd.org/D56694
454322c08b8aa181939c8d920472f03cfd591032 Lexi Winter 2026-04-29 03:11:20
libnv: switch fd_wait() from select(2) to poll(2)
The previous implementation used FD_SET() on a stack-allocated fd_set,
which is an out-of-bounds write whenever the socket fd is >= FD_SETSIZE
(1024).

Approved by:    so
Security:       FreeBSD-SA-26:16.libnv
Security:       CVE-2026-39457
Reported by:    Joshua Rogers of AISLE Research Team (https://aisle.com/)
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D56689
f5ea3dce2cbe1ee2068c5e5c11bb066f5789685b Mariusz Zaborski 2026-04-28 14:35:10
ssp: fix our gets_s implementation under _FORTIFY_SOURCE
Annex K specifies an interface for handling constraint violations from
gets_s, but we previously broke this for some classes of get_s misuse.

Provide a more nuanced version that tries to dodge errors that would
trigger a constraint handler while still providing value.  Notably, we
don't want to trigger a failure unless the passed-in length reasonably
fits within an RSIZE_MAX, because gets_s will immediately call larger
lengths bogus and fail.

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294881
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D56734
d98f4f0698ef0c5178882c544b4c38542d4780f0 Kyle Evans 2026-05-01 02:57:51
tests: fix remaining test failures under _FORTIFY_SOURCE
The getgroups test is a NetBSD tests, so just apply our larger hammer
and disable the feature entirely.  The audit test can take a more
surgical approach and use __ssp_real() appropriately, since it's a local
one.

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294881
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D56735
910f78a5143af32dfcb237a463397aa0c31c07df Kyle Evans 2026-05-01 02:57:51
lib/clang: Fix bootstrapping on macOS after LLVM 21 merge
Fixes:                https://cgit.freebsd.org/src/commit/?id=770cf0a5f02d ("Fixups after llvm-project main llvmorg-21-init-19288-gface93e724f4 merge")
MFC after:      1 month
50bd6ee0cce9d3959828b0267b06ea0403781f41 Jessica Clarke 2026-05-01 16:55:28
lib/msun: fmaximum_mag_num family. Tests and man page
Added the fmaximum_mag_num{,f,l} and fminimum_mag_num{,f,l} functions.

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294719
Reviewed by:    fuz, kargl
MFC after:      1 month
f62d826a6f5b9022b0cedfe22a698998ad9cb7f4 Jesús Blázquez 2026-04-21 17:17:00
lib/msun: Replaced pattern to force exception in _num families
Replaced the old pattern of using a ternary to force addition
(raising exceptions for sNaN's) with a new one using a volatile
variable. The _mag_num family was already implemented with this pattern

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294719
Reviewed by:    fuz, kargl
MFC after:      1 month
7c20e15592a07ea457cacb0d6706948815c8420e Jesús Blázquez 2026-04-27 16:43:41
libc: add freadlink(3)
Sponsored by: The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D56365
ae6a13deb8e33a52188643e09171207e1d7171e8 Konstantin Belousov 2026-04-12 08:56:26
Add O_SYMLINK emulation
for MacOSX partial compatibility, defined as O_PATH | O_SYNC | O_DIRECT.

libc openat() wrapper is modified to fstat() the descriptor and re-open
in the normal mode if the type is not symlink.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D56365
f9458655e78f6532e962a13d28d6a6086b4156de Konstantin Belousov 2026-04-12 08:48:32

Filesystems

nfscl: Disable use of callbacks for NFSv4.0
The only use for callbacks for NFSv4.0 is delegations
and delegations rarely work well for NFSv4.0 anyhow.

Therefore, this patch disables callbacks for the
NFSv4.0 client.  This is the same behavior as
occurred when the nfscbd(8) daemon was not running.

This change allowed a function called nfscl_getmyip()
to be removed from the kernel, which is nice since
maintaining this function was bothersome, due to its
use of routing, etc.

MFC after:      2 weeks
71ac1ec5c9d990e7881e75f04140eb0bfe473a21 Rick Macklem 2026-04-30 21:37:36
nfsd: Get rid of NFSD_VNET macros
When the nfsd was vnet'd, the VNET macros were hidden
behind macros that had the NFSD_ prefix on them.
This was done because, at the time, it was thought
that something other than vnet might be used for this.
That has not happened and probably will not happen,
so this patch replaces these obscuring macros with
the regular vnet ones.

There should be no semantics change caused by
this commit.

Discussed with: bz, glebius
MFC after:      1 month
821976facf746ef241e1524b44bb1de0af98fdc0 Rick Macklem 2026-05-02 21:36:43
fdescfs: do not change vnode type on VOP_GETATTR()
There is no point to do it.  The VNON type is good enough for fdescfs
operations, and changing the type on stat(2) is arbitrary and does not
serve much purpose, because we recalculate the returned file type on
each stat(2) anyway.

But setting the type to VLNK has undesired consequence of namei()
trying VOP_READLINK() there, which might fail since it defer the
calculation of path to vn_fullpath().

Submitted by:   Mike <mmpestorich@gmail.com>
PR:     https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294768
MFC after:      2 weeks
fbecfc4aa028964f972a0457809aa041d415f61b Konstantin Belousov 2026-05-03 19:09:15
nfsd: Disable use of callbacks for NFSv4.0
Commit 71ac1ec5c9d9 disabled callbacks for the NFS
client for NFSv4.0.  This patch does the same for
the NFSv4.0 server.

The only use for callbacks for NFSv4.0 is delegations
and delegations rarely work well for NFSv4.0 anyhow.

Therefore, this patch disables callbacks for the
NFSv4.0 server.  This is the same behavior as
occurs when vfs.nfsd.issue_delegations is 0.

This change allowed the functions called
nfsrv_getclientipaddr() and nfsrv_getipnumber() to be
removed from the kernel.

MFC after:      2 weeks
457c621add0a531273ee27798c924c6aaeacc4c1 Rick Macklem 2026-05-03 23:25:45

Kernel

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

kern/init_main.c: path is for the binary, not process
Reviewed by:  imp, jilles
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D56536
a268af3447ebaa9712174ba2d226ffdc66f68e98 Konstantin Belousov 2026-04-26 10:15:18
linux: Ignore sigaction(2) flags SA_UNSUPPORTED and SA_EXPOSE_TAGBITS
SA_UNSUPPORTED was introduced in Linux 5.11 to probe support
for other flags such as SA_EXPOSE_TAGBITS, introduced
at the same time. Ignore both.

Signed-off-by:  Ricardo Branco <rbranco@suse.de>
PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=289285
Reviewed by:    pouria, kib
Pull-Request:   https://github.com/freebsd/freebsd-src/pull/2163
fdea83a5f63b881ade91c6cc9dfbf173137512c5 Ricardo Branco 2026-04-26 09:44:53
execve: Fix an operator precedence bug
The buggy version allowed userspace to overflow the copy into adjacent
execve KVA regions, which enables, among other things, injecting
environment variables into privileged processes.

Approved by:    so
Security:       FreeBSD-SA-26:13.exec
Security:       CVE-2026-7270
Reported by:    Ryan Austin of Calif.io
Reviewed by:    brooks, kib
Fixes:          https://cgit.freebsd.org/src/commit/?id=f373437a01a3 ("Add helper functions to copy strings into struct image_args.")
Differential Revision:  https://reviews.freebsd.org/D56665
8e8ddb05d07142e95cf84e32bf93b9ecb3f90283 Mark Johnston 2026-04-22 17:58:35
tcp: release nic ktls send tags when entering time wait
When under heavy load or churn, inline ktls offload NICs may run out
of hardware resources described by ktls send tags.  Rather than
waiting for connections to pass through the time_wait state, reclaim
the ktls send tags early, at entry to time_wait. By preventing
potentially tens or hundreds of thousands of sessions from holding
send tags in time_wait, this allows more ktls sessions to be offloaded
to hardware.

Reviewed by: glebius, kib, nickbanks_netflix.com, rrs, tuexen
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D56610
72e2ae505c4a081d4b4759f51e25bf6e17c99442 Andrew Gallatin 2026-04-29 23:26:05
dtrace: Add missing file for powerpc kernel build
787b5e136735e979398bca2057310d0fd594a3bc Justin Hibbits 2026-04-28 00:14:12
Commit group #10: preload: add "show preload" DDB command
preload: add "show preload" DDB command

This is the DDB equivalent of the debug.dump_modinfo sysctl which
outputs pretty-printed bootloader metadata.

Move sbuf_db_printf_drain to subr_prf.c and expose it for general use.

Reviewed By: jmg
Differential Revision: https://reviews.freebsd.org/D53763
b683fd0b3206b35214f7f87805246e5c74552942 Stephen J. Kiernan 2026-04-30 05:19:09

ddb.4: add 'show preload' entry

For the recently added command.

Fixes:  https://cgit.freebsd.org/src/commit/?id=b683fd0b3206 ("preload: add "show preload" DDB command")
16dd592982887fb3bc27460c50215cd54157ac5f Mitchell Horne 2026-04-30 13:22:21
Commit group #11: linuxkpi
linuxkpi: Add `struct xa_limit` support to xarray

The `xa_alloc*()` functions family takes a `struct xa_limit` to describe
the range of IDs the caller wants to allocate. We were using a single
mask to qualify a maximum ID only.

This commit changes that to use the same `struct xa_limit`. The logic
did not change, except it now supports a minimum ID as well.

The definition of `XA_LIMIT()` macro is adapted, as well as the
definitions of `xa_limit_*` (only `xa_limit_32b` existed, the other two
are added with this commit).

The DRM generic code started to use this `struct xa_limit` in Linux
6.12.

Reviewed by:    bz
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56445
783d018cf954f99032a0a4f655af8916024598a8 Jean-Sébastien Pédron 2026-04-13 21:39:22

linuxkpi: Define `DEFINE_XARRAY*()` macros

The `DEFINE_XARRAY*()` macros are used to declare a static xarray.

As the structure embeds a mutex(9), we also need to declare the static
mutex after the `struct xarray`. Thus the slightly awkward definition
of `DEFINE_XARRAY_FLAGS()`.

The DRM generic code started to use `DEFINE_XARRAY_ALLOC()` in Linux
6.12.

Reviewed by:    bz
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56446
796fff59a5d32bc3be14feaeb228fc15ef43eb32 Jean-Sébastien Pédron 2026-04-13 21:44:16

linuxkpi: Add `copy_from_user_inatomic_nontemporal()` function

In Linux 7.1, `__copy_from_user_inatomic_nocache()` was renamed to
`copy_from_user_inatomic_nontemporal()`. This change was backported to
several LTS branches.

This includes Linux 6.12.x and the i915 DRM driver started to use it in
that version.

Reviewed by:    bz
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56719
713b4ce8ef46d7df4ffe50ab6733bb128dbe3cbd Jean-Sébastien Pédron 2026-04-29 22:14:59
linuxkpi: Define `VFM_*()` macros in <asm/cpu_device_id.h>
They use another set of constants and macros in <asm/intel-family.h>.

All these macros are defined regardless of the architecture, even though
they are specific to x86. Perhaps we should restrict them using #ifdefs.

The amdgpu DRM driver started to used `VFM_MODEL()` and the
`INTEL_*LAKE*` constants in Linux 6.12.x.

Reviewed by:    bz, olce
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56585
65dc0e9071a5ea206d6fbf070c974ebcfdea3680 Jean-Sébastien Pédron 2026-04-22 16:23:16
sx: Add `sx_has_waiters()` macro
This macro will return non-zero if there are threads waiting for this
lock; otherwise, it will return zero.

The function assumes (but does not assert) that the caller already holds
the lock and that it is interested in other threads waiting for it to
release the lock.

The motivation to add this is the implementation of
`rwsem_is_contended()` in linuxkpi.

This Linux function indicates the same thing to the caller: if other
threads are waiting for this semaphore.

The amdgpu DRM driver started to use `rwsem_is_contended()` in Linux
6.12.

Reviewed by:    bz, olce
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56443
eebb643bb3799ae90dd248f0b5047ec481b26f68 Jean-Sébastien Pédron 2026-04-12 17:20:25
Bump __FreeBSD_version to 1600018 after linuxkpi changes for DRM 6.12.84
As of this commit, all changes to linuxkpi required by the DRM drivers
from Linux 6.12.84 were committed.

Sponsored by:   The FreeBSD Foundation
1569e2334ab5b2ee1e2b7893cb05c17a27d3eca8 Jean-Sébastien Pédron 2026-04-30 17:54:30
uipc_shm.c: make large page allocation interruptible
in cases there is no page pressure or when the user lost patience
waiting for very large allocation.  Other case is already handled by
vm_wait_intr().

Reported by:    "Lizzie from Eden Emulator project"
Reviewed by:    adrian, markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D56725
839d3266d8c6f6471cb92a3c0ae32eb16d117427 Konstantin Belousov 2026-04-28 02:34:49
linux: Implement setfsuid(2) and setfsgid(2) as no-ops
These system calls exist to decouple the Linux filesystem credentials
from the effective credentials, avoiding signal exposure during
privilege transitions.
The signal permission model that motivated this was revised
in Linux 2.0, making these syscalls obsolete for new applications.

Implement both syscalls as no-ops that return the current effective
UID/GID as the previous filesystem UID/GID.
Linux returns the previous filesystem UID/GID for these syscalls
with no error indication.

Same for the equivalent setfsuid16() & setfsgid16() system calls.

Signed-off-by:  Ricardo Branco <rbranco@suse.de>
PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294879
Reviewed by:    kib, pouria
Pull-Request:   https://github.com/freebsd/freebsd-src/pull/2175
f4ae41b7ea5efb8381a5df234b3f5e1f7569f9b0 Ricardo Branco 2026-04-29 18:27:22
namei: Preserve ABI root for absolute symlinks before fallback
D40479 changed namei() so that an absolute symlink target
encountered during an ABI-root lookup restarts from the native root.
This helps the native fallback case, but it also makes successful
lookups inside an ABI root escape that root while following absolute
symlinks.

Only switch absolute symlink lookup to the native root after namei()
is already in the restarted/native fallback pass.
Do not mark the lookup as restarted merely because an absolute
symlink was encountered while still resolving inside the ABI root.

This preserves the intended native fallback behavior while keeping
absolute symlinks within a successfully resolved ABI-root path in
the ABI namespace.

Signed-off-by:  Ricardo Branco <rbranco@suse.de>
PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=289739
Reviewed by:    kib
Fixes:          https://cgit.freebsd.org/src/commit/?id=cea7c564c70a ("namei: Reset the lookup to ...")
Pull-Request:   https://github.com/freebsd/freebsd-src/pull/2166
459ac3044b516af698d7342431bdbcf784fdf7a4 Ricardo Branco 2026-04-26 16:44:39
ctl_ioctl_frontend: Reject out-of-range initiator IDs
Various places in CTL assume that initiator IDs are not larger than
CTL_MAX_INIT_PER_PORT.  Other IDs such as lun IDs are validated in
places such as ctl_scsiio_precheck, but initiator IDs submitted by
userland were not previously validated.

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=291059
Reported by:    Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org>
Reviewed by:    asomers
Sponsored by:   Chelsio Communications
Differential Revision:  https://reviews.freebsd.org/D56628
6f8312bdff236ad64d1c15c239051359d8245a68 John Baldwin 2026-05-02 16:43:29
nfscl: Fix handling of gssd upcalls for the NFS client
Without this patch, all upcalls to the gssd daemon are
done in vnet0 (outside of any vnet jail).  This does
not work well, because a user principal's credential
cache can be within the jail (/tmp/krb5cc_NNN in the
jail's namespace).

This patch modifies the client so that RPCs done
from within vnet jails does an upcall to a gssd
daemon running within the vnet jail.  It required
that the cache of uid->credential shorthands in
the rpcsec_gss be vnet'd.

The situation is still less than ideal and sec=krb5[ip]
mounts that are visible within vnet jails is still
not something I would recommend, but it can work ok
with this patch.

Vnet'ng the NFS client so that mounts can be done
within vnet jails is probably more useful, but that
will require additional work.

Discussed with: glebius
MFC after:      1 month
a6e527f893df2cbbd941839a93e50ae39ac0db55 Rick Macklem 2026-05-02 19:36:00
Add O_SYMLINK emulation
for MacOSX partial compatibility, defined as O_PATH | O_NOFOLLOW.
fstat(2) and freadlink(3) works on the resulting file descriptors,
but reads on the regular file do not.

More complete but more hackish version was developed but deemed too
hackish.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D56365
2213820b6f4cd22bbfdc0f45741c3e7d17ae82c0 Konstantin Belousov 2026-04-20 20:02:13
bufspace_wait(): only try to help bufdaemon if there is a chance to help
Only call buf_flush() if there are some dirty buffers belonging to the
vnode we are allocating the buffer for.  Otherwise the bd dirty queue
scan cannot find anything and it makes no sense to spend CPU doing it.
067cfac2e7bd9dc857fb6cc504c01b0249bcd1b7 Konstantin Belousov 2026-04-22 05:09:34
sys/rangelock.h: explicitly enumerate padding at the end of the structure
Sponsored by: The FreeBSD Foundation
MFC after:      1 week
Differential revision:
a770638ecf16515d8922111c3fdd417aba6c045e Konstantin Belousov 2026-04-26 02:22:52
struct vnode: assign v_rl.resv1 as v_vrflag
Sponsored by: The FreeBSD Foundation
MFC after:      1 week
Differential revision:
d990e8f0e9478194569ba28c366b0c0c0f414e7b Konstantin Belousov 2026-04-26 02:31:50
vfs: convert vfs_op_thread_* macros to static inlines
Sponsored by: The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D56611
a61a696e78a967b149a6e39b1f98ada26217a6bb Konstantin Belousov 2026-04-24 01:26:11
vnode: add VIRF_KNOTE flag
to indicate non-empty vnode knote list.  Use it instead of
VN_KNLIST_EMPTY() and guard note activations with it.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D56611
7fe74a02764e5899b10cdc45ab34182b961d5d19 Konstantin Belousov 2026-04-24 01:31:27
vfs: convert VFS_OPs from macros to static inlines
Sponsored by: The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D56611
48bf024f2ef5afeba3500bd92a04283370479edf Konstantin Belousov 2026-04-24 01:31:27
krpc: Get rid of KRPC_VNET macros
When the krpc was vnet'd, the VNET macros were hidden
behind macros that had the KRPC_ prefix on them.
This was done because, at the time, it was thought
that something other than vnet might be used for this.
That has not happened and probably will not happen,
so this patch replaces these obscuring macros with
the regular vnet ones.

There should be no semantics change caused by
this commit.

Discussed with: bz, glebius
MFC after:      1 month
d8d9e1cf5e055433565a7e686bc096a8494d2bb8 Rick Macklem 2026-05-03 21:25:06
unix: Make sure we signal EOF on the write side when disconnecting
Add a regression test.

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294014
Reported by:    diizzy
Reviewed by:    glebius
MFC after:      1 week
Fixes:          https://cgit.freebsd.org/src/commit/?id=d15792780760 ("unix: new implementation of unix/stream & unix/seqpacket")
Differential Revision:  https://reviews.freebsd.org/D56764
476805133f5736c2c8638e41d2b5d8dd2c597f3a Mark Johnston 2026-05-03 15:46:22

Build system

init: build dynamically
This makes it easier to downgrade kernel when it stops providing some
syscall required by libc.  In this case, it is enough to downgrade libc
as well, our crt1 delegates all non-trivial work to
libc::__libc_start1().  With static init, the /sbin/init should be
downgraded as well, which might be not easy.

This does not mean that we support forward compatibility.

Reviewed by:    imp, jilles, zlei
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D56536
24d887436dcd5b6c18a7505e477c79cae3002c3a Konstantin Belousov 2026-04-20 17:52:59
packages: Don't build quotacheck if WITHOUT_QUOTAS=yes
PR:   https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294775
Fixes:  https://cgit.freebsd.org/src/commit/?id=bb75b0d581f7 ("packages: Convert world to a subdir build")
MFC after:      2 weeks
Reported by:    Alastair Hogge <agh@riseup.net>
Sponsored by:   https://www.patreon.com/bsdivy
Differential Revision:  https://reviews.freebsd.org/D56635
221b1d4156a2bfe71a473e5abf6a739c063e60d8 Lexi Winter 2026-04-27 05:45:48
makeman.lua: Downgrade `make showconfig` error to warning
The sh-based makeman silently ignored errors from `make showconfig`.
Ignore errors also from makeman.lua (but emit a warning).

We may want to revisit this in the future, but want makeman.lua to
behave identically for now.

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294822
Reviewed by:    kevans
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56663
ea27ec183d0ff26e1273202841a02041b6d93955 Ed Maste 2026-04-26 19:30:17
pkg-stage: Improve symlink creation
Invoke ln with -n and -f.  In normal use it doesn't matter, but during
development this might be run in a partially populated leftover tree.

Reviewed by:    ivy
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D52883
4846afc9104a1b4aeec31dc7c324f69ad5ffab1b Ed Maste 2025-05-05 18:01:21
make-pkg-package: Add set -e; abort if a cmd fails
This makes it less likely we will silently generate broken artifacts.

Reviewed by:    ivy
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56671
0068c706f8ce872c735ddcc383c5cd5ab85acc88 Ed Maste 2025-10-04 20:14:43
Makefile.inc1: Use ln -n instead of ln -h
We support both -h and -n, but GNU coreutils only supports -n,
so use that instead.  This fixes the package build on Linux.

MFC after:      2 weeks
Reviewed by:    (wosch, imp) (previous version), emaste
Better fix than the original patch suggested by: jrtc27
Sponsored by:   https://www.patreon.com/bsdivy
Differential Revision:  https://reviews.freebsd.org/D56656
d455c4bb69eca975854262207687db50a5edc434 Lexi Winter 2026-04-27 21:26:45
Makefile.inc1: Always use ${PKG_CMD}
Previously we had a mix of ${PKG_CMD} and bare 'pkg', which is
wrong, and breaks the build when 'pkg' isn't in the tools path,
e.g. when cross-building.

MFC after:      2 weeks
Reviewed by:    wosch, emaste
Sponsored by:   https://www.patreon.com/bsdivy
Differential Revision:  https://reviews.freebsd.org/D56655
b866d05ea2860f9ccc27c75ff0501372896b5bf2 Lexi Winter 2026-04-27 21:29:43
libzpool: Set -Wno-error=typedef-redefinition for clang
In some versions of LLVM (at least 21), the <*intrin.h> headers contain
unguarded duplicate typedefs; this isn't permitted prior to C11, and
libzpool is built as C99.  FreeBSD's LLVM backported LLVM PR #153820
to fix this, but other versions of LLVM (e.g., upstream, or on Linux)
don't have the patch, so this breaks the build.

Add -Wno-error=typedef-redefinition to downgrade this from an error
to a warning.

MFC after:      2 weeks
Reviewed by:    dim, emaste
Sponsored by:   https://www.patreon.com/bsdivy
Differential Revision:  https://reviews.freebsd.org/D56653
036ff38ebd5a52f26fc2f20238a492a9d0c5f2e6 Lexi Winter 2026-04-27 21:31:47
packages: Fix clang conditional
Various src.conf options can cause us to build something that ends up
in the clang package, but MK_TOOLCHAIN is not one of them; copy the
proper conditional from lib/Makefile to decide if we need to build
the package.

This fixes the build when LLVM/clang is entirely disabled.

Fixes:  https://cgit.freebsd.org/src/commit/?id=bb75b0d581f7 ("packages: Convert world to a subdir build")
MFC after:      2 weeks
Reviewed by:    emaste
Sponsored by:   https://www.patreon.com/bsdivy
Differential Revision:  https://reviews.freebsd.org/D56657
e6d112bbbbf0b09f0f18a85a0a3c6d5a49aff653 Lexi Winter 2026-04-27 22:15:13
groups.7: New manual page of standard group names
Import groups(7) from NetBSD, with tweaks for our system. The group
list is sorted by GID. All the group names from /usr/src/etc/group
are described, except "uucp". The FILES section was added on top of
the original manual page.

PR:                     https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=264966
Relnotes:               yes
MFC after:              3 days
Obtained from:          NetBSD
Reviewed by:            des, ziaee
Differential Revision:  https://reviews.freebsd.org/D54114
e09104dfb76a36b65a64bd315bd1520941c4beed Artem Bunichev 2026-04-28 13:48:52
acpi: Remove userland bits on non-ACPI platforms
ACPI is only supported on amd64, arm64 and i386.  Don't install the
power_profile rc script or devd configuration on other platforms.

This avoids creating a useless FreeBSD-acpi package on those platforms.

MFC after:      2 weeks
Reviewed by:    imp
Sponsored by:   https://www.patreon.com/bsdivy
Differential Revision:  https://reviews.freebsd.org/D56650
c4b244af42a1f20937939a824b753a92c9c0a46f Lexi Winter 2026-04-28 19:37:33
llvm: Move libprivatelldb to the lldb package
Set PACKAGE=lldb in lldb.pre.mk rather than in individual Makefiles;
change lib/clang/Makefile.inc from PACKAGE=clang to PACKAGE?=clang to
avoid overwriting it.

This is safe to MFC to stable/15 since the moved library will be
picked up automatically by pkg.

MFC after:      2 weeks
Reviewed by:    emaste
Sponsored by:   https://www.patreon.com/bsdivy
Differential Revision:  https://reviews.freebsd.org/D56674
7970815be40b1fa604a6554f5ee0f95f834454b5 Lexi Winter 2026-04-28 19:38:36
packages: Make create-sets.sh more robust
Use ${PKG_CMD} rather than bare 'pkg' to fix the build when pkg is
not in the tools path.  Provide a default in case it's not set for
some reason (e.g., running the script by hand).

Since set -- $(...) does not trigger an exit from set -e if the
command fails, this failure was silent and resulted in sets not
being built correctly if we failed to run pkg.  Use a temporary
variable, which does trigger set -e, to fail correctly.

MFC after:      2 weeks
Reviewed by:    sjg
Sponsored by:   https://www.patreon.com/bsdivy
Differential Revision:  https://reviews.freebsd.org/D56676
d1c176fedfc99d61c1dc8037ab549bec48c17bea Lexi Winter 2026-04-28 19:39:14
Makefile.inc1: Only copy locales to INSTALLTMP on FreeBSD
Makefile.inc1 copies locales to ${INSTALLTMP} to avoid issues when
running make installworld on a live system.  However, this can break
on non-FreeBSD systems, e.g. on openSUSE where /usr/share/locales
has mode 0555, which means after we copy it, we can't delete it,
so the build fails.

Since this functionality is only useful when installing over a
live system, disable it when the build host is not FreeBSD.

MFC after:      2 weeks
Reviewed by:    kevans, emaste
Sponsored by:   https://www.patreon.com/bsdivy
Differential Revision:  https://reviews.freebsd.org/D56677
4429630d1ca9d90c886bae1eaa0d8ee32d0fee12 Lexi Winter 2026-04-28 19:42:39
bc: Fix tests
Stop generating test scripts at build time.  The dc test script is
broken and simply fixing the code that generates it won't help as there
is no reliable way to ensure it gets regenerated if it already exists in
the object tree.

MFC after:      1 week
Reviewed by:    se
Differential Revision:  https://reviews.freebsd.org/D56511
67a63eae7b2d10d29983c9698894f1bfff4ffc6e Dag-Erling Smørgrav 2026-04-29 15:14:13
Commit group #12: llvm-*: Move all LLVM_BINUTILS symlinks to toolchain package
llvm-*: Move all LLVM_BINUTILS symlinks to toolchain package

Some of the LLVM binary utilities were included in the Clang package
(because they did not set an explicit PACKAGE).

Add a new Makefile under clang/toolchain to create the symlinks and man
links for ar, c++filt, nm, and so on (without the llvm-* prefix) when
LLVM_BINUTILS is enabled (as it is by default).

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=293610
Reviewed by:    bapt, ivy, brooks
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55692
c4f08d46c7f717cc8c66bf702c006765a5b6b1a9 Ed Maste 2026-03-06 14:46:18

toolchain: Correct LLVM_BINUTILS pkg pkg dependency

The LLVM binutils are in the clang package.

Reported by: jlduran
Fixes: https://cgit.freebsd.org/src/commit/?id=c4f08d46c7f7 ("llvm-*: Move all LLVM_BINUTILS symlinks to toolchain package")
9b0d9401e6a46456a84500375c36008cfcfcc508 Ed Maste 2026-05-02 02:30:15
libzpool: force inlining of xxhash after removing xxhash.c
libzpool had a number of undefined symbols related to xxhash after
xxhash.c was removed from the build.

Fixes:  https://cgit.freebsd.org/src/commit/?id=8a62a2a5659d ("zfs: merge openzfs/zfs@https://cgit.freebsd.org/src/commit/?id=f8e5af53e")
Reviewed by:    jhb
Differential Revision:  https://reviews.freebsd.org/D56770
050b3ff753e04ce142ac751a0d76b5ee3beda9c5 Ryan Libby 2026-05-02 16:59:06
Commit group #13: bsd.endian.mk: Optimize the handling of big/little endian determination.
bsd.endian.mk: Optimize the handling of big/little endian determination.

Add variables to contain lists of MACHINE_ARCH values to use
to determine little or big endian.

Only error out about not being able to determine endianess if
TARGET_ENDIANNESS is empty and not cross-compiling.

Reviewed by:    sjg
Obtained from:  Hewlett Packard Enterprise Development LP
Differential Revision:  https://reviews.freebsd.org/D44629
01674e15dedb15f8ce498af0680c50bb075c5482 Stephen J. Kiernan 2024-04-03 23:25:19

bsd.endian.mk: Avoid use of M_ListToSkip

While the src build works fine with M_ListToSkip, it can break the
ports build. For now, it is safer just to do the actual variable
modifiers in place.

Reported by:    se
Fixes:          https://cgit.freebsd.org/src/commit/?id=01674e15dedb ("bsd.endian.mk: Optimize the handling...")
b89155be25a7f501980a165e225b28abd886c1e5 Stephen J. Kiernan 2026-05-03 19:35:22
tests/timerfd: Serialize
At least one of these tests changes the system clock, which potentially
interferes with concurrently running tests and causes them to fail.

MFC after:      1 week
001cfc7b8aa38122c4e0fe8ae48fae3556a1f2b6 Mark Johnston 2026-05-03 15:46:52

Internal organizational stuff

git-arc: Add a create-draft mode
Make it possible to create a review without publishing it.  This should
be useful when one wants to restrict the visibility of a review, as that
cannot be done via the command line.  Note that a draft review is still
publicly visible if one can guess the URL, but creating one does not
result in email notifications to subscribers etc., nor does a draft
appear in the creating user's activity log.

Once a draft is ready, one can publish it via the web UI.

Reviewed by:    jrm
Differential Revision:  https://reviews.freebsd.org/D56664
448ec129bcef6bf147b76956ec588e357a21d310 Mark Johnston 2026-04-28 14:02:58

Testing

tests/net/if_clone_test: Add a test for races between if_detach() and if_vmove_reclaim()
Ideally we shall have tests for all possible races. It is races between
if_detach(), if_vmove_loan(), if_vmove_reclaim() and vnet_if_return().
Well that requires too many tests and it appears to be less valuable to
have them all. So focus on potential in future regressions related to
recent fixes [1] and [2] only.

[1] ee9456ce3753 ifnet: Fix races in if_vmove_reclaim()
[2] ba7f47d47dc1 ifnet: if_detach(): Fix races with vmove operations

MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D56606
f4be16983dea4904f85ac20e921ad2a8c18a0f79 Zhenlei Huang 2026-04-27 19:17:21
tests/netgraph: Add a test for races between if_detach() and vnet_if_return()
A ng_eiface(4) or physical interface does not involve the cloner hence
the detaching is a bit different with epair(4). Add more tests to cover
that.

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292993
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D56609
0988abd52352ae0977cd3e5c10316b7d94e1cac8 Zhenlei Huang 2026-04-27 19:17:22
tests: Temporarily skip two testcases
The changes [1] and [2] made to CURRENT introduce races between ifnet
detach and vmove operations. That requires extra effort to fix. They
are not MFCed to stable branches so the latter are not affected.
Temporarily skip two affected tests on CURRENT right now.

[1] 0bf42a0a05b9 bpf: virtualize bpf_iflist
[2] a4d766caf711 bpf: add a crutch to support if_vmove

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292993
Discussed with: kp
afa4648b6a30603faab56b649605a3393eac9986 Zhenlei Huang 2026-04-27 19:17:22
sys.net.if_wg.wg_key_peerdev_makeshared: Add require metadata
Add require.user root and require.kmods if_wg to
wg_key_peerdev_makeshared_head(), consistent with the other wg tests.

Without if_wg.ko causes ifconfig wg create to fail with EINVAL.  The
test also needs root to create jails.

Sponsored by:   The FreeBSD Foundation
41c5a4a2f888765b513efb13befe32fa084ad7cb Li-Wen Hsu 2026-04-28 17:06:25
tests/sys/arch/amd64: add a program to check INT $0x80 behavior on amd64
Requested and reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D56654
2c2ec6bbc9cc7762a250ffe903bda6c2e44d25ff Konstantin Belousov 2026-04-27 04:23:36
tests/netlink: Add nexthop group tests for multipath
Added tests:
* Test for creating multiple routes.
* Test for merge multiple nexthops into a single nexthop group.
* Test for nexthop expirations from a nexthop group.

Reviewed by: glebius
Differential Revision: https://reviews.freebsd.org/D56190
23b8d16c6641362833a8decdcb98b643006c3f5c Pouria Mousavizadeh Tehrani 2026-04-19 11:04:01
ping: fix listing test cases when scapy is not installed
The ATF-python test program was attempting to list test cases that
require scapy.  But it attempted to import the scapy module before the
test cases had been listed, resulting in an ImportError that kyua
interpreted as a test program crash.

Fix this behavior by handling that ImportError well enough to list test
cases, but not run them.  If scapy isn't present, Kyua will refuse to
run the test cases.  But it needs to be able to list them in order to
know to skip them.

Sponsored by:           ConnectWise
MFC after:              2 weeks
Reviewed by:            maxim
Differential Revision:  https://reviews.freebsd.org/D56765
3e845b1090565912375c5578cf0399d27b7fa70c Alan Somers 2026-05-01 23:06:35
tests/carp: Rework unicast_v4
For unicast tests, it is sufficient to use wait_for_carp() to verify
the setup is sane. Additional sanity checks are not necessarily
required but can serve purpose for redundancy.

For some unclear reason routed(8) is advertising route to carp BACKUP.
That makes the test flaky. Also routed(8) is marked deprecated and may
be removed from base in the future. Let's just add static route entry
manually for additional sanity checks.

Other noticeable changes:
  1. Add atf_check to configuration steps to prevent potential failure
on setup. That helps diagnosing on failure.
  2. Shorten the names of jails to improve readability.
  3. Prefer `[ifconfig|route|sysctl] -j` over `jexec [ifconfig|route|sysctl]`
to make the lines shorter.

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294817
Reviewed by:    glebius (previous version), pouria, markj
Fixes:          https://cgit.freebsd.org/src/commit/?id=93fbdef51a13 tests: carp: Update test case unicast_v4 to catch PR https://cgit.freebsd.org/src/commit/?id=284872
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D56761
9137c66c2ea6cc09e3a6f8a042ecdc5a62e0f39e Zhenlei Huang 2026-05-03 11:02:15
lockf: Test that lockf does not spin on fd
PR:           https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294832
MFC after:      1 week
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D56723
0733afdb4dad58cfe7ad7f5994e26bf148d78199 Dag-Erling Smørgrav 2026-05-03 15:35:15
tests/if_lagg: Minor improvements
- Set require.kmods instead of relying on ifconfig to load if_lagg.ko,
  as this doesn't work when running within a jail.
- Simplify helper functions which create tap and lagg devices.

MFC after:      1 week
47ae0135d461854b72b905ac77bf3e1f5b2868bc Mark Johnston 2026-05-03 15:48:49

Style, typos, and comments

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

Commit group #14: fix typo
fix typo: remove duplicate 'the' in ffs_vfsops comment

Signed-off-by: Felipe Matarazzo <felipemps@protonmail.com>
Reviewed-by: ngie
Pull-Request: https://github.com/freebsd/freebsd-src/pull/2174
82525a8ead6b778f4eb0f7a6a2dbe327fa69fcfe Felipe Matarazzo 2026-04-29 16:14:29

fix typo: duplicate 'the' in OP_NOTROOT comment

Signed-off-by: Felipe Matarazzo <felipemps@protonmail.com>
Reviewed-by: ngie
Pull-Request: https://github.com/freebsd/freebsd-src/pull/2174
713332b4eb79be2ca6de36c47853eef099214913 Felipe Matarazzo 2026-04-29 16:14:32

fix typo: lenght -> length in netlink comment

Signed-off-by: Felipe Matarazzo <felipemps@protonmail.com>
Reviewed-by: ngie
Pull-Request: https://github.com/freebsd/freebsd-src/pull/2174
e1841a50d6a570517c2f3c9b94b9496cb5b60a9e Felipe Matarazzo 2026-04-29 16:14:35

fix typo: seperate -> separate in tcp_ratelimit comment

Signed-off-by: Felipe Matarazzo <felipemps@protonmail.com>
Reviewed-by: ngie
Pull-Request: https://github.com/freebsd/freebsd-src/pull/2174
0e235f77360c5c72dac28af105e6c9ed3cb66c09 Felipe Matarazzo 2026-04-29 16:14:37

fix typo: remove extra 'the' in rack.c comment

Signed-off-by: Felipe Matarazzo <felipemps@protonmail.com>
Reviewed-by: ngie
Pull-Request: https://github.com/freebsd/freebsd-src/pull/2174
a8cb5cb40005e698c7c4e21d1eb761822ad8c82c Felipe Matarazzo 2026-04-29 16:14:40

fix typo: writting -> writing in sack_filter

Signed-off-by: Felipe Matarazzo <felipemps@protonmail.com>
Reviewed-by: ngie
Pull-Request: https://github.com/freebsd/freebsd-src/pull/2174
092528b05d1fb0776fecb345ce99b1b68e8122b1 Felipe Matarazzo 2026-04-29 16:14:43
fix typos in rtsx.c comments: freqency and wich
Signed-off-by: Felipe Matarazzo <felipemps@protonmail.com>
Reviewed-by: ngie
Pull-Request: https://github.com/freebsd/freebsd-src/pull/2174
deb17abdeffef072a0c45eb92c798d1f7b3ce7c5 Felipe Matarazzo 2026-04-29 16:14:46
fix typo: recieved -> received in test comment
Signed-off-by: Felipe Matarazzo <felipemps@protonmail.com>
Reviewed-by: ngie
Pull-Request: https://github.com/freebsd/freebsd-src/pull/2174
0e680203d59aac1a0e77f0d297d3ccb9777be749 Felipe Matarazzo 2026-04-29 16:14:49
blocklistd: Fix RFC1918 typo
The address in the configuration file example was intended to be from
the 192.168.0.0/16 range of IPv4 private addresses (RFC1918).

Reported on mastodon.social at
https://mastodon.social/@asmodai/116316630762241486.

Fix submitted upstream by emaste@.  Fixing locally first.

Reviewed by:    emaste
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D56773
5a6d9479ae2271a97dd23ceee8ad284770302874 Jose Luis Duran 2026-05-03 05:31:51
sysctl: Fix typo in DDB help text example
96840278032f856669597129e9d16c818e40dc15 Justin Hibbits 2026-05-03 18:49:31

Contrib code

contrib/expat: import expat 2.8.0
Changes: https://github.com/libexpat/libexpat/blob/R_2_8_0/expat/Changes

Security:       CVE-2026-41080
MFC after:      1 week
e3935639d8d8b6556cad18e1c90e419a65f26b40 Philip Paeps 2026-04-27 10:38:10
contrib/openresolv: MFV openresolv 3.17.4
Reviewed by:  pfg
Approved by:    lwhsu (mentor)
Differential Revision:  https://reviews.freebsd.org/D56269
cb0e3a5fba5fe48607db8c1042bfe6a1164e0db7 Siva Mahadevan 2026-04-28 19:25:49
libnv: fix heap overflow in nvlist_recv()
nvlist_check_header() validated nvlh_size for overflow before
performing conversion. An mallicous user can set
NV_FLAG_BIG_ENDIAN in the header and craft nvlh_size so that
the orginall value passes the check, but after the conversion the
sizeof(nvlist_header) + size can overflow.
This can lead to a heap buffer overflow.

Approved by:    so
Security:       FreeBSD-SA-26:17.libnv
Security:       CVE-2026-35547
Fixes:          https://cgit.freebsd.org/src/commit/?id=36fa90dbde0060aacb5677d0b113ee168e839071
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D56342
e2219bbd634f673f774ddf118dfe19e531e08a45 Mariusz Zaborski 2026-04-28 14:36:09
zfs: merge openzfs/zfs@84ffe564d
Notable upstream pull request merges:
 #18387 656285140 Handle raidz errors <= nparity rather than ignoring
 #18401 1cebe8a38 libzfs: report invalid permission name in zfs allow
 #18430 513710ed2 Fix "panic: cache_vop_rename: lingering negative entry"
 #18440 37e3a260f dmu_direct: avoid UAF in dmu_write_direct_done()
 #18445 2eee4ac1e Fix: draid autopkgtests fail on s390x architecture
 #18448 8da472973 key lookup failure should always return EACCES
 #18456 4a58ab8ce zfs.4: document five missing module parameters

Obtained from:  OpenZFS
OpenZFS commit: 84ffe564dff1b7f69d397817ef292cbe2c5ebad3
f9590540c524607d22fa7e718c758725c4365375 Martin Matuska 2026-05-02 07:17:59

Reverted commits

Commit & revert pair: Vendor import of smart at 1.0.2
Vendor import of smart at 1.0.2

smart/diskhealth is a command line application to monitor disk health
from a storage device via SMART.

Reviewed by:    fuz, jrm
Relnotes:       yes
Differential Revision:  https://reviews.freebsd.org/D56638
68e5b71517e947b4e3f349c970af362b47b45f27 Chuck Tuffli 2026-04-28 16:55:50

Revert "Vendor import of smart at 1.0.2"

This reverts commit 68e5b71517e947b4e3f349c970af362b47b45f27.
e139a49b5d8e9385b4d42ea1ec3850bc80d7f989 Chuck Tuffli 2026-04-28 18:49:22
Commit & revert pair: build: provide a FORTIFY_SOURCE.<src file> override
build: provide a FORTIFY_SOURCE.<src file> override

For native files we can do more minimal fixes to avoid this large of a
hammer, but for third party files it may not be worth the effort to try
and patch them.  NetBSD has the original _FORTIFY_SOURCE implementation
that ours is based on, for instance, but tests sourced from there can't
do an __ssp_real(foo) without being certain that `foo` actually has a
fortified definition.

This change does always define _FORTIFY_SOURCE as a result, so gate it
on CFLAGS not already containing _FORTIFY_SOURCE definitions.

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294881
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D56733
c46a0b590716144d772eeba83ca88d96ee12c2f1 Kyle Evans 2026-05-01 02:57:51

Revert "build: provide a FORTIFY_SOURCE.<src file> override"

This reverts commit c46a0b590716144d772eeba83ca88d96ee12c2f1.  It broke
the build and I'm not awake yet.
8583bcb5b400c4e4d18a563cd749ee9b23750e0a Kyle Evans 2026-05-01 12:19:17
Revert 00bee6fcd77f, which partially reverted libc++ commit aa7f377c965c
After base 966fb94cb357, this revert is no longer necessary: stdint.h
will unconditionally define macros such as `SIZE_MAX`, `UINT64_C`, and
others.

Submitted by:   Nikolas Klauser <nikolasklauser@berlin.de>
MFC after:      1 month
Reviewed by:    imp
Differential Revision: https://reviews.freebsd.org/D56746
19ff93c921a9d31770bcfc194c078e7a42a5f14f Dimitry Andric 2026-05-01 18:12:55
Commit & revert pair: sys/vnode.h: remove stale comment
sys/vnode.h: remove stale comment

The source sweep is not going to happen.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D56611
f193f5a749b696e6c05fa2c47c24522b1624b1a7 Konstantin Belousov 2026-04-24 02:06:02

Revert erronously pushed series of commits, which should not be.

Sorry for the mess.

Revert "sys/vnode.h: remove stale comment"
This reverts commit f193f5a749b696e6c05fa2c47c24522b1624b1a7.

Revert "vfs: convert VFS_OPs from macros to static inlines"
This reverts commit 48bf024f2ef5afeba3500bd92a04283370479edf.

Revert "vnode: add VIRF_KNOTE flag"
This reverts commit 7fe74a02764e5899b10cdc45ab34182b961d5d19.

Revert "vfs: convert vfs_op_thread_* macros to static inlines"
This reverts commit a61a696e78a967b149a6e39b1f98ada26217a6bb.

Revert "struct vnode: assign v_rl.resv1 as v_vrflag"
This reverts commit d990e8f0e9478194569ba28c366b0c0c0f414e7b.

Revert "sys/rangelock.h: explicitly enumerate padding at the end of the structure"
This reverts commit a770638ecf16515d8922111c3fdd417aba6c045e.

Revert "bufspace_wait(): only try to help bufdaemon if there is a chance to help"
This reverts commit 067cfac2e7bd9dc857fb6cc504c01b0249bcd1b7.

Revert "Add O_SYMLINK emulation"
This reverts commit f9458655e78f6532e962a13d28d6a6086b4156de.

Revert "libc: add freadlink(3)"
This reverts commit ae6a13deb8e33a52188643e09171207e1d7171e8.

Revert "Add O_SYMLINK emulation"
This reverts commit 2213820b6f4cd22bbfdc0f45741c3e7d17ae82c0.
9ca9a79ea67e8569c31ecc328e001b35908f491c Konstantin Belousov 2026-05-03 20:10:06

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-05-11 20:37:53+00:00.

This work is supported by Tarsnap Backup Inc.

Alternate version: 2026-04-27 (debug) (contains info about the classification)