FreeBSD git weekly: 2026-01-26 to 2026-02-01

Introduction

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

Table of contents and commits per category:

(0) Highlighted commits (these are copies, not in stats)
0 0.0% Userland programs
9 5.3% Documentation
37 21.9% Hardware support
15 8.9% Networking
14 8.3% System administration
8 4.7% Libraries
0 0.0% Filesystems
37 21.9% Kernel
16 9.5% Build system
3 1.8% Internal organizational stuff
10 5.9% Testing
7 4.1% Style, typos, and comments
11 6.5% Contrib code
2 1.2% Reverted commits
0 0.0% Unclassified commits
169 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.

-- no commits in this category this week --

Userland programs

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

-- no commits in this category this week --

Documentation

Man pages, release notes, etc.

posix_spawnattr_getexecfd_np.3: add closing .Fc
Fixes:        https://cgit.freebsd.org/src/commit/?id=9bf69c37f43e96292e97e41bf942d7aca4101362
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
2a5b083c1f7e0a4518bd944241af1d1102997c4d Konstantin Belousov 2026-01-26 20:07:31
divert: Update divert.4 to mention pf
pf's divert-to action can be used to pass packets to a divert socket,
but divert.4 didn't mention this, only referencing ipfw.  Try to make
the text a bit more general.

Reviewed by:    igoro, kp, glebius
MFC after:      2 weeks
Sponsored by:   OPNsense
Sponsored by:   Klara, Inc.
Differential Revision:  https://reviews.freebsd.org/D54848
120c0bb833977707fc56f59b0961994fbd6c52e7 Mark Johnston 2026-01-27 13:48:22
RELNOTES: Document a pf enhancement
0dba3626a13d9c90722c88accfdd84915aeceda7 Mark Johnston 2026-01-27 14:05:42
sh.1: Provide detailed job control documentation
Adopt the POSIX standard text to our implementation.

PR:                     https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=206284
Reviewed by:            des, jilles, ziaee
Differential Revision:  https://reviews.freebsd.org/D49895
2711852bd9ac3ab78d2b128d3549ff437d2a09af Artem Bunichev 2026-01-29 17:08:11
tuning.7: document schedulers knobs
Reviewed by:  emaste, olce, ziaee
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D54951
0730a05cd383276ca8eedf295509e869ac9b88a0 Konstantin Belousov 2026-01-29 21:40:29
intro.9: deduplicate vm_page Xrs
PR:           https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292820
Submitted by:   Kraytonian
MFC after:      1 week
7f537f4ba8a5e19a39d005a81fa6f34a8d2cb60d Maxim Konovalov 2026-01-30 04:48:56
intro.9: grammar
c443f5d1c20868f09076305c3eefcd1ca1917b87 Maxim Konovalov 2026-01-30 04:51:24
INDEX.fonts: Minor maintenance
+ Mention relevance of this file in the vt manual screen.font entry
+ The vidfont manual is in section one, not eight
+ Remove leftover blank line from freebsd tag removal

MFC after:      3 days
1f5795b6422a1c6e4b71fd7e93717522ccb822f9 Alexander Ziaee 2026-02-01 00:24:22
vt.4: Sprinkle mdoc macros
Now that we have angle bracket characters for all common display sizes,
sprinkle in the correct macros for the structures in this page. While
here, fix a mdoc typo, a linter warning, and switch a parenthetical to
a much smoother appositive.

MFC after:      3 days
Fixes:          https://cgit.freebsd.org/src/commit/?id=7cd6da268a8f (vt.4: Style pass)
a97ed3a39c1044dd1b8056d68a76de74821f2bff Alexander Ziaee 2026-02-01 00:16:34

Hardware support

Hardware drivers and architecture-specific code.

cam/scsi: Restore scsi_start_stop() and add scsi_start_stop_pc()
Revert the argument change that broke libcam in 8c35de49 and move
power_condition support to scsi_start_stop_pc().

Reported by:            imp
Reviewed By:            #cam, imp (mentor)
Sponsored by:           Samsung Electronics
Differential Revision:  https://reviews.freebsd.org/D54822
8ef8c6abfadfc9eb0465ce57c6b09ca310415bdd Jaeyoon Choi 2026-01-26 06:29:28
hpt: remove unnecessary macro expansion hacks
Reviewed by:  imp
Differential Revision:  https://reviews.freebsd.org/D54875
c29e05113c000dc04552f8d21a92fd00c60d0a98 Ahmad Khalifa 2026-01-26 09:28:08
Commit group #0: acpi_spmc: Add system power management controller driver
acpi_spmc: Add system power management controller driver

Add SPMC (system power management controller) driver as acpi_spmc. This
is the device which provides the LPI device D-state constraints and
allows for OSPM to send S0ix/modern standby entry/exit notifications.
This supports the original Intel DSM
(https://uefi.org/sites/default/files/resources/Intel_ACPI_Low_Power_S0_Idle.pdf,
untested), the AMD DSM (tested), and the Microsoft DSM (tested).

Before entry, acpi_spmc_check_constraints is called to notify of any
violated power constraints. This will use acpi_pwr_get_state to get
current device D-states when that gets added back.

Reviewed by:    olce
Tested by:      jkim, Oleksandr Kryvulia, Matthias Lanter
Approved by:    olce
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D48387
c5daa5a4c32c9b1ecb506ddf1a80579c93c3ea6d Aymeric Wibo 2025-06-14 15:30:44

acpi: Add ACPI_SPMC debug layer define

Reported by:    des
Fixes:  https://cgit.freebsd.org/src/commit/?id=c5daa5a4c32c ("acpi_spmc: Add system power management controller driver")
Sponsored by:   The FreeBSD Foundation
49ec19f1e101a079bc3749e25c4c927098f2f67a Aymeric Wibo 2026-01-26 16:54:37

acpi_spmc(4): Fix compilation on 32-bit platforms

Fixes:          https://cgit.freebsd.org/src/commit/?id=c5daa5a4c32c ("acpi_spmc: Add system power management controller driver")
Sponsored by:   The FreeBSD Foundation
149e6c67ca80e72066ff84a0138914a6896559fb Olivier Certner 2026-01-28 09:45:15
riscv: smarter DMAP construction (again)
Extend pmap_bootstrap_dmap() to build the DMAP with 4K-page granularity.

Recently we have been approximating it with 2MB mappings. The motivation
again is the problematic FU540 hardware, which seems to require more
accurate mappings still to avoid triggering its PMP errata.

Although this hardware alone is of little consequence, constructing the
DMAP accurately/correctly may help avoid future surprises.

The implementation contains some repetitive code. This could be
expressed differently, but my guiding principle for these early routines
is that being simple and explicit about what we are doing makes them
easier to comprehend.

See also 762a3224cde6 ("riscv: smarter DMAP construction).

Tested by:      Klaus Küchemann <maciphone2@googlemail.com>
MFC after:      2 weeks
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D54716
27595bea69400ae71fa778cf1dcb52a793911ad4 Mitchell Horne 2026-01-21 18:58:01
Commit group #1: sym(4)
sym(4): Consistently use device_printf(9) where applicable
48eee744b540ef0413fa1cb543dde6e49e7f2ac4 Marius Strobl 2026-01-21 17:29:35

sym(4): Use memcpy(9) instead of bcopy(9)

The overlap handling of bcopy(9) is not required in these cases.

Obtained from:  BSD-licensed Linux sym53c8xx driver
c8e9479c74a2af0f6c665e930091c163bf760fd5 Marius Strobl 2026-01-21 16:47:50

sym(4): Provide a DEVICE_DETACH(9) method

This also fixes sym_cam_free() to tear things down correctly, i. e. in
opposite order of setup, as well as sym_cam_attach() to not free devq
and SIM twice in the failure case.
518c01b31e96bbe8353a551885a61e7da6aed5f6 Marius Strobl 2026-01-22 09:05:38

sym(4): Employ memory barriers also on x86

In an MP world, it doesn't hold that x86 requires no memory barriers.

This change should also fix panics due to out-of-sync data seen with
FreeBSD VMs on top of OpenStack and HBAs of type lsiLogic. [1]

While at it:
- Improve the granularity somewhat by distinguishing between read and
  write memory barriers as well as refer to existing *mb(9) functions
  instead of duplicating these [2], unless IO barriers are also used.
- Nuke the unused SYM_DRIVER_NAME macro.

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=270816 [https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=1]
Obtained from:  BSD-licensed Linux sym53c8xx driver [2]
MFC after:      1 week
e769bc77184312b6137a9b180c97b87c0760b849 Marius Strobl 2026-01-26 13:58:57
riscv: Add macro for hfence.gvma instruction
Add an inline function hfence_gvma() for hfence.gvma instruction.

Signed-off-by:  Doongar Singh <doonbsd@gmail.com>
Reviewed by:    mhorne, markj
Differential Revision:  https://reviews.freebsd.org/D54857
972c488bf4117d9eb29e5753c6c5a2250154df3d Doongar Singh 2026-01-26 16:18:22
arm64/vmm: Simplify vmmpmap_remove()
This function handles invalid intermediate PTP entries, but there's no
reason for this: the passed range should be mapped.  In particular, we
assert that all L3 entries encountered are mapped.  So let's simplify
the code a bit.  No functional change intended.

Reviewed by:    andrew
MFC after:      2 weeks
Sponsored by:   The FreeBSD Foundation
Sponsored by:   Klara, Inc.
Differential Revision:  https://reviews.freebsd.org/D54738
31e5decb18a6633f5137848b5734310b41fc3bdc Mark Johnston 2026-01-26 21:05:43
bnxt: don't set media status if link is down
When the link is down don't set flags other than IFM_AVALID & IFM_ETHER
This avoids `media: Ethernet autoselect (Unknown <full-duplex>)` on ifconfig

Reviewed by:    zlei, pouria
Approved by:    glebius (mentor)
MFC after:      1 week
Sponsored by:   Stormshield
Differential Revision: https://reviews.freebsd.org/D54573
69de2b4e96794793f04d1b323d354fcde3c480f6 Anaëlle CAZUC 2026-01-26 23:06:02
powerpc: add a best-effort SMP time base sync for G5's that need it
There's no timebase freeze platform routine registered on my dual 2.3GHz
G5 PPC970FX Apple PowerMac.

For platforms without an explicit timebase freeze/unfreeze, we'll have to
make do with what we have - which for now is an explicit hand-crafted
spinlock/rendezvous method.

* For existing platforms, they'll still continue to clock freeze /
  rendezvous; albeit with some stronger atomic bits now (from jhibbits@.)
* Instead of the fallback being "no timesync", implement a
  best-effort one which does a similar rendezvous barrier between
  BSP and APs, but instead of freeze/unfreeze the first instruction
  after the CPUs all register they're ready is to set the timebase.

This has resulted in many reboots of my Powermac G5 dual-socket device
correctly starting and running in SMP mode.

Differential Revision:  https://reviews.freebsd.org/D54821
Reviewed by:    jhibbits
422c8719eab2b8a01b49f748a88dd372db25f888 Adrian Chadd 2026-01-20 02:38:43
powerpc: disable the TLBIE lock, it's not needed for POWER8
According to POWER8_UM_v1.3_16MAR2016 3.8.3 Translation Lookaside
Buffer (TLB), POWER8 supports lockless TLBIE operations.

Locally Tested:

* IBM POWER8 Revision 2.0, dual socket, 160 threads

Differential Revision:  https://reviews.freebsd.org/D54855
Approved by:    jhibbits
9a5baa9c585652fb7bd4ccd45d567204caf349f2 Adrian Chadd 2026-01-23 07:36:00
cxgbe(4): Fix netmap rx behavior with nm_split_rss
The driver should look for active queues and one potential default-queue
in both halves of the split instead of stopping at the first valid
default-queue.

Fixes:          https://cgit.freebsd.org/src/commit/?id=a9f476580eb0 cxgbe(4): fixes for netmap operation with only some queues active
MFC after:      1 week
Sponsored by:   Chelsio Communications
77d71f5f36cc01e7fc2ca0828af00a4478bbf53c Navdeep Parhar 2026-01-27 01:03:05
bnxt_re/libbnxtre: Add RoCE support for BCM576xx controllers
Added RoCE support for BCM576xx controllers with below changes,

1. Update the BAR offsets for handling BCM576xx controllers.
Use the values populated by the L2 driver for getting the
Doorbell offsets.

2. Use msn index instead of tail to pull psn table entry.

3. Temporarily disable dbr pacing feature untill it is
fully implemented.

4. Add support for 400G speed.

Reviewed by: ssaxena
Differential Revision: https://reviews.freebsd.org/D54521
MFC after: 3 days
92ba9b2fe58910b1d2cd6cd34b5ec093f0d9f700 Sreekanth Reddy 2026-01-23 16:27:22
bnxt_en/re: Use FW defined resource limit for RoCE
Check FW flags for status of Resource Limits. If bit
FUNC_QCAPS_RESP_FLAGS_EXT2_SW_MAX_RESOURCE_LIMITS_SUPPORTED
is set, that means FW set the resource limit for L2 and RoCE.
We'll then do the following:

L2 driver would allocate context memory based on what FW reported.
RoCE driver uses FW reported values without capping. These values
are the total FW reported value minus L2 and other components shares.

For example:

FW reported max_qps = 137217 in L2 query, this includes:
5120 for L2
1025 for QP1
131072 for RoCE
L2 will allocate backing store memory for the total.
In RoCE query, we'll get max_qp = 131072 and use it
without further capping.

Reviewed by: ssaxena
Differential Revision: https://reviews.freebsd.org/D54522
MFC after: 3 days
913e454f306124c83797bfa71681dcdf806532c6 Sreekanth Reddy 2026-01-23 16:32:51
bnxt_re: Fix active_speed value when two ports are aggregated
Currently driver is not considering the active_lanes while
displaying the speed & width of port and hence it showing
invalid active_speed and active_width values in the ibv_devinfo
command output when two ports are aggregated at hardware level.
Fixed the driver to consider the active_lanes while determining
the active_speed & active_width values.

Reviewed by: ssaxena
Differential Revision: https://reviews.freebsd.org/D54523
MFC after: 3 days
b7d6334df61a559e98191f90fd5e611e0d077def Sreekanth Reddy 2026-01-23 16:36:02
bnxt_re: Add support to display board_id in ibv_devinfo output
Added support to display board_id in ibv_devinfo output.
ibv_devinfo util reads the board_id from below sysctl
attribute, so added this sysctl attribute.

sys.class.infiniband.bnxt_reX.board_id

Reviewed by: ssaxena
Differential Revision: https://reviews.freebsd.org/D54524
MFC after: 3 days
3a9565c2a8e4f1b3da698bf6a8af5889dc4fefbd Sreekanth Reddy 2026-01-23 16:38:02
bnxt_re/libbnxtre: Add support for Variable WQE on BCM576xx controllers
Variable size WQE means that each send Work Queue Entry to
HW can use different WQE sizes as opposed to the static WQE
size on the current devices. Set variable WQE mode for BCM576xx
devices. Depth of the Queue will be a multiple of slot which
is 16 bytes. The number of slots should be a multiple of 256
as per the HW requirement.
Initialize the Software shadow queue to hold requests equal to
the number of slots.

Reviewed by: ssaxena
Differential Revision: https://reviews.freebsd.org/D54525
MFC after: 3 days
823f158a01330484f83f69c31d695035c607f8ee Sreekanth Reddy 2026-01-23 16:40:13
arm: Make init_proc0 static
This function is not used outside of machdep.c and is already static
on arm64 and riscv.

Reviewed by:    imp
Effort:         CHERI upstreaming
Sponsored by:   AFRL, DARPA
Differential Revision:  https://reviews.freebsd.org/D54838
05609c5eff27ea7b382237bd2a937c01c1ceb59a John Baldwin 2026-01-27 18:30:23
powerpc: Fix alignment of initial PCB on kstack
Commit cc81c44dd806737f98b4fd4094674dd71c8749f3 aimed to consolidate
duplicated code between the Book-E and AIM backends.  For
cpu_thread_alloc cpu_thread_alloc and cpu_fork it used the AIM
functions which used a bogus alignment mask (~0x2f).  The Book-E
functions used a proper alignment mask (~0x3f).  The AIM functions
appear to have been busted since they were first imported in commit
919cb3362fded33aca682a6ac57777f8fff86e36.

To fix, use the Book-E mask which requests 64 byte alignment.
Probably this was harmless in practice since td_kstack is page aligned
and struct pcb is probably a multiple of 32 bytes in size, so the 0x10
bit should have been clear anyway.

Reviewed by:    fuz, jhibbits
Fixes:          https://cgit.freebsd.org/src/commit/?id=cc81c44dd806 ("Unify ABI-related bits of the Book-E and AIM...")
Effort:         CHERI upstreaming
Sponsored by:   AFRL, DARPA
Differential Revision:  https://reviews.freebsd.org/D54839
9272b780626640ce9b9ac378fbdd2783aaa33625 John Baldwin 2026-01-27 18:30:46
sys: Use __is_aligned and __align_down for some kstack alignment operations
Reviewed by:  kib, jhibbits
Effort:         CHERI upstreaming
Sponsored by:   AFRL, DARPA
Differential Revision:  https://reviews.freebsd.org/D54840
093fffa296d009de8cebf713a58ddbf876f05c5c John Baldwin 2026-01-27 18:31:23
ahc(4): Fix a warning on i386 compilation
Fixes:          https://cgit.freebsd.org/src/commit/?id=cd036e891a35 ("ahc_pci.c: If bus_dma...")
MFC after:      3 days
Sponsored by:   The FreeBSD Foundation
a9f7074e858fd7c8e07c164fc365afc0d0077735 Olivier Certner 2026-01-28 09:31:21
acpi: Use only AcpiGetSleepTypeData() to determine Sx support
Previously, we would first call AcpiEvaluateObject() to execute \_Sx
before calling AcpiGetSleepTypeData().  This was unnecessary, as
AcpiGetSleepTypeData() performs the same call itself.  While doing so,
the latter function logs any other error than AE_NOT_FOUND (which
indicates that a particular sleep state is not supported), which most
probably is an added benefit of this change.

Reviewed by:    obiwac
MFC after:      2 weeks
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D54624
526c09a489295c96662d6c3d428f69672968ab80 Olivier Certner 2026-01-07 13:34:44
acpi: Use AcpiGbl_FACS even on ACPI_REDUCED_HARDWARE
This has been possible since ACPICA 20240827, and is actually
a requirement to get out of S3 on ACPI_REDUCED_HARDWARE (that said, we
don't implement S3 on arm64 yet).

Relevant ACPICA commit:
https://github.com/acpica/acpica/commit/79cd933e7b370e8d3fb490bf36ca5d111a12f96a.

Reviewed by:    obiwac
MFC after:      2 weeks
MFC to:         stable/15
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D54625
0cca6277499febef57149e8999ecd1a42ef1dfd3 Olivier Certner 2026-01-09 09:28:18
vtnet: remove M_HASHTYPE when there is only one pair of rx/tx queue
Summary:
Doing so will let the upper layer know how to deal with software hash,
with benefits like inp_flowid can be set and m_pkthdr.flowid can be set
in output path.

Reviewed by: tuexen
Differential Revision: https://reviews.freebsd.org/D54929
20285cad7a55ecd0020f51f3daee74db8b1ea5a0 Cheng Cui 2026-01-28 17:27:34
arm, riscv: add a preprocessor symbol indicating missed support of ifunc
in kernel.

Tested by:      pho
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D54831
03d61fe9785793cce9324fd4e6019562586760fa Konstantin Belousov 2026-01-23 21:33:07
amd64/machdep.c: remove extra empty line
Reviewed by:  olce
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D54831
23266bc9928f16fef292f6ab31d7cd8b7ad2ccdb Konstantin Belousov 2026-01-22 04:39:54
cpu_switch(): unconditionally wait on the blocked mutex transient
It is nop for 4BSD.

Reviewed by:    olce
Tested by:      pho
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D54831
377c053a43f347588ce6800627adb634f87f8cf9 Konstantin Belousov 2026-01-22 12:57:24
x86/cpu_machdep.c: unconditionally fence
For !SCHED_ULE, even if the fence is not needed, it is harmless.

Reviewed by:    olce
Tested by:      pho
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D54831
1c4e16f6db81254376f4919aede03267fe572aea Konstantin Belousov 2026-01-22 13:27:00
powerpc: explicitly cast the timebase printfs
This is causing compilation issues on powerpc:powerpc GENERIC.
03e4cc9fdeb2a6445f13cd41b471927a0f722fff Adrian Chadd 2026-01-30 06:36:33
dpaa2: add support for several interface counters
Add support for IFCOUNTER_IPACKETS, IFCOUNTER_OPACKETS,
IFCOUNTER_OBYTES, IFCOUNTER_OMCASTS, IFCOUNTER_OERRORS, and
IFCOUNTER_OQDROPS.
This allows tools like systat to report the incoming and outgoing
bandwidth.

Reviewed by:            dsl, Timo Völker
MFC after:              1 week
Differential Revision:  https://reviews.freebsd.org/D54893
33596d92555e5b1632fca14eb9af295e4b8f751c Michael Tuexen 2026-01-30 09:58:57
arm64: Fix kernel panic in get_arm64_sve during core dump
The coredump logic calls get_arm64_sve twice: once to get the note size,
and once to get the data. The note size calculation depended on the
volatile `PCB_FP_SVEVALID` flag. If this flag was cleared between the
two calls (e.g., due to a context switch clearing the flag to comply
with the ABI), the second call would expect a smaller buffer size than
the first, triggering a KASSERT panic ("invalid size").

Fix this by ensuring the SVE state is saved to the PCB before we decide
whether to use SVE or VFP.

PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292195
Reviewed by: andrew
Differential Revision: https://reviews.freebsd.org/D54532
93d3ac1daa0ef3ac54ffcd5cc64a14638d04bd60 Andy Carrel 2026-01-05 07:50:27
ure: improve checksum offloading
This patch fixes three issues:
(1) Initially, set the hwassist flags correctly when enabling
    transmit checksum offload for TCP/IPv6 and UDP/IPv6.
(2) Keep the hwassist flags in sync with the capabilities when
    changing txcsum.
(3) Keep the hwasssit flags in sync with the capabilities when
    changing txcsum6.
Without this patch, transmit checksum offloading for TCP/IPv6 and
UDP/IPv6 is never used and transmit checksum offloading for IPv4,
TCP/IPv4 and UDP/IPv4 is always used, even if disabled via
ifconfig ue? -txcsum.

Reviewed by:            Timo Völker
MFC after:              3 days
Differential Revision:  https://reviews.freebsd.org/D54974
7b6e84c9ac5668134ab2d075019ef0b827d90c84 Michael Tuexen 2026-01-31 10:42:10
ice(4): Handle allmulti flag in ice_if_promisc_set function
In the ice_if_promisc_set function, the driver currently disables the
IFF_ALLMULTI flag, thereby preventing the activation of multicast mode.
To address this issue, implement appropriate handling to ensure the
flag is managed correctly.

Signed-off-by: Yogesh Bhosale <yogesh.bhosale@intel.com>

Tested by:      Gowthamkumar K S <gowtham.kumar.ks@intel.com>
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D54186
98bdf63f6e94be42a1787de73608de15bcb3419a Yogesh Bhosale 2026-02-01 17:27:36

Networking

Network-related commands, library, and kernel.

pf: Rationalize the ip_divert_ptr test
If a rule has a divert port set, then we can reasonably predict that
ipdivert.ko is loaded, and in particular that ip_divert_ptr is set.

Moreover, in this case, if ipdivert.ko is not loaded we should just drop
the packet instead of ignoring the divert rule.

Reviewed by:    igoro, kp, glebius
MFC after:      2 weeks
Sponsored by:   OPNsense
Sponsored by:   Klara, Inc.
Differential Revision:  https://reviews.freebsd.org/D54845
39878d24a690feb4da3fc223649c6a5fd166d09d Mark Johnston 2026-01-26 17:23:33
ipfw: don't use the upper half lock to walk dynamic states buckets
The lock is sleepable and we can't grab it in dyn_tick().  Use the
individual bucket locks instead.

Fixes:  https://cgit.freebsd.org/src/commit/?id=e3caa360d5d0a73af0de1d293d5b8ff6e900ceb4
d1a8f1a62f31779e1902b856b44249b198178fc9 Gleb Smirnoff 2026-01-26 23:05:17
ip6: Remove support for RFC2675 (Jumbo Payload Option)
The Jumbo Payload option was intended to allow the deployment of IPv6 on
networks with a link MTU in excess of 65,735 octets.

Speaking to one of the authors of RFC2675 the networks which motivated
the Jumbo Payload option no longer exist.

FreeBSD does not currently support any links with this capacity and
discussion when this change was first proposed suggested that the loop
back interface had to be patched to test implementation.

As there are no known devices that can carry Jumbo Payloads remove
support.

Reviewed by:    glebius, teuxen, kp
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D19960
069a67374ed9641ff1ada2aecaac1cc61a560649 Tom Jones 2026-01-23 12:43:25
pf: Pass v6 packets to the divert socket
There is no particular limitation of divert sockets with respect to
IPv6, and the pf.conf man page does not mention the restriction to IPv4.

Extend the divert-to regression tests to exercise the v6 case.

Reviewed by:    igoro, kp, glebius
MFC after:      3 weeks
Sponsored by:   OPNsense
Sponsored by:   Klara, Inc.
Differential Revision:  https://reviews.freebsd.org/D54847
b0d99709502294812b11c139f64b0b78f5d2d457 Mark Johnston 2026-01-27 13:48:09
ip_mroute: EVENTHANDLER_REGISTER does not fail
No functional change intended.

MFC after:      1 week
Sponsored by:   Stormshield
Sponsored by:   Klara, Inc.
0f1e1350704af555a4b30136f5f3d16db6f2dc51 Mark Johnston 2026-01-27 14:56:55
ip_mroute: Convert to using a regular mutex
The multicast routing code was using spin mutexes for packet counting,
but there is no reason to use them instead of regular mutexes, given
that none of this code runs in an interrupt context.  Convert to using
default mutexes.

Reviewed by:    glebius
MFC after:      2 weeks
Sponsored by:   Stormshield
Sponsored by:   Klara, Inc.
Differential Revision:  https://reviews.freebsd.org/D54603
a265c8b4a5a7c8fdd33e27b8f74bd2a514f82c70 Mark Johnston 2026-01-27 14:58:02
ipfw: don't recurse on the upper half lock in ipfw_iface_ref()
d8a78048a24662dc9310bfd4e4498d278fe00f0a Gleb Smirnoff 2026-01-27 17:30:13
ipfw: fix my stupid error in casting void * to enum
29c3350f395a48b5c6fe8acd28f281e9af9cd8ab Gleb Smirnoff 2026-01-27 18:02:46
bluetooth: Don't use a non-string to initialize NG_HCI_BDADDR_ANY
Explicitly use an array of 6 zeroes instead of a C string containing
nul characters.  GCC 15 warns about the truncation, but this is
cleaner regardless.

In file included from /usr/obj/.../amd64.amd64/tmp/usr/include/bluetooth.h:51,
                 from usr.sbin/virtual_oss/virtual_bt_speaker/bt_speaker.c:45:
usr.sbin/virtual_oss/virtual_bt_speaker/bt_speaker.c: In function 'register_sdp':
usr.sbin/virtual_oss/virtual_bt_speaker/bt_speaker.c:96:13: error: initializer-string for array of 'unsigned char' truncates NUL terminator but destination lacks 'nonstring' attribute (7 chars into 6 available) [-Werror=unterminated-string-initialization]
   96 |             NG_HCI_BDADDR_ANY, (const uint8_t *)&record, sizeof(record),
      |             ^~~~~~~~~~~~~~~~~

Reviewed by:    dim
Differential Revision:  https://reviews.freebsd.org/D54869
72a6991b80c6e6c47a3b84337f62f0a02bd30391 John Baldwin 2026-01-27 18:40:38
Commit group #2: netinet6: Disallow connections to IN6ADDR_ANY
netinet6: Disallow connections to IN6ADDR_ANY

Previously connect() or sendto() to INADDR_ANY or IN6ADDR_ANY reached
some socket bound to some host interface address.  Although this was
intentional it was an artifact of a different era, and is not desirable
now.

In 417b35a97b76 markj added support to disallow connect() to INADDR_ANY
and IN6ADDR_ANY.  Connections to INADDR_ANY were disabled by default in
cd240957d7ba.  Follow suit with IN6ADDR_ANY.

Reviewed by:    glebius, markj, zlei
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D54306
627e126dbb07b167b028380ef61bb45f10493938 Ed Maste 2025-12-19 14:15:35

tests/netinet: fix tests that depended on connect(in6addr_any)

Fixes:  https://cgit.freebsd.org/src/commit/?id=627e126dbb07b167b028380ef61bb45f10493938
9df110b11f2dc8802fe6418b96e417f93ba6a753 Gleb Smirnoff 2026-01-30 21:31:13
epair: add VLAN_HWTAGGING
Add capability VLAN_HWTAGGING to the epair interface and enable it by
default.
When sending a packet over a VLAN interface that uses an epair
interface, the flag M_VLANTAG and the ether_vtag (which contains the
VLAN ID and/or PCP) are set in the mbuf to inform the hardware that
the VLAN header has to be added. The sending epair end does not need
to actually add a VLAN header. It can just pass the mbuf with this
setting to the other epair end, which receives the packet. The
receiving epair end can just pass the mbuf with this setting to the
upper layer. Due to this setting, the upper layer believes that there
was a VLAN header that has been removed by the interface.
If the packet later leaves the host, the outgoing physical interface
can add the VLAN header in hardware if it supports VLAN_HWTAGGING.
If not, the implementation of Ethernet or bridge adds the VLAN header
in software.

Reviewed by:            zlei, tuexen
MFC after:              1 week
Differential Revision:  https://reviews.freebsd.org/D52465
574d46b25ab6f42ad97017bb8b72520e9539e36f Timo Völker 2026-01-30 10:54:33
ip6_mroute: Mark functions as static
No functional change intended.

MFC after:      2 weeks
Sponsored by:   Stormshield
Sponsored by:   Klara, Inc.
a03eabfebbce15d8ce028168969812d3ca2be206 Mark Johnston 2026-01-30 15:25:52
ip6_mroute: Remove unnecessary casts
No functional change intended.

MFC after:      1 week
Sponsored by:   Stormshield
Sponsored by:   Klara, Inc.
56e1cba88bb82f2a6af0212c72182ff6303a1554 Mark Johnston 2026-01-30 20:39:34
sockstat: Surround explicit IPv6 addresses with brackets
PR:           https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=254611
Approved by:    otis, tuexen, des
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D54375
fe81e3944c085e765c83c4f78941d7529ceb556e Michael Osipov 2025-12-26 17:27:12

System administration

Stuff in man section 8 (other than networking).

bhyve: Use PCIOCGETCONF to find the host LPC bridge
pci_host_read_config() requires write access to /dev/pci so cannot be
used with unprivileged bhyve.  The lpc init code uses it to find the
host system's LPC bridge device and so was generating warnings with
bhyve running as a non-root user.

Refactor the implementation to use PCIOCGETCONF instead, which doesn't
require any special privileges.  This isn't formally necessary, as we
only care about copying the host system's identifiers in order to
support Intel GPU passthrough (see commit f4ceaff56ddaa), but it's
straightforward and lets an unprivileged user run bhyve without seeing
warnings about failing to open /dev/pci with write permissions.

Reviewed by:    corvink, rew
MFC after:      3 weeks
Sponsored by:   The FreeBSD Foundation
Sponsored by:   Klara, Inc.
Differential Revision:  https://reviews.freebsd.org/D54851
1db1e4bdc64f29661592a47f2feb690d7cf37957 Mark Johnston 2026-01-26 21:05:06
sbin/setkey: add -Z option to disable receive timeouts
Sponsored by: NVidia networking
MFC after:      1 week
d47c1c2cf562a7583758387cd652e98b91ab83f6 Konstantin Belousov 2026-01-20 12:09:47
stand/zfs: fix path setup in zfs_mount()
Need to check argument 'path', not just allocated struct member.
ab5f29ae9ef0246cee27d246ee48923030575aae Toomas Soome 2026-01-28 08:32:13
loader.conf.5: "console" setting does not document multi-value possiblity
PR:           https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292595
Approved by:    ziaee, dab, imp, tsoome
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D54843
240c614d48cb0484bfe7876decdf6bbdcc99ba73 Michael Osipov 2026-01-23 20:26:24
flua: lposix: fix WARNS=6 issues
lposix is the last holdout of modules built into flua until we can fix
the module design to have the right parts require()able.  Address a
valid bug in lua_read() found at a higher WARNS and drop the override
entirely.  Some of the modules could possibly be re-evaluated.

Fixes:  https://cgit.freebsd.org/src/commit/?id=c2caf3b3313 ("flua: lposix: add more useful functions [...]")
Reported by:    des
Reviewed by:    des
Sponsored by:   Klara, Inc.
Sponsored by:   NetApp, Inc.
b41b6fdb3a1635de4c2a9280aab12b83e3aeffc5 Kyle Evans 2026-01-28 15:37:04
ifconfig: Exit with a non-zero status when SIOCSIFFIB fails
Previously, setting an interface FIB to some invalid value would result
in a warning being printed, but the ifconfig command would exit with
status 0, but this is wrong.

Add a little regression test.

Reviewed by:    pouria, zlei, melifaro
MFC after:      2 weeks
Sponsored by:   Stormshield
Sponsored by:   Klara, Inc.
Differential Revision:  https://reviews.freebsd.org/D54918
2ea85a622bcba92a7b58901d6a6e945df3022c4e Mark Johnston 2026-01-28 16:11:47
cpucontrol: Be more strict with input validation
Avoid truncating 32-bit values.  This would have saved me a bit of time
when I was looking at a cpuid leaf on my system and typed 0x80000001f
instead of 0x8000001f.

Reviewed by:    kib
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D54919
59bbb62b6078afffd1c182b63d43934248289675 Mark Johnston 2026-01-28 16:31:41
Set virtual_oss_enable="NO" in /etc/defaults/rc.conf
This prevents 'service -e' from emitting (/var/log/messages):

/usr/sbin/service: WARNING: $virtual_oss_enable is not set properly - see rc.conf(5)

Pull Request:   https://github.com/freebsd/freebsd-src/pull/1987
Reviewed by:    christos
Signed-off-by:  eborisch@gmail.com
MFC after:      1 week
1b2d495a24c36d81b14178a2f898025946bff2d8 Eric A. Borisch 2026-01-29 07:32:45
loader: Prefer comma-separated list of values for "console"
PR:           https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292595
Reviewed by:    imp
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D54923
56970c3c4b0bc61d972837661a31cc2b9e8e8d7c Michael Osipov 2026-01-28 09:02:33
nuageinit: support fetching configuration on multiple iface
On some environement a VM can be connected to multiple ifaces but only
one will respond to dhcp and able to fetch the metadata.

Launch the early dhclient on all available ifaces and as soon as one
dhcp has successfully configured an iface, proceed with fetching the
metadata.

MFC After:      1 week
Reported by:    mateusz.klejn@ovhcloud.com
Tested by:      mateusz.klejn@ovhcloud.com
Sponsored by:   OVHcloud
90a7728cd8905cd26b90d06f7873df8bad43ae9a Baptiste Daroussin 2026-01-29 09:56:33
nanobsd: embedded: Stub out experimental functions
Stub out both experimental functions introduced in ecc039be7fdd when
doing embedded builds.

Fixes:          https://cgit.freebsd.org/src/commit/?id=ecc039be7fdd ("nanobsd: Add a NO_ROOT build option")
MFC after:      3 days
f54f362d62c638529b66ea351821752e756a9a21 Jose Luis Duran 2026-01-27 05:54:04
heimdal: Add missing function prototypes
This fixes the build with GCC 14 on stable/14 which raises fatal
-Wimplicit-function-declaration warnings.

Reviewed by:    rmacklem, cy
Fixes:          https://cgit.freebsd.org/src/commit/?id=5000d023a446 ("heimdal-kadmin: Add support for the -f dump option")
Differential Revision:  https://reviews.freebsd.org/D54931
8a8dc73ef87b538c369abc1b642e2a40b52c53c2 John Baldwin 2026-01-31 17:00:15
heimdal: Pass the correct pointer to free in an error case
This fixes a warning reported by GCC 14 on stable/14:

crypto/heimdal/lib/hdb/keys.c:241:13: warning: 'free' called on pointer 'ext' with nonzero offset 16 [-Wfree-nonheap-object]
  241 |             free(hist_keys);
      |             ^~~~~~~~~~~~~~~
crypto/heimdal/lib/hdb/keys.c:234:15: note: returned from 'calloc'
  234 |         ext = calloc(1, sizeof (*ext));
      |               ^~~~~~~~~~~~~~~~~~~~~~~~

Reviewed by:    rmacklem, cy
Fixes:          https://cgit.freebsd.org/src/commit/?id=5000d023a446 ("heimdal-kadmin: Add support for the -f dump option")
Differential Revision:  https://reviews.freebsd.org/D54932
b26a7af438f36dcde86f39a681123cc2140affb2 John Baldwin 2026-01-31 17:00:44
stand: Use the correct OUTPUT_ARCH in the linker script for RISC-V
Compare to the OUTPUT_ARCH in sys/conf/ldscript.riscv.

Reviewed by:    mhorne
Differential Revision:  https://reviews.freebsd.org/D54962
2e8ef82b3418b41e7c54e2dbd16df0edb3cb8376 John Baldwin 2026-01-31 17:09:44

Libraries

libsys: add pdrfork_thread() on x86
Reviewed by:  asomers
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D54879
74a2bf1b7a7ff0c872499cb94df24713f61c872c Konstantin Belousov 2026-01-25 17:33:05
libc: add posix_spawnattr_{get,set}procdescp_np
Reviewed by:  asomers
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D54879
080d8ed7dd29ba537ce4cca286ed3369aca61ef5 Konstantin Belousov 2026-01-25 17:40:48
btree/bt_split.c: Fix a misaligned if statement
Sponsored by: Klara, Inc.
1e233e393ddd39faa4c530351c5a584ea0ef4df0 Bojan Novković 2026-01-27 13:44:54
btree/bt_seq.c: Fix two NULL pointer dereferences
This change fixes two NULL pointer dereferences caused by the
__bt_first function.

The first was caused by returning 0 (i.e., RET_SUCCESS) when a key
was not found, causing the caller to dereference an uninitalized
or NULL pointer. The second one was caused by an if statment clobbering
a local variable with a function call result that might be NULL.

Reported by:    clang-tidy
Sponsored by:   Klara, Inc.
Reviewed by:    markj
Obtained from:  https://github.com/apple-oss-distributions/libc (partially)
Differential Revision:  https://reviews.freebsd.org/D54905
4bcc5a3cdc05f217a8adf2f5f97a2e922663f741 Bojan Novković 2026-01-27 15:13:13
libc: Don't use uninitialised string for getnetbyaddr[_r](0) DNS lookup
If net is all-zero, the loop to extract all leading non-zero octets will
iterate zero times and leave nn with the value 4, which the following
switch statement to initialise qbuf does not handle. As a result,
_dns_getnetbyaddr will look up the PTR record for this uninitialised
string, which will leak the pre-existing contents of that stack memory
to the DNS resolver and, if remote and not otherwise protected, network.

Note that _dns_getnetbyaddr is only used if nsswitch.conf is configured
to enable the "dns" source for the "networks" database, which is not the
default configuration in FreeBSD.

For glibc this same bug, in code also derived from BIND's, was issued
CVE-2026-0915. This commit adopts the same behaviour as glibc's fix,
which is to regard a net of 0 as being for 0.0.0.0. Apparently NetBSD
will return NS_UNAVAIL instead, which may or may not make more sense,
but in general glibc compatibility tends to cause less friction when
there's not a good reason to avoid it.

Reviewed by:    markj (secteam)
Fixes:          https://cgit.freebsd.org/src/commit/?id=1363f04ce1b8 ("get* rework and new bind code")
MFC after:      1 day
Security:       Same bug as glibc's CVE-2026-0915
331316b073505e4794754af1cd0c5ccc578a2bde Jessica Clarke 2026-01-27 21:44:39
libsys, libc: provide rfork_thread() and pdrfork_thread() on all arches
Reviewed by:  markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D54898
c1be185e3fb9afd6743683a8f5a43b9c364ab529 Konstantin Belousov 2026-01-26 16:04:08
posix_spawn: use rfork_thread on all arches
Do not allocate or switch to the custom stack on non-x86.

Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D54898
4daf2d3e7db53a113108f9a02ceaf5051d416184 Konstantin Belousov 2026-01-26 16:09:18
libc/resolv: Switch default to loopback address
If no resolver configuration was found, we would fall back to INADDR_ANY
and IN6ADDR_ANY.  This made sense when it was first written thirty or
forty years ago but not today, especially since connecting to INADDR_ANY
or IN6ADDR_ANY is no longer supported.  Switch to the loopback address
and simplify the code.

Note that (as the pre-existing comment in the code states) running
without a resolver configuration is not really supported.  Still, if
we're going to have a hardcoded fallback, it might as well work.

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=291790
MFC after:      1 week
Reviewed by:    kevans
Differential Revision:  https://reviews.freebsd.org/D55011
1538284a5fddfce546db678cb873b7edc6adb9ed Dag-Erling Smørgrav 2026-01-31 17:52:53

Filesystems

-- no commits in this category this week --

Kernel

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

sys/module.h: allow MODULE_DEPEND to accept macros
Allow MODULE_DEPEND to accept macros by adding an extra level of
indirection. Some drivers in the tree actually depend on this being the
case.

Reviewed by:    imp
Differential Revision:  https://reviews.freebsd.org/D54874
6ecaa8dfb64b796085afdf597ec3a79878bde12f Ahmad Khalifa 2026-01-26 09:27:59
Commit group #3: devstat: Provide 32-bit compatibility
devstat: Provide 32-bit compatibility

If a 32-bit process running on a 64-bit kernel requests kern.devstat.all,
translate each struct devstat to its 32-bit equivalent before copying it
out.

Also fix a bug where an early error would be ignored if there were no
devices to report.

MFC after:      1 week
Reviewed by:    kib
Differential Revision:  https://reviews.freebsd.org/D54591
a11d132f6c62f32abe44b19f7527d97ddc239058 Dag-Erling Smørgrav 2026-01-26 12:01:39

freebsd32: Fix includes

The previous commit added <sys/cdefs.h>, which isn't actually needed.
Conversely, <sys/event.h> is needed (and has been for a long time) but
was not included.

MFC after:      1 week
Fixes:          https://cgit.freebsd.org/src/commit/?id=a11d132f6c62 ("devstat: Provide 32-bit compatibility")
Reported by:    gallatin@
0eb2c9d39b5f5cfb68b404bca358aa5fb11ac60c Dag-Erling Smørgrav 2026-01-26 16:24:54
witness: Provide facility to print detailed lock tree
When witness(4) detects lock order reversals (LORs), it prints
information about the stack trace which caused the LOR. If available,
it can also print information about the first stack trace which
established the other lock ordering. However, it only does this for
"simple" LORs where the two locks in question were directly locked
in the opposite order. When the lock order was established through
a more complex pattern of intermediate locks, WITNESS only prints
the stack trace where it detected the LOR.

This commit provides new functionality to provide more verbose
information about the lock chain(s) which established the lock
ordering. The new functionality can be disabled by setting the
debug.witness.trace sysctl/tunable to 1. The new functionality
is also available through the debug.witness.badstacks sysctl,
which has been modified to always show the more verbose
information.

Reviewed by:    markj, glebius (previous version), kib (previous version)
Sponsored by:   Netflix
Differential Revision:  https://reviews.freebsd.org/D54785
MFC after:      1 month
fb4b0c91195195561560bb2fb2c1ba8da81f7ccf Jonathan T. Looney 2026-01-17 01:20:26
witness: mark relationships defined in order_lists[]
Mark the lock relationships defined in order_lists[] and use that
information to print better messages when a LOR violates one of these
relationships.

Suggested by:   markj
Reviewed by:    kib, markj
MFC after:      1 month
Sponsored by:   Netflix
Differential Revision:  https://reviews.freebsd.org/D54903
37d86e9487754b8541cd4418a4c42999bbb2761f Jonathan T. Looney 2026-01-27 02:11:10
linuxkpi: Add tag support to radix tree
The tag is used to perform lookup in a different way.

New functions were introduced:
* to set, check and clear a tag
* to walk through a radix tree based on a given tag

Furthermore, the `radix_tree_delete()` function was modified to clear
tags on deletion.

The amdgpu DRM driver started to use this in Linux 6.10.

While here, the `radix_tree_gang_lookup()` function was added because it
is very close to `radix_tree_gang_lookup_tag()`, but it is not used by
the DRM drivers as of this commit.

Reviewed by:    emaste
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D54503
79b05e7f80eb482287c700f10da9084824199a05 Jean-Sébastien Pédron 2025-09-07 20:53:09
LinuxKPI: 802.11: only announce netdev_features if any are set
Printing an empty netdev_features= line makes little sense even under
bootverbose.

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
5cfe09e3a442347fe408fa95126dfbc051d064c3 Bjoern A. Zeeb 2026-01-29 11:17:25
maybe_preempt(): make static in sched_4bsd.c
Reviewed by:  olce
Tested by:      pho
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D54831
57bb132e98b0736d15881eb80aba6c2c5dd8ac28 Konstantin Belousov 2026-01-22 05:22:15
sys/sched.h: make sched_clear_tdname() function prototypes unconditional
There is no harm in having unused prototypes.

Reviewed by:    olce
Tested by:      pho
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D54831
8515934ce3c290765df9254003f3c6d79da7e538 Konstantin Belousov 2026-01-22 04:00:59
sched_4bsd: remove unused function sched_pctcpu_delta()
It is not used since c72188d85a793c7610208beafb83af544de6e3b7.

Noted by:       jrtc27
Tested by:      pho
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D54831
610d7062c60b0f1f7c193e01c5238088b2b56c96 Konstantin Belousov 2026-01-24 01:43:25
kern/sched_{ule,4bsd}.c: cleanup headers
Reviewed by:  olce
Tested by:      pho
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D54831
a556ec46d313f2ed8facd46280d35875e6e50ebe Konstantin Belousov 2026-01-22 04:20:05
sys/sched.h: add SCHED_STAT_DECLARE()
Tested by:    pho
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D54831
0b474a48dc5866d94988ed3af24019d7074f5e5b Konstantin Belousov 2026-01-24 06:00:50
Add kern/sched_shim.c
This is the infrastructure to allow scheduler implementation to be
selected on boot, supported by ifuncs.

The DEFINE_SHIM() macros and their usage provided by jrtc27@.

Reviewed by:    olce
Tested by:      pho
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D54831
ce38acee8d0bb35223b227479b9998c77b47f41b Konstantin Belousov 2026-01-22 04:19:52
kern/sched_shim.c: Provide a scheduler selection machinery
Reviewed by:  olce
Tested by:      pho
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D54831
bab24f22ba4518e640d14765dbd196e7709e1f0e Konstantin Belousov 2026-01-22 05:09:57
kern/sched_shim.c: provide required SYSINIT hooks
Reviewed by:  olce
Tested by:      pho
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D54831
7efbfd6ff6490fa6b7144cc341eaf282a21fab32 Konstantin Belousov 2026-01-22 13:59:32
Commit group #4: sys
sys: Make sched_ule a sched instance

Reviewed by:    olce
Tested by:      pho
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D54831
d14e018024bb094705dd218ceeeea124706f6ec0 Konstantin Belousov 2026-01-22 04:36:15

sys: Move ULE sysctls under kern.sched.ule

Reviewed by:    olce
Tested by:      pho
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D54831
eb454937a3c04e5d1bde4f58d0ebb2dc48472ced Konstantin Belousov 2026-01-22 05:41:21

sys: Make sched_4bsd a sched instance

Reviewed by:    olce
Tested by:      pho
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D54831
b125c4d13095b3f26d105a985099dfe1cc3ac0b3 Konstantin Belousov 2026-01-22 05:22:58

sys: Move 4BSD sysctls under kern.sched.4bsd

Reviewed by:    olce
Tested by:      pho
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D54831
8aa8289d991bc369b6739ce4c4bcd7d5234f48a2 Konstantin Belousov 2026-01-22 05:46:25
kern/sched_shim.c: Add sysctl kern.sched.available
Reports all compiled-in schedulers.

Reviewed by:    olce
Tested by:      pho
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D54831
ba8f429f42ecae1881d0face52df87ad1489af15 Konstantin Belousov 2026-01-22 05:57:49
x86/local_apic.c: remove direct SCHED_ULE use
Move the code to decide on the timer accounting into the scheduler hook.
Since there were no inclusion of opt_sched.h, it is probably done
unconditionally anyway.

Reviewed by:    olce
Tested by:      pho
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D54831
c384b35e42ee5712dda6360ffa287c0350055580 Konstantin Belousov 2026-01-22 13:24:37
net/iflib.c: move out scheduler-depended code into the hook
Add sched_find_l2_neighbor().  This really should be not
scheduler-depended, in does not have anything to do with scheduler at
all.  But for now keep the same code structure.

Reviewed by:    olce
Tested by:      pho
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D54831
b602ba1b5fd92bb226e32f5720885f856a5cb0bb Konstantin Belousov 2026-01-22 13:38:20
sysctl kern.sched.ule.topology_spec: allow to run if ULE is not initialized
Reviewed by:  olce
Tested by:      pho
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D54831
5a6e0e31bc2e8ed8f655be63fa5b8c41f3d60753 Konstantin Belousov 2026-01-23 15:09:56
sched_shim: restore kern.ccpu sysctl
It is apparently should be considered part of the ABI, and is used by
the base top(1).  But do not declare the ccpu variable in headers, it is
needed only by 4bsd. So put the variable definition into sched_shim.c to
make the kernel buildable without SCHED_4BSD.

Reviewed by:    olce
Tested by:      pho
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D54831
ff870b783f098cafd8b938379eada6b8cfe9a4fb Konstantin Belousov 2026-01-23 15:15:43
sys: enable both SCHED_ULE and SCHED_4BSD for some configs
Globally enable both schedulers for LINT.
Enable both schedulers for GENERIC on amd64.

Reviewed by:    olce
Tested by:      pho
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D54831
1322760fd1274930cbb61048d9a6ba3bc1782b2a Konstantin Belousov 2026-01-23 16:15:09
Commit group #5: kern/sched
kern/sched: move duplicate preemption stat vars into sched_shim.c

Tested by:      pho
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D54831
a84a39dfe5d1fd98afdf29a74017fce29441b730 Konstantin Belousov 2026-01-24 06:01:48

kern/sched: deduplicate sdt probes

Tested by:      pho
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D54831
9409e86980302cd495376861de3475b78734bc37 Konstantin Belousov 2026-01-24 06:16:42

kern/sched: deduplicate dtrace hook vars

Tested by:      pho
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D54831
783b8a0fd880255a8315db7f59d0450bd7276f4d Konstantin Belousov 2026-01-24 06:22:01
lindebugfs: check that name is set as otherwise pfs_alloc_node_flags() panics
I have hit the case multiple times that some LinuxKPI field may not be
set during driver bringup and lindebugfs would cause a panic.
The backtrace goes like:

  strlen() at strlen+0x54
  pfs_create_dir() at pfs_create_dir+0x41
  debugfs_create_dir() at debugfs_create_dir+0xa1
  ...

While the problem is clearly in LinuxKPI or the driver, we likely
should at least add an assert to pfs_create_dir() if name is NULL
like we have for pfs_add_node() but for lindebugfs at least make
this a graceful error and continue without creating the dir instead
of panicing.

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
Reviewed by:    kevans
Differential Revision: https://reviews.freebsd.org/D54944
4b32fdb4a614de602d288ac5a414cb43e9f2163e Bjoern A. Zeeb 2026-01-29 11:16:50
SCHED_4BSD: maybe_resched() cannot schedule ast() for curthread
maybe_resched() needs to schedule TDA_SCHED for curthread, but this
requires taking curthread lock while owning some other thread lock.
To avoid introducing the order:
- Use a scheduler-private TDP flag.
- Register an unconditional TDA_SCHED_PRIV for 4BSD.
When an AST needs to be scheduled, i.e. the current thread must do
context switch in the return to userspace path, set the flag.
Then the ast handler calls ast_scheduler(), which gives the same
effect as scheduling TDA_AST.

The overhead is a single function call on each userspace return, for
4BSD case.

Reported and tested by: pho (previous version)
Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D54945
b249cb2b18b3fddae186d45fe6d984fc7bde10c4 Konstantin Belousov 2026-01-29 08:09:00
firmware: Fix inverted FIRMWARE_GET_NOWARN logic
The try_binary_file() function has inverted logic for the
FIRMWARE_GET_NOWARN flag.  When the flag is set (meaning "don't warn"),
the code sets warn=true and makes noise anyway.

Invert the assignment to warn to correctly suppress warnings when
FIRMWARE_GET_NOWARN is set.

Reviewed by:    kevans
Differential Revision:  https://reviews.freebsd.org/D54955
fdcd67be8274d237ae2c87d6475d9d34b440b8d8 Abdelkader Boudih 2026-01-30 00:02:47
ktrcsw(): should not be called when the thread is owning interlock or on sleepq
The issue is that for ktrcsw() we lock the ktrace_mtx mutex while owning
the interlock from a subsystem that called msleep().  In particular, the
VM subsystem might call msleep() if page allocation failed.  This
establishes order VM locks (e.g. domain free queue lock) -> ktrace_mtx.
Calling free() while owning ktrace_mtx gives the reverse order.

Worse, msleep_spin_sbt() call s ktrcsw() while the thread is put on
sleep queue.  Then, since the mutex might be contested, the thread needs
to be put on turnstil, which cannot work.

Move the ktrcsw() call for switch-out after the wakeup, when the thread
does not yet re-obtained any locks.  From there, we call a special
version of ktrcsw(), which is passed the actual time when the context
switch occured.

The drawback is that the switch-out record is only written in the
ktrace.out file after the switch-in occurred, but this is probably not
too serious.

Reported and tested by: pho
Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D54831
245157fd8a382c3989075789ee98582665f3b31d Konstantin Belousov 2026-01-22 21:46:01
riscv: Enable the zifencei extension explicitly in -march
clang is more tolerant and implies this extension whereas GCC is
stricter and requires it to be included.

Reviewed by:    mhorne
Differential Revision:  https://reviews.freebsd.org/D54965
31b259049e2b932ae6527d1dc850c2bec58e94e0 John Baldwin 2026-01-31 17:10:56
libkern: Add libcalls for ffs and __ffsdi2
These are needed when compiling a RISC-V kernel with GCC which does
not inline __builtin_ffs*.

The __ffsdi2 is adapated from the previous ffsl.c.

This partially reverts commit f4db342d44198973c1c7b9005d0c5683a582707e.

Reviewed by:    mhorne
Differential Revision:  https://reviews.freebsd.org/D54967
4c822dd4a15c533c08271b2286da949fffafc89e John Baldwin 2026-01-31 17:20:50
riscv: Add ffs.c and ffsdi2.c
These are only needed for GCC, but it doesn't hurt to include these
always.

Reviewed by:    mhorne
Differential Revision:  https://reviews.freebsd.org/D54968
f4c40a5acb16e542934ed17ee475183b87420eae John Baldwin 2026-01-31 17:21:11
sctp: fix socket type created by sctp_peeloff()
When calling sctp_peeloff() on a SOCK_SEQPACKET socket, the created
and returned socket has the type SOCK_STREAM.
This is specified in section 9.2 of RFC 6458.

Reported by:    Xin Long
MFC after:      3 days
d195b3783fa4de5c1a95f6d95eb9444abce6778b Michael Tuexen 2026-01-31 18:11:08
arm: Implement kernel ifunc
Add kernel ifunc support on arm.

MFC after :     3 weeks
Reviewed by:    kib (previous version)
Differential Revision:  https://reviews.freebsd.org/D54970
d78cbf483fe73c987573967042f57f15bf590629 Michal Meloun 2026-01-24 10:41:10

Build system

native-xtools: use static LLVM libraries
Set the MK_LLVM_LINK_STATIC_LIBRARIES knob to "yes" when building the
native-xtools target. This reverts to the behaviour prior to
2e47f35be5dc.

This avoids a build failure that occurs otherwise, where compilation
fails looking for a libllvmprivate.so that was not built.

It is unclear if this addresses the issue in all instances---some
replies in the PRs indicate otherwise. Still, some report success, and
in my own testing this fixed creation of a cross-compiled poudriere
jail. Commit this while we continue to investigate...

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=286710, https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=291409
Tested by:      marck, rdunkle@smallcatbrain.com
Reviewed by:    emaste
MFC after:      3 days
Fixes:  https://cgit.freebsd.org/src/commit/?id=2e47f35be5dc ("Convert libllvm, libclang and liblldb into private shared libraries").
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D54815
38e5564ecef53064c984d086a040c01100023f40 Mitchell Horne 2026-01-26 14:58:55
METALOG: Order keyword entries
To facilitate comparison with mtree -C generated output, keep the
keywords ordered.

No functional change intended.

Reviewed by:    imp
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D54872
fe962e33d86f888b496b17251c8bedebf92be8ee Jose Luis Duran 2026-01-26 20:19:44
libc: document posix_spawnattr_{get,set}procdescp_np(3)
Reviewed by:  asomers
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D54899
77c5f29453ed3dbb4ba1a372329ab32ec27c998d Konstantin Belousov 2026-01-26 20:06:44
bhyve: make BHYVE_SNAPSHOT amd64-only
Build fails with BHYVE_SNAPSHOT enabled on non-amd64,
so add it to BROKEN_OPTIONS for these arches.

PR:                     https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292686
Reviewed by:            emaste, markj
MFC after:              3 days
Sponsored by:           The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D54873
b01763b2b2ab2d87f7d3c6ae57783c731ce548dd Roman Bogorodskiy 2026-01-26 18:24:15
bsd.sys.mk: Silence a few GCC warnings for C++
These warnings were already marked with -Wno-error=, but they trigger
so many false positives in libc++ headers to be utterly useless for
C++ code, so disable them entirely for C++.

Reviewed by:    imp, dim
Differential Revision:  https://reviews.freebsd.org/D54867
6fb87a1a6042887550571316fa9e539239f158d1 John Baldwin 2026-01-27 18:39:05
kyua: Workaround unclear warning from GCC
GCC 15 does not like a push_back() invocation in utils::find_core()
and incorrectly believes libc++ will free a non-heap pointer.  Disable
the warning to pacify GCC.

In function 'void std::__1::__libcpp_operator_delete(_Args ...) [with _Args = {void*, long unsigned int}]',
    inlined from 'void std::__1::__do_deallocate_handle_size(void*, size_t, _Args ...) [with _Args = {}]' at /usr/obj/.../amd64.amd64/tmp/usr/include/c++/v1/new:298:39,
    inlined from 'void std::__1::__libcpp_deallocate(void*, size_t, size_t)' at /usr/obj/.../amd64.amd64/tmp/usr/include/c++/v1/new:311:39,
    inlined from 'void std::__1::allocator<_Tp>::deallocate(_Tp*, size_t) [with _Tp = utils::fs::path]' at /usr/obj/.../amd64.amd64/tmp/usr/include/c++/v1/__memory/allocator.h:132:31,
    inlined from 'static void std::__1::allocator_traits<_Alloc>::deallocate(allocator_type&, pointer, size_type) [with _Alloc = std::__1::allocator<utils::fs::path>]' at /usr/obj/.../amd64.amd64/tmp/usr/include/c++/v1/__memory/allocator_traits.h:314:19,
    inlined from 'std::__1::__split_buffer<_Tp, _Allocator>::~__split_buffer() [with _Tp = utils::fs::path; _Allocator = std::__1::allocator<utils::fs::path>&]' at /usr/obj/.../amd64.amd64/tmp/usr/include/c++/v1/__split_buffer:365:31,
    inlined from 'std::__1::vector<_Tp, _Alloc>::pointer std::__1::vector<_Tp, _Alloc>::__push_back_slow_path(_Up&&) [with _Up = utils::fs::path; _Tp = utils::fs::path; _Allocator = std::__1::allocator<utils::fs::path>]' at /usr/obj/.../amd64.amd64/tmp/usr/include/c++/v1/vector:1504:1,
    inlined from 'void std::__1::vector<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = utils::fs::path; _Allocator = std::__1::allocator<utils::fs::path>]' at /usr/obj/.../amd64.amd64/tmp/usr/include/c++/v1/vector:1526:34,
    inlined from 'utils::optional<utils::fs::path> utils::find_core(const fs::path&, const process::status&, const fs::path&)' at contrib/kyua/utils/stacktrace.cpp:217:25:
/usr/obj/.../amd64.amd64/tmp/usr/include/c++/v1/new:274:38: error: 'void operator delete(void*, size_t)' called on pointer '<unknown>' with nonzero offset [24, 9223372036854775807] [-Werror=free-nonheap-object]
  274 |   __builtin_operator_delete(__args...);
      |                                      ^
In function 'void* std::__1::__libcpp_operator_new(_Args ...) [with _Args = {long unsigned int}]',
    inlined from 'void* std::__1::__libcpp_allocate(size_t, size_t)' at /usr/obj/.../amd64.amd64/tmp/usr/include/c++/v1/new:289:31,
    inlined from '_Tp* std::__1::allocator<_Tp>::allocate(size_t) [with _Tp = utils::fs::path]' at /usr/obj/.../amd64.amd64/tmp/usr/include/c++/v1/__memory/allocator.h:118:54,
    inlined from 'constexpr std::__1::__allocation_result<typename std::__1::allocator_traits<_Alloc>::pointer> std::__1::__allocate_at_least(_Alloc&, size_t) [with _Alloc = allocator<utils::fs::path>]' at /usr/obj/.../amd64.amd64/tmp/usr/include/c++/v1/__memory/allocate_at_least.h:41:27,
    inlined from 'std::__1::__split_buffer<_Tp, _Allocator>::__split_buffer(size_type, size_type, __alloc_rr&) [with _Tp = utils::fs::path; _Allocator = std::__1::allocator<utils::fs::path>&]' at /usr/obj/.../amd64.amd64/tmp/usr/include/c++/v1/__split_buffer:353:49,
    inlined from 'std::__1::vector<_Tp, _Alloc>::pointer std::__1::vector<_Tp, _Alloc>::__push_back_slow_path(_Up&&) [with _Up = utils::fs::path; _Tp = utils::fs::path; _Allocator = std::__1::allocator<utils::fs::path>]' at /usr/obj/.../amd64.amd64/tmp/usr/include/c++/v1/vector:1498:47,
    inlined from 'void std::__1::vector<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = utils::fs::path; _Allocator = std::__1::allocator<utils::fs::path>]' at /usr/obj/.../amd64.amd64/tmp/usr/include/c++/v1/vector:1526:34,
    inlined from 'utils::optional<utils::fs::path> utils::find_core(const fs::path&, const process::status&, const fs::path&)' at contrib/kyua/utils/stacktrace.cpp:216:25:
/usr/obj/.../amd64.amd64/tmp/usr/include/c++/v1/new:265:42: note: returned from 'void* operator new(size_t)'
  265 |   return __builtin_operator_new(__args...);
      |                                          ^

Reviewed by:    imp, dim
Differential Revision:  https://reviews.freebsd.org/D54868
5c504c625d1faffd7cc7c3dfece62c72c012b4c5 John Baldwin 2026-01-27 18:39:41
release/tools: use same pkg settings in containers as in /etc/pkg/FreeBSD.conf
Instructions in /etc/pkg/FreeBSD.conf and elsewhere recommend putting
changes in /usr/local/etc/pkg/repos/FreeBSD.conf so bring OCI containers
into line as well.

Reviewed by:    dfr, ivy
Differential Revision:  https://reviews.freebsd.org/D54090

MFC after:      5 days
Sponsored by:   SkunkWerks, GmbH
c73ae67348998a0056145e88debbea9ff6860c4f Dave Cottlehuber 2026-01-27 22:51:22
release: Remove not-NO_ROOT cases
We always use NO_ROOT for release artifact builds, so remove the
alternate code paths.

For the first step we set NO_ROOT unconditionally in cases that invoke
submakes, and turn NO_ROOT being unset into an error in lover-level
targets so that we can catch potential out-of-tree build scripts (or
missed in-tree cases) that expect to run not-NO_ROOT builds.  The second
step will be to remove those entirely.

Reviewed by:    cperciva
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D54179
54e006369c9aab4f3a22f026eb6924c0f9cafda8 Ed Maste 2025-12-11 17:16:53
src.conf.5: Cross-reference uname(1) manual page
Reviewed by:          emaste, ziaee
Differential Revision:  https://reviews.freebsd.org/D54688
eb0fc67c45a0fcedf8d5975f80780240f4ed0680 Artem Bunichev 2026-01-29 17:44:28
src.opts: Remove MK_SOUND artifact
Fixes:                https://cgit.freebsd.org/src/commit/?id=f74f891581bc ("src.opts: Introduce MK_SOUND")
PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=291853
Sponsored by:   The FreeBSD Foundation
MFC after:      4 days
b9289743f40dae677f910be1d3e56198a3a3ff9b Christos Margiolis 2026-01-30 16:14:28
lib/virtual_oss/sndio: Remove trailing backslash
Fixes:                https://cgit.freebsd.org/src/commit/?id=d78291b0e973 ("lib/virtual_oss: don't (over)link to libsamplerate")
Reported by:    pkg-fallout
Sponsored by:   The FreeBSD Foundation
MFC after:      2 days
c88f012faa13c39f13efdcef88d3141253a300ab Christos Margiolis 2026-01-30 16:20:48
release: Ship firmware from kmods repo on DVD
The packages for X.Y-RELEASE are a snapshot of the quarterly branch
for stable/X, i.e. typically built on X.(Y-1)-RELEASE.  (The case of
Y=0 is an exception for obvious reasons.)  This works for most ports
but not for kernel modules, which may need to be built on the release
in question; this is why we have a separate "kmods" repository.

Make sure that we put the packages from the kmods repository onto the
mini-pkg-repo on the DVD rather than shipping unusable firmware.

Reviewed by:    bz
MFC after:      1 week
Sponsored by:   https://www.patreon.com/cperciva
Differential Revision:  https://reviews.freebsd.org/D52581
bda8028146694ee490543b35e3349e060936fde4 Colin Percival 2025-09-16 18:43:36
tests: sys/capsicum/functional requires mqueuefs
Skip this test if mqueuefs isn't loaded.  Unfortunately, that will skip
the entire googletest test program, including test cases that don't
require mqueuefs.  But the test's own skipping logic doesn't work, and
we don't yet have a googletest-compatible require_kmods() function.

MFC after:      2 weeks
Sponsored by:   ConnectWise
Reviewed by:    emaste, ngie
Differential Revision: https://reviews.freebsd.org/D54902
df68a09ea2ec18ee975fb937d46a18250d4663c8 Alan Somers 2026-01-27 00:04:58
wlanstat: Drop unneeded bsd.compiler.mk from Makefile
No functional change, but downstream in CheriBSD this was causing a
link error as the Makefile was overriding CFLAGS set via a side effect
of bsd.compiler.mk.

Reviewed by:    bz, brooks, emaste
Sponsored by:   AFRL, DARPA
Differential Revision:  https://reviews.freebsd.org/D54894
6e82cb29066765c03408a81c9bec4ed0d99cab81 John Baldwin 2026-01-31 16:58:39
stand: Add compiler builtins needed by GCC for RISC-V
Reviewed by:  mhorne
Differential Revision:  https://reviews.freebsd.org/D54963
fe45651224bea513c7db88abbc53bd1241ab442f John Baldwin 2026-01-31 17:10:36
Remove example tests when MK_EXAMPLES=no
This change cleans up example tests for atf, googletest, plain, and TAP
when MK_EXAMPLES=no. Not having this in results
`kyua test -k /usr/tests/share/examples/Kyuafile` being broken on a host
where the content in that directory tree is stale. I ran into that case
because at some point in time in the past I had specified
`MK_GOOGLETEST=no` one of my dev instances.

MFC after:      1 week
cea2683bb691d6cbcfb7e342c497d018bba712c2 Enji Cooper 2026-02-01 17:12:44

Internal organizational stuff

CODEOWNERS: Add myself to capsicum-test
5b036b25853349cd3cf26495e628276f79f29c42 Ed Maste 2026-01-27 15:28:39
CODEOWNERS: Add myself to Heimdal and MIT KRB5
19a913c4ed9df1b220dfedfe02ee4d8d90cbccce Cy Schubert 2026-01-27 15:47:36
CODEOWNERS: Add myself to WPA
af9d11303c9bba56d78c79d2b4832f3549f4f0d3 Cy Schubert 2026-01-27 15:49:29

Testing

procdesc: Add a test for pid recycling behavior
MFC With:     09984871d8caff9263b955a94bb9fb5354af1b4c
Sponsored by:   ConnectWise
e35df41f68916cc23893a29e0284f386ec727462 Alan Somers 2026-01-13 00:45:23
Add tests for pdrfork
MFC With:     5c2ee618d5ec21f110c4da40e9f17833b2ab8b76
Sponsored by:   ConnectWise
d1e6057fa47e842c63461b64b29ac5d3e9fdad76 Alan Somers 2026-01-25 16:13:43
Add tests for pdwait
MFC With:     4d707825bf62ee73a32b615846eff9c4a9bda538
Sponsored by:   ConnectWise
277539ae7f2f07a8dd29d4deb318d66414f8ae2a Alan Somers 2026-01-25 16:14:03
pf tests: Set require.kmods in divert-to tests
Tests should declare their dependencies rather than testing for them at
runtime.

Reviewed by:    igoro, kp, glebius
MFC after:      2 weeks
Sponsored by:   OPNsense
Sponsored by:   Klara, Inc.
Differential Revision:  https://reviews.freebsd.org/D54846
8934c3dc780d6631cb23e4d98c7b988da9a5b703 Mark Johnston 2026-01-26 17:24:25
tests/kern: make ssl_sendfile:truncate and ssl_sendfile:grow less flaky
First problem is a trivial race that the client thread doesn't see updated
c.sbytes.  Second problem applies only to the truncate test.  On a machine
with huge default buffer sizes, there is a chance that sendfile(2) will
fill both buffers with amount of data that is larger than the size we plan
to truncate.  To minimise chances for this scenario, increase file size
and truncate it less aggressively, also try to decrease buffer sizes.
8a9508563542d709b1a42a065e6e99e004a8b3fe Gleb Smirnoff 2026-01-27 21:13:11
capsicum-test: Move out of contrib
Google developed the Capsicum unit test suite[1] as part of the
Capsicum-Linux[2] project, based on unit tests that existed in FreeBSD
and unit tests developed as part of the initial Capsicum-Linux port.

Capsicum-Linux was archived as of October 31, 2022 and is no longer
being maintained.  FreeBSD is currently the only consumer of and
contributor to the test suite.  Move the src into tests/sys/capsicum to
simplify ongoing maintenance.

The makefiles were deleted as we (continue to) use the existing bespoke
FreeBSD Makefile, and CONTRIBUTING.md was removed as the Google CLA is
no longer applicable.

[1] https://github.com/google/capsicum-test
[2] https://github.com/google/capsicum-linux

Reviewed by:    asomers, oshogbo
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D54917
670b568ec1c36464c6d55e400382c290b0391ccf Ed Maste 2026-01-27 13:28:23
Commit group #6: touch
touch: Tests for -h flag

Reviewed by:    kevans
Approved by:    kevans
Sponsored by:   Klara, Inc.
Differential Revision:  https://reviews.freebsd.org/D54836
21efed6cd8442ba9abb6c8a7e54a2433de9bfc60 Aymeric Wibo 2026-01-23 17:48:13

touch: Test for -a flag

Reviewed by:    kevans
Approved by:    kevans
Sponsored by:   Klara, Inc.
Differential Revision:  https://reviews.freebsd.org/D54852
578b4ec8f1a4134027e66a156e6cf801284aab14 Aymeric Wibo 2026-01-23 22:57:58

touch: Test for -m flag

Reviewed by:    kevans
Approved by:    kevans
Sponsored by:   Klara, Inc.
Differential Revision:  https://reviews.freebsd.org/D54853
5a733026088f68a0171584045af968d1ea83804b Aymeric Wibo 2026-01-23 22:59:48
ip6_output tests: Remove an unused import
No functional change intended.

MFC after:      1 week
Sponsored by:   Stormshield
Sponsored by:   Klara, Inc.
1539a657adb4363e7f12d6fd4c1c8ed2e2d842af Mark Johnston 2026-01-30 15:27:22

Style, typos, and comments

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

atf_python: Fix a typo in a type annotation
No functional change intended.

MFC after:      1 week
Sponsored by:   Stormshield
Sponsored by:   Klara, Inc.
ef389b7f581b2500c0e18c0989a54465712cd175 Mark Johnston 2026-01-27 14:57:31
stand: fix typo in common/nvstore.c
Some out of order chars.
da33cae6c785015329be9cdcf35f51e59807129c Toomas Soome 2026-01-28 08:38:26
usb: indentation (whitespace change only)
No functional change.

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
0762cf10fc5e426700e00f9060518241212e941f Bjoern A. Zeeb 2026-01-29 11:17:52
netstat: Fix whitespace in libxo output for multicast routes
Also fix some bogus libxo format strings in mroute6.c, and close a
couple of lists instead of opening them twice.

Fixes:          https://cgit.freebsd.org/src/commit/?id=ade9ccfe211a ("Convert netstat to use libxo.")
MFC after:      2 weeks
Sponsored by:   Stormshield
Sponsored by:   Klara, Inc.
34c3e1d718a86436f863b2ae8b91bcf406b37f0e Mark Johnston 2026-01-30 20:30:58
clang-format: adjust to sort C++ headers per style(9)
Many standard C++ headers do not have the .h file extension: some, such as
`iostream`, lack it; others have a .hpp file extension. Moreover, some
projects (like ATF/Kyua) also contain .ipp files, which are C++ "interface"
files.

Relax the regular expression to ensure that non-traditional C "system"
headers, C++ headers, etc, with angle brackets are sorted before
"local" headers.

MFC after:      1 week
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D54401
ab9b04736945537743eb0624ead7a4fa4b960783 Enji Cooper 2026-01-31 04:14:07
ath_hal(4): Fix a typo in a source code comment
- s/arithmatic/arithmetic/

MFC after:      5 days
a17659fe260ce16c1e373b543ca9f13cc14340ea Gordon Bergling 2026-01-31 15:20:32
cpufreq(4): Fix a typo in a source code comment
- s/transcation/transaction/

MFC after:      5 days
0a3e7ba466376b46672b56c991c09cde528b9729 Gordon Bergling 2026-01-31 15:22:00

Contrib code

Add pdrfork to OpenBSM
It's necessary for auditd to be able to log its events.  Note that the
recently added pdwait() syscall is only auditable because an audit event
of that name was preemptively added back in 2012.

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292739
MFC after:      1 week
Fixes:          https://cgit.freebsd.org/src/commit/?id=5c2ee618d5e "sys: add pdrfork(2)"
Sponsored by:   ConnectWise
Reviewed by:    kib
Differential Revision: https://reviews.freebsd.org/D54897
6253212608b4f513b1e298f11a630d9d0596560d Alan Somers 2026-01-26 19:10:50
Merge commit 81b20e110b3f from llvm git (by Roland McGrath):
    [libc++] Work around new GCC 15 type_traits builtins that can't be
    used as Clang's can (#137871)

    GCC 15 has added builtins for various C++ type traits that Clang
    already had.  Since `__has_builtin(...)` now finds these, the #if
    branches previously only used for Clang are now used for GCC 15.
    However, GCC 15 requires that these builtins only be used in type
    aliases, not in template aliases.

    For now, just don't use the `__has_builtin(...)` branches under newer
    GCC versions, so both 14 and 15 work during the transition.  This
    can be cleaned up later to use all the GCC 15 builtins available.

    Fixed: #137704
    Fixed: #117319

Reviewed by:    dim
Differential Revision:  https://reviews.freebsd.org/D54865
bfc6e56f6327621171cef4fe29290c63edfc4d9c John Baldwin 2026-01-27 18:34:58
netbsd-tests t_regex_att: Use __nonstring for a non-string constant
Fixes the following warning from GCC 15:

contrib/netbsd-tests/lib/libc/regex/t_regex_att.c:54:30: error: initializer-string for array of 'char' truncates NUL terminator but destination lacks 'nonstring' attribute (4 chars into 3 available) [-Werror=unterminated-string-initialization]
   54 | static const char delim[3] = "\\\\\0";
      |                              ^~~~~~~~

Reviewed by:    ngie, imp, dim
Differential Revision:  https://reviews.freebsd.org/D54866
2dea50a661b903513efc42e270c4e6f5c2b89bc3 John Baldwin 2026-01-27 18:38:31
openssl: Fix multiple vulnerabilities
This is a rollup commit from upstream to fix:
  Improper validation of PBMAC1 parameters in PKCS#12 MAC verification (CVE-2025-11187)
  Stack buffer overflow in CMS AuthEnvelopedData parsing (CVE-2025-15467)
  NULL dereference in SSL_CIPHER_find() function on unknown cipher ID (CVE-2025-15468)
  "openssl dgst" one-shot codepath silently truncates inputs >16MB (CVE-2025-15469)
  TLS 1.3 CompressedCertificate excessive memory allocation (CVE-2025-66199)
  Heap out-of-bounds write in BIO_f_linebuffer on short writes (CVE-2025-68160)
  Unauthenticated/unencrypted trailing bytes with low-level OCB function calls (CVE-2025-69418)
  Out of bounds write in PKCS12_get_friendlyname() UTF-8 conversion (CVE-2025-69419)
  Missing ASN1_TYPE validation in TS_RESP_verify_response() function (CVE-2025-69420)
  NULL Pointer Dereference in PKCS12_item_decrypt_d2i_ex function (CVE-2025-69421)
  Missing ASN1_TYPE validation in PKCS#12 parsing (CVE-2026-22795)
  ASN1_TYPE Type Confusion in the PKCS7_digest_from_attributes() function (CVE-2026-22796)

See https://openssl-library.org/news/secadv/ for additional details.

Approved by:    so
Obtained from:  OpenSSL
Security:       FreeBSD-SA-26:01.openssl
Security:       CVE-2025-11187
Security:       CVE-2025-15467
Security:       CVE-2025-15468
Security:       CVE-2025-15469
Security:       CVE-2025-66199
Security:       CVE-2025-68160
Security:       CVE-2025-69418
Security:       CVE-2025-69419
Security:       CVE-2025-69420
Security:       CVE-2025-69421
Security:       CVE-2026-22795
Security:       CVE-2026-22796
9c151e1fbf1a71a4912afa9693a39d55a00db4eb Gordon Tetlow 2026-01-26 18:14:21
netbsd-tests: Fix regcomp_too_big flakiness
The test sometimes crashes with ASLR enabled.  This seems to happen when
regcomp() grows the process stack and happens to run into the virtual
memory limit set at the beginning of the test.  ASLR triggers the
problem since it introduces a bit of fragmentation and thus introduces
cases where stack allocation can be the trigger of virtual memory
exhaustion, rather than dynamic memory allocation in regcomp().

Make the test stable by priming the stack before doing anything else.
This effectively reserves 16MB of virtual memory for the stack, which in
practice is enough to make the test stable on amd64.

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=259971
Reviewed by:    ngie, emaste
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D54880
938915a22c84af88afa587694e8d63ce9dd202f4 Mark Johnston 2026-01-27 21:08:35
GoogleTest: import 1.17.0
The changes between the two versions can be found in this diff of the
two release tags:
https://github.com/google/googletest/compare/v1.15.2...v1.17.0

One notable change is that GoogleTest 1.17.0 now requires C++-17 to
build.

MFC after:      1 week
Merge commit '3a4c29b5bed4ea20266ad9371fbfdc6bca088f92'
46333229c6a0187ebf231805682ee0bceed704d1 Enji Cooper 2026-01-29 01:24:01
gtest.cc: declare fail_if_no_test_linked flag
Clang's -Wmissing-variable-declarations flags this as an issue since the
flag is only used in `gtest.cc`. Declare the flag beforehand to ensure
that the variable scope is properly limited to `gtest.cc`.

MFC after:      1 week
MFC with:       46333229c6a0187ebf231805682ee0bceed704d1
Ref:            https://github.com/google/googletest/pull/4898
3926ae98adfe4b2f1dd957cab353ba7ca11ce709 Enji Cooper 2026-01-29 01:22:42
openssl: import 3.5.5
This change adds OpenSSL 3.5.5 from upstream [1].

The 3.5.5 artifact was been verified via PGP key [2] and by SHA256 checksum [3].

This is a security release, but also contains several bugfixes. All of
the CVE-worthy issues have already been addressed on the target
branch(es), so the net-result is that this is a bugfix release.

More information about the release (from a high level) can be found in
the release notes [4].

MFC after:      1 week

1. https://github.com/openssl/openssl/releases/download/openssl-3.5.5/openssl-3.5.5.tar.gz
2. https://github.com/openssl/openssl/releases/download/openssl-3.5.5/openssl-3.5.5.tar.gz.asc
3. https://github.com/openssl/openssl/releases/download/openssl-3.5.5/openssl-3.5.5.tar.gz.sha256
4. https://github.com/openssl/openssl/blob/openssl-3.5.5/NEWS.md

Merge commit '808413da28df9fb93e1f304e6016b15e660f54c8'
f25b8c9fb4f58cf61adb47d7570abe7caa6d385d Enji Cooper 2026-01-31 22:00:39
Commit group #7: OpenSSL: update vendor sources to match 3.5.5 content
OpenSSL: update vendor sources to match 3.5.5 content

MFC with:       f25b8c9fb4f58cf61adb47d7570abe7caa6d385d
MFC after:      1 week
1731fc70f7344af08db49b06c63c963fa12ee354 Enji Cooper 2026-01-31 22:06:28

OpenSSL: commit sys/crypto changes for 3.5.5

These files were changed as part of the 3.5.4 -> 3.5.5 upgrade. Please
see the upstream release notes linked in
1731fc70f7344af08db49b06c63c963fa12ee354, et al, for more details.

MFC after:      6 days
MFC with:       1731fc70f7344af08db49b06c63c963fa12ee354
Fixes:  https://cgit.freebsd.org/src/commit/?id=1731fc70f7344af08d ("OpenSSL: update vendor sources to match 3.5.5 content")
e6c8997a8958c7aaec8e266d2eeefbfaa137e218 Enji Cooper 2026-02-01 17:05:55
contrib/spleen: Update to 2.2.O
This release adds several new characters critical to the manual pages
that were previously missing on high-dpi displays: em-dash, en-dash,
hyphen, angle brackets, white square, dagger, and double dagger. It
also features improved alignment for numerous characters in different
sizes.

Thanks:         Fredric Cambus
MFC after:      3 days
Discussed with: emaste
0d602f923ed8a889c3a848ab9f19aa52f917f6ee Alexander Ziaee 2026-02-01 15:25:11

Reverted commits

Commit & revert pair: src.opts.mk: Enable LLDB by default globally
src.opts.mk: Enable LLDB by default globally

Previously it was enabled for all architectures except but RISC-V.
Upstream made significant progress on RISC-V support over the last
year[1], and although there's still some FreeBSD-specific work to do we
can start building it now.

[1] https://jonasdevlieghere.com/post/lldb-2025/

Sponsored by:   The FreeBSD Foundation
c59a47dc6c016dff74466cecb160459980a5d782 Ed Maste 2026-01-22 19:10:12

Revert "src.opts.mk: Enable LLDB by default globally"

This breaks the riscv64 build; clearly the version we have in-tree is
not new enough to work. That or our build system needs tweaking. Either
way, we're not ready for this, and enabling it without testing was
misguided.

This reverts commit c59a47dc6c016dff74466cecb160459980a5d782.
ba56760a4789af06b8b7173700c1f14996ef9b5e Jessica Clarke 2026-01-30 01:11:13

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-02-09 19:12:17+00:00.

This work is supported by Tarsnap Backup Inc.

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