FreeBSD git weekly: 2026-02-02 to 2026-02-08

Introduction

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

Table of contents and commits per category:

(1) Highlighted commits (these are copies, not in stats)
15 7.1% Userland programs
10 4.7% Documentation
69 32.5% Hardware support
10 4.7% Networking
18 8.5% System administration
10 4.7% Libraries
2 0.9% Filesystems
22 10.4% Kernel
20 9.4% Build system
4 1.9% Internal organizational stuff
5 2.4% Testing
16 7.5% Style, typos, and comments
7 3.3% Contrib code
4 1.9% Reverted commits
0 0.0% Unclassified commits
212 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.

daemon: Add option for output file mode
The daemon utility has always created its output file with a fixed mode
of 0600. This causes issues for log collection setups where the collector
does not run as root but instead relies on group access to the watched
daemon’s log file.

Introduce a new option that allows specifying the output file mode using
install(1)-style semantics. This enables non-root log collectors to access
the file as intended and improves compatibility with log rotation tools.

Reviewed by:    kevans
MFC after:      1 week
Relnotes:       yes
Differential Revision:  https://reviews.freebsd.org/D54930
a3b90a1f008365d9f62773998f89f9c872e2bed5 Michael Osipov 2026-01-28 18:49:26

Userland programs

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

Commit group #0: diff
diff: fix support for -l with new diff algorithm

MFC After: 3 days
Reviewed by:    des
Differential Revision:  https://reviews.freebsd.org/D55052
4d73b07d02d12cdff0558d3ca6c4b3224cae831f Baptiste Daroussin 2026-02-02 15:43:29

diff: use pdwait(2) instead of homemade one

MFC After:      3 days
Reviewed by:    des
Differential Revision:  https://reviews.freebsd.org/D55053
0ec58e7c2e533a15eabfe8dca4a14e9ae93de4b5 Baptiste Daroussin 2026-02-02 15:44:34

diff: remove useless include as kevent is not used anymore

MFC After:      3 days
c479817f30b2d2500c9663a1a07c74ba19321416 Baptiste Daroussin 2026-02-02 16:13:55
diff3: use pdwait instead of homemade one
MFC After:    3 days
404753664a5e145d98f1749d1c7bc046c8aa32c3 Baptiste Daroussin 2026-02-02 16:29:49
runat: Add -h to manipulate a symlink's named attribute dir
Lionel Cons <lionelcons1972@gmail.com> requested
that a new option be added to runat(1) so that it could
be used to manipulate named attributes associated with
a symbolic link and not the file the symbolic link refers to).

This patch adds the option -h/--nofollow to do this.

Requested by:   Lionel Cons <lionelcons1972@gmail.com>
Reviewed by:    kib
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D55023
4bfb7cfb70e62bc316de9e73cfd63a5c85541154 Rick Macklem 2026-02-02 22:38:13
touch: Fix setting time of created file if fstat() fails
Previously, if creating the file and fstat() fails, we would've ended up
calling utimensat() on that file anyways with whatever was in sb.  Not
that this is an error likely to happen...

We don't check for the return value of close() as we aren't writing
anything to the file and the file is always created on success of
open().

Reviewed by:    kevans
Approved by:    kevans
Fixes:  https://cgit.freebsd.org/src/commit/?id=cb54c500d0e1 ("touch: don't leak descriptor if fstat(2) fails")
Sponsored by:   Klara, Inc.
Differential Revision:  https://reviews.freebsd.org/D55117
MFC after: 1 week
b8d55a86995b5a8db5d1651c8dc9fc5093b67d2c Aymeric Wibo 2026-02-04 20:58:13
diff: Print an error message on I/O error
If an error occurs while atomizing either file, immediately print an
error message using the error code returned by the atomizer, and set
the error bit in the exit status.

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292198
MFC after:      1 week
Sponsored by:   Klara, Inc.
Reviewed by:    thj, kevans
Differential Revision:  https://reviews.freebsd.org/D55109
55f160fb07eaee977c89bdee7bdd83f4d21f5adf Dag-Erling Smørgrav 2026-02-05 14:39:39
Commit group #1: diff: Don't compare a file or directory to itself
diff: Fix integer overflows in Stone algorithm

Fix integer overflows that may occur when the context window is very
large and add tests to exercise those conditions.

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=267032
MFC after:      1 week
Sponsored by:   Klara, Inc.
Reviewed by:    thj, kevans
Differential Revision:  https://reviews.freebsd.org/D55110
5fc739eb5949620da911db2f87ca8faedc549d3a Dag-Erling Smørgrav 2026-02-05 14:39:43

diff: Add test case for pagination resource leak

The pagination code leaks either processes or descriptors or both,
depending on the exact version of the code you have.  Add a test case
which exercises this leak to facilitate fixing it.

MFC after:      1 week
Sponsored by:   Klara, Inc.
Reviewed by:    thj, kevans
Differential Revision:  https://reviews.freebsd.org/D55111
270492602b9bd8b8fce4f021f055804978bf3f23 Dag-Erling Smørgrav 2026-02-05 14:39:47

diff: Don't compare a file or directory to itself

While here, stop abusing struct dirent for something we don't even need
to store.

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=254455
MFC after:      1 week
Sponsored by:   Klara, Inc.
Reviewed by:    thj, kevans
Differential Revision:  https://reviews.freebsd.org/D55113
590126789c841d80655869bc075c8980c173dd1c Dag-Erling Smørgrav 2026-02-05 14:39:57

diff: Fix build

rc must be defined first.

Fixes:          https://cgit.freebsd.org/src/commit/?id=590126789c84
MFC after:      1 week
X-MFC with:     590126789c84
ee44ab936e84bacaa49847d36aabdf280f9fecce Cy Schubert 2026-02-05 15:18:09

diff: Correctly declare tests

Sponsored by:   Klara, Inc.
Fixes:          https://cgit.freebsd.org/src/commit/?id=5fc739eb5949 ("diff: Fix integer overflows in Stone algorithm")
Fixes:          https://cgit.freebsd.org/src/commit/?id=270492602b9b ("diff: Add test case for pagination resource leak")
Fixes:          https://cgit.freebsd.org/src/commit/?id=590126789c84 ("diff: Don't compare a file or directory to itself")
157d6664aeb815db3b758bd3038fd1512a0f4e2c Dag-Erling Smørgrav 2026-02-05 16:21:22
diff: Fix pagination leak
* Drop an unnecessary variable and rename pidfd to procd.

* Rewinding stdout serves no purpose, so stop doing it.

* Don't bother freeing memory or setting the global status right
  before erroring out.

* Error out if dup(2) or dup2(2) fail.

* In the unlikely case that our pipe is equal to stdout, we need to
  record that information so we don't close it when cleaning up.

* Don't bother closing a descriptor before dup2(2)ing to it.

* Don't forget to close the the process descriptor after reaping the
  child process.

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=266592
MFC after:      1 week
Sponsored by:   Klara, Inc.
Reviewed by:    kevans, markj
Differential Revision:  https://reviews.freebsd.org/D55112
c3904a7de78ca1ca15fcdf4c09f9d4be7f6fe6f5 Dag-Erling Smørgrav 2026-02-05 14:39:53
diff: Report I/O errors in Stone algorithm
In the legacy Stone algorithm, we do a first pass over the files to
check if they're identical before we start diffing them.  That code
would correctly set the exit status if an I/O error was encountered,
but would not emit an error message.  Do so.

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292198
MFC after:      1 week
Sponsored by:   Klara, Inc.
Reviewed by:    thj
Differential Revision:  https://reviews.freebsd.org/D55125
f8c12e6e3874cdd353fb16785da6f4e7eb134cd9 Dag-Erling Smørgrav 2026-02-05 17:41:56
diff: Bump version number
MFC after:    1 week
Sponsored by:   Klara, Inc.
40134060f6583486ad8ab303140fa73960d3de3d Dag-Erling Smørgrav 2026-02-06 00:13:27
m4: Change defn processing order
Currently, defn pushes its arguments on the stack in order, which means
they are then processed in reverse order.  POSIX does not specify what
order they are processed in, which arguably suggests that they should be
processed in the order they are listed.  Push them in reverse order so
they will be processed in their original order.  This matches GNU m4.

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292937
MFC after:      1 week
Sponsored by:   Klara, Inc.
Reviewed by:    obiwac, imp
Differential Revision:  https://reviews.freebsd.org/D55116
25a8168f86a1222388475ce858da405e4d06c1c3 Dag-Erling Smørgrav 2026-02-07 18:16:21

Documentation

Man pages, release notes, etc.

bcmp(3): update manpage to following the Posix Standard
Reviewed by: glebius
Approved by: glebius (mentor)
Differential Revision: https://reviews.freebsd.org/D52980
6d37c3db62ba32a1e95f390e8570722bfa8ff8a5 Pouria Mousavizadeh Tehrani 2026-02-02 06:51:38
socket.2: Cross-reference netintro(4)
netintro(4) is a great manual page that provides a basic introduction to
network facilities, I think it is well worth mentioning in the
socket(2).

I also think we can incorporate this reference somewhere in the text as
well, but I'm not sure, maybe the reference in the SEE ALSO section
would be enough.

Reviewed by:    glebius
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D55032
d0474eda504c8e1dd784c1cde4b65a42adc4e28e Artem Bunichev 2026-02-02 15:11:05
RELNOTES: Add entry for 7f54c65abc67
69f535564125f6c59b02616c806ab7fcf9563878 John Hall 2026-02-02 20:35:19
EVENTHANDLER.9: EVENTHANDLER_REGISTER never fails
Since ecdf4409f910 ("Rework the eventhandler locking [...]"),
EVENTHANDLER_REGISTER() can never return NULL.

Suggested by:   olce
Reviewed by:    olce, ziaee, zlei
Approved by:    olce, zlei
Fixes:  https://cgit.freebsd.org/src/commit/?id=ecdf4409f910 ("Rework the eventhandler locking [...]")
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D55014
9d4bad45e233ca7d93666ff1feff6282a88f8a9d Aymeric Wibo 2026-01-31 15:54:11
sh.1: Fix rendering error due to redundant .El
Due to this all the rest of the items in the Built-in Commands section
were not rendered at all.

Fixes: https://cgit.freebsd.org/src/commit/?id=2711852bd9ac ("sh.1: Provide detailed job control documentation")
MFC after:              3 days
Reviewed by:            emaste, ziaee
Differential Revision:  https://reviews.freebsd.org/D55080
9555d80066c919596e152f923d38d58a740cdb5f Artem Bunichev 2026-02-03 16:14:09
geom.8: Improve classes list into a table
Add missing entries MD, VFS, and DISK. Refactor list into a three
column table, so the data is all visible at once, buying us ten lines
at MANWIDTH 80, and still rendering nicely at MANWIDTH 59.

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292530
MFC after:      3 days
Reported by:    Slawomir Wojciech Wojtczak <vermaden@interia.pl>
dc2ec1ccc17a0c43c736b16a537c01bb28d814a4 Alexander Ziaee 2026-02-05 15:31:29
wpa_supplicant.conf.5: Remove removed variables
2005-09-25 - wpa_supplicant v0.4.5 removed "server_nai"
2008-02-22 - wpa_supplicant v0.6.3 removed "eappsk" and "nai"

PR:                     https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=284126
MFC after:              3 days
Reviewed by:            carlavilla, ziaee
Reported by:            J.R. Oldroyd <fbsd@opal.com>
Differential Revision:  https://reviews.freebsd.org/D49010
c5ee920c3f35c5f0f485a7a274d87ebd91469892 Felix Johnson 2026-02-05 15:46:49
git-arc.1: Refer to new port name
The git-arc script was moved from devel/freebsd-git-devtools to
devel/freebsd-git-arc.

Reviewed by:    ziaee
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D55127
32bd754d4dcd9752b552ff70d68d3c1e1c335d92 Joseph Mingrone 2026-02-05 17:16:05
development.7: Refer to new port name for git-arc
The git-arc script was moved from devel/freebsd-git-devtools to
devel/freebsd-git-arc.

Reviewed by:    ziaee
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D55128
deb3c9dc54c72efcb19fd4c55449ba08f07cba2d Joseph Mingrone 2026-02-05 17:16:30
accf_*.9: Rewrite broken synopsis
These manuals abused the name macro for every line of kernel cfg as well
as an example command to show the module name which was mixed in without
separation. This bugs the whatis database into thinking that `INET` and
`kldload` are names for this page, and violates best practice by mixing
commands and configuration in a continuous example.

Rewrite to use the kernel configuration macro, Cd, and show the module
name via an example configuration in rc.conf, according to the spec and
established practice. Do not bump the date because these markup errors
are not a content change.

MFC after:      3 days
c59f12da11d75502b16f9163edc76514007462db Alexander Ziaee 2026-02-07 21:54:59

Hardware support

Hardware drivers and architecture-specific code.

ig4: Add support for Lunar Lake-M I2C
this patch adds PCI IDs to the ig4(4) driver:
- Lunar Lake-M (0xa878, 0xa879, 0xa87a, 0xa87b)
These controllers use the Tiger Lake hardware revision of the I2C IP.
Adding these IDs enables support for peripherals connected to the I2C Bus.
Tested on: Intel Lunar Lake (LENOVO_MT_21QX_BU_Think_FM_ThinkPad T14s Gen 6)

Signed-off-by: Defenso-EBO <etienne.bonnand@defenso.fr>

MFC after: 2 weeks

Sponsored by: Defenso

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1995
851dffef532ad9611fcaf02318744c8de9f397b0 Defenso-EBO 2026-01-29 09:47:13
hwpmc_amd: Add support for additional counters.
Rather than provide a static table of counters, this change computes the
number of counters that are available by checking several CPUID leafs
and falling back to defaults on older processors.  The limits are set to
support the maximum number of counters of each type.

Sponsored by: Netflix
Reviewed by: imp, mhorne
Pull Request: https://github.com/freebsd/freebsd-src/pull/1983
37bba2ad92d8fa81d70f7a8243b2f42981f44454 Ali Mashtizadeh 2026-01-23 05:34:44
e1000: Fix setting the promiscuous mode
The variable reg_rctl stores the value read from reg E1000_RCTL. It
may contain bits E1000_RCTL_VFE and E1000_RCTL_CFIEN which control
VLAN hardware filter feature. The promiscuous mode implies all tagged
or untagged packets should be accepted, so the VLAN hardware filter
feature should be disabled when enabling the promiscuous mode.
Calling em_if_vlan_filter_disable() did the task, but later writing
the value of reg_rctl back to the reg E1000_RCTL may restore the
feature.

Move the calling of em_if_vlan_filter_disable() after writing the reg
to fix that.

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292759
Reviewed by:    kbowling
Tested by:      vova@zote.me
Fixes:          https://cgit.freebsd.org/src/commit/?id=2796f7cab107 e1000: Fix up HW vlan ops
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D54973
e63ee5fedb8dab51f1bd6d24cc650b68d9663db5 Zhenlei Huang 2026-02-02 12:26:31
smartpqi: Update to vendor version 14.4690.0.2008 - 15.2.0.2008
Update to versions:
FreeBSD14 14.4690.2008
FreeBSD15 15.2.0.2008

Included in this update are:
 - Support for new controllers
 - Add code that utilizes the new BIG_IOCTL_Command_struct and allows
   the I/O buffer size for a single passthrough ioctl to be stored as a
   32 bit integer instead of the original 16 bit integer.
 - Update occurrences of Microsemi to Microchip
 - Some format changes including converting comments from C++ to C
   style, remove instances of /* $FreeBSD$ */, and updating copyright
   dates.

Update to versions:
FreeBSD14 14.4690.2008
FreeBSD15 15.2.0.2008

Included in this update are:

- Support for new controllers

_ Add code that utilizes the new BIG_IOCTL_Command_struct and allows
  the I/O buffer size for a single passthrough ioctl to be stored as
  a 32 bit integer instead of the original 16 bit integer.

- Update occurrences of Microsemi to Microchip

- Some format changes including converting comments from C++ to C
  style, remove instances of /* $FreeBSD$ */, and updating copyright
  dates.

Reviewed by:    imp
Approved by:    imp
MFC after:      1 week

Sponsored by: Microchip Technology Inc.

Differential Revision:  https://reviews.freebsd.org/D54787
7f54c65abc67f50363bbd2a68a980d23e69c9ef0 John Hall 2026-02-02 15:44:23
i386: Fix build and remove empty unused macro
When inlining the macro, reg was not substituted with the %ecx argument
previously passed in. One of the definitions was also left behind as an
empty macro.

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292883
Fixes:          https://cgit.freebsd.org/src/commit/?id=377c053a43f3 ("cpu_switch(): unconditionally wait on the blocked mutex transient")
MFC after:      1 week
9e0fe126714cc0b2045bec16fe8d06dbcd663144 Jessica Clarke 2026-02-02 17:43:50
sym(4): Map HCB memory as uncacheable also on x86
As part of making the chip-specific mix and match of different accesses
(DMA/bus space) work as desired, the intent is to map the HCB memory as
uncacheable. Prior to VM_MEMATTR_*, the !x86 way of indicating this to
bus_dmamem_alloc(9) was BUS_DMA_COHERENT. Then later on in 2db99100a4,
BUS_DMA_NOCACHE was hooked up to VM_MEMATTR_UNCACHEABLE for x86. As it
turns out, still as of today bus_dmamem_alloc(9) differs in this regard
across architectures. On arm, it still supports BUS_DMA_COHERENT only
for requesting uncacheable DMA and x86 still uses BUS_DMA_NOCACHE only.
On arm64 and riscv, BUS_DMA_COHERENT seems to effectively be an alias
for BUS_DMA_NOCACHE.

Thus, allocate the HCB memory with BUS_DMA_COHERENT | BUS_DMA_NOCACHE,
so we get uncacheable memory on all architectures including x86 and so
loads and stores from/to HCB won't get reordered. However, even on x86
we still need to use at least compiler barriers to achieve the desired
program order.

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 as a result
of loads and stores getting reordered. [1]

While at it:
- Nuke the unused SYM_DRIVER_NAME macro.
- Remove unused/redundant HCB members and correct a comment typo.

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=270816 [https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=1]
MFC after:      3 days
b941d1c64e58708c93621cc07ed1c8e5e709cd48 Marius Strobl 2026-02-02 21:30:42
acpi: Post/pre device suspend/resume eventhandlers
These eventhandlers are called after suspending the device tree and
before resuming it. This is useful for PMC (power management controller)
drivers.

Reviewed by:    olce
Approved by:    olce
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D48735
4a71fc3b5cebdf3e6227470d50cf559bab28f26b Aymeric Wibo 2026-02-02 23:46:44
acpi_spmc: Register SPMC suspend/resume routines
SPMC suspend runs after the device tree is suspended using the
acpi_post_dev_suspend eventhandler, and SPMC resume runs before the
device tree is resumed using the acpi_pre_dev_suspend eventhandler.

Reviewed by:    olce
Approved by:    olce
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D48735
fedc9746bd37340a06dfcafea28904cf401127cf Aymeric Wibo 2026-02-02 23:49:23
acpi: add Darwin OSI quirk for Apple Mac hardware
Mac firmware hides the Intel integrated GPU (iGPU) on dual GPU x86
systems, i.e., with AMD/NVIDIA dGPUs, when the Darwin OSI is not
installed via ACPI.

Prior to this change, FreeBSD always used the dGPU. This is fine in
practice, but consumed more power than when the iGPU is used,
resulting in reduced battery life.

Linux handles this in `drivers/acpi/osi.c` by detecting Apple
hardware via DMI, disabling all Windows OSI strings, and
by explicitly installing the Darwin OSI ACPI handler. This change
applies equivalent logic to the acpi(4) driver on FreeBSD.

This feature can be enabled/disabled using the
`hw.acpi.apple_darwin_osi` tunable. Setting this tunable to `0`
restores the previous behavior by explicitly disabling the added
support.

Reviewed by:    obiwac, ngie, adrian
Differential Revision:  https://reviews.freebsd.org/D54762
052a791b00555805f19ccc38a04d42d48b54104b Abdelkader Boudih 2026-02-03 01:43:00
uart: fix sleeping while holding mutex in uart_tty_detach()
Move swi_remove() call before acquiring the tty lock. swi_remove() calls
intr_event_remove_handler() which may sleep via msleep(), causing a lock
order violation when called with the tty mutex held.

The software interrupt handler removal operates on the interrupt event
structure independently and does not require the tty lock. This matches
the pattern used in other drivers such as tcp_hpts.c where swi_remove()
is called without holding other locks.

Reviewed by:    imp, kevans
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D54953
ed3a2469a71e0ef48cf8e636c35e64a011756da3 Abdelkader Boudih 2026-02-03 03:21:43
powerpc/pmap: Mark more CPUs as lockless TLBIE
Add POWER10 and POWER11 to the list of lockless TLBIE capable CPUs.
According to Linux, anything POWER5 and later should be able to do this,
but that hasn't been tested with FreeBSD.  POWER10 and POWER11, being
derived after the POWER9, implicitly have this capability per the ISA
spec.

MFC after:      1 week
7f885581d5bb3eff191661f321d3a097acb0f39d Justin Hibbits 2026-02-03 02:50:15
Commit group #2: powerpc/pmap/oea64: Make PV_LOCK superpage sized
powerpc/pmap/oea64: Make PV_LOCK superpage sized

HPT superpages are 16MB, not 2MB.  Taking 8 locks to lock a super page
almost defeats the purpose of using the super page.  Expanding the
PV_LOCK scope to cover 16MB (24 bit shift) reduces this to a single
lock.

MFC after:      3 weeks
1bc75d77e9d45d4ccfe2f146b37c08f41e49a082 Justin Hibbits 2026-02-03 03:48:16

powerpc/pmap: Use a constant for HPT superpage shift

There are no plans to allow multiple sizes of HPT superpages, so just use a
constant for it.

MFC after:      3 weeks
Fixes:          https://cgit.freebsd.org/src/commit/?id=1bc75d77e9 ("powerpc/pmap/oea64: Make PV_LOCK superpage sized")
93450913086e7f0478b609367d5f1d4c740cb941 Justin Hibbits 2026-02-03 15:11:19
tpm: crb: add support for the Pluton startmethod
The Pluton startmethod uses a simple doorbell mechanism to wakeup the
TPM unit after we've issued various forms of state change, with the
registers to use specified in the startmethod-specific segment of the
TPM2 table (up to 12 bytes after the StartMethod).

At the very least, this is the kind of TPM in use by my AMD Zen 4-based
Minisforum machine.

Differential Revision:  https://reviews.freebsd.org/D53683
e6fa918c4a3ebeb4bcae7614dbb281bda35e06e1 Kyle Evans 2026-02-03 04:48:22
Commit group #3: x86
x86: x86_msr_op(): Move setting mode up, delineate logical blocks

No functional changes (intended).

Reviewed by:    kib
MFC after:      2 weeks
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D54996
7acd7ac6385c783699a64216198d7f2e244cc3b4 Olivier Certner 2026-01-22 14:22:01

x86: x86_msr_op(): Simplify assertions

Simplify them by moving them into more natural places, i.e., default
cases of 'switch' statements.

No functional change (intended).

Reviewed by:    kib
MFC after:      2 weeks
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D54996
a1a8bcdfde2e616cffeb4bf4e1968ba55cf409e9 Olivier Certner 2026-01-22 14:37:00

x86: x86_msr_op(): MSR_OP_LOCAL: Disable interrupts on atomic ops

On MSR_OP_LOCAL and non-naturally-atomic operations (MSR_OP_ANDNOT and
MSR_OP_OR), there is no guarantee that we are not interrupted between
reading and writing the MSR, and that interruption could actually
perform some operation on that MSR, which would be lost.

Prevent that problem by temporarily disabling interrupts around MSR
manipulation.

Reviewed by:    kib
Discussed with: markj
MFC after:      2 weeks
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D54996
e5f8cbb86d58f25b5ff168506b78d09dca266fb6 Olivier Certner 2026-01-23 20:52:46
hwpstate_amd(4): Fix BITS_WITH_VALUE()/SET_BITS_VALUE() to obey the mask
While here, rename an argument of BITS_VALUE() to be consistent with the
other macros.

Reviewed by:    aokblast
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D54997
4b0e09a918fbcdb3938ecb8e0efc3313bd3b2308 Olivier Certner 2026-01-29 09:00:02
hwpstate_amd(4): Rename CPPC register macros
To be closer to AMD's official terminology, except for the "Lowest
Non-Linear Performance" field which we label as 'EFFICIENT_PERF' closer
to Intel's ("Most Efficient Performance"), and to clear possible
confusion.

No functional change (intended).

Reviewed by:    aokblast
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D54998
9ae367d11de8abbdf53884836c9ba30908c5c8db Olivier Certner 2026-01-29 09:08:47
libpmc: Fix the L3 counters for AMD Zen 1-4
On AMD processors libpmc was using the topic field (based on filename) to
determine the counter's subclass.  Unfortunately, the JSON definitions for
AMD Zen 1-4 have the L3 counters in files shared with other counters.

This change has libpmc to use the pmu field (which is derived from the Unit
field in JSON) to determine the correct counter subclass.

Reviewed by:    mhorne
MFC after:      2 weeks
Sponsored by:   Netflix
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1984
c215eef345501ce7dda374909b3195d9d69a4e9f Ali Mashtizadeh 2026-01-23 05:34:13
amd64: parse_memmap(): Move comment about size at proper place
While here, declare 'size' only in the relevant block.

No functional change (intended).

MFC after:      1 week
Sponsored by:   The FreeBSD Foundation
53bb02015fce72c79498842b898faefc2da3b0fb Olivier Certner 2026-01-30 17:33:12
acpi: Move sysctl tree set up at end of initialization
Setting up the sysctl tree later:
1. Fixes not de-registering sysctl knobs on failure to attach.
2. Avoids having inconsistent knob values exposed during a brief moment.

Reviewed by:    imp, obiwac
MFC after:      2 weeks
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D54926
7f031c9f6b9ff8af7c901ff2645124a93b9de284 Olivier Certner 2026-01-28 10:07:42
acpi: 'hw.acpi.s4bios' sysctl: Change type to bool, expand description
Another boolean, indicating hardware support, will be introduced in next commit.

Thanks to the previous commit modifying sysctl_handle_bool(), this
change is backwards-compatible with old programs using an integer in and
out of sysctl(3).

Reviewed by:    obiwac
MFC after:      2 weeks
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D54626
e401e6d3fc91679b16c5cfa4c473dcb8fcadacfa Olivier Certner 2026-01-09 09:53:39
virtio_p9fs: Use VIRTIO_SIMPLE_PNPINFO
This allows us to also use the common VIRTIO_SIMPLE_PROBE and to have
devmatch load the driver when detected.

Sponsored by:   Arm Ltd
Differential Revision:  https://reviews.freebsd.org/D54684
2f3f5055e7f69567f7aaca2f5b77655df34c4bb0 Andrew Turner 2026-02-03 17:13:35
arm64: Add the Fine-Grained Trap registers
Sponsored by: Arm Ltd
Differential Revision:  https://reviews.freebsd.org/D54685
4f82ce5191d550b875f7f760c83e05167728fe69 Andrew Turner 2026-02-03 17:14:03
arm64/vmm: Add HYP_FEAT_FGT{,2}
Add the macros and detection for Fine-grained traps (FEAT_FGT and
FEAT_FGT2).

Sponsored by:   Arm Ltd
Differential Revision:  https://reviews.freebsd.org/D54686
095a7871f4320e7667a644e6e34a27e1f526b053 Andrew Turner 2026-02-03 17:14:26
arm64/vmm: Set and use the fine-grained traps
Set the Fine-grained trap registers to trap any features we don't
support. These are expected to be more useful when we support nested
virtualisation, so for now just the base features and GICv3 are not
trapped.

As nested virtualisation will require VHE we only set the fine-grained
trap registers when VHE is used.

Sponsored by:   Arm Ltd
Differential Revision:  https://reviews.freebsd.org/D54687
a4f0e93c514280bfd0ff3897e5171ec7bbe4796b Andrew Turner 2026-02-03 17:14:44
vmm: Fix a resource leak in an error path
vmmdev_create() increments the VM count as its last step and calls
vmmdev_destroy() if it fails.  However, vmmdev_destroy() unconditionally
decrements the count.

Correct this bug by reordering operations.

Fixes:          https://cgit.freebsd.org/src/commit/?id=1092ec8b3375 ("kern: Introduce RLIMIT_VMM")
Reviewed by:    bnovkov
Differential Revision:  https://reviews.freebsd.org/D55068
8cfa6ddcee021adaf9515286e25dd0c961adf8a4 Mark Johnston 2026-02-03 19:09:28
vmm: Remove an unneeded NULL pointer check
sc->vm is unconditionally dereferenced earlier in this function.  No
functional change intended.

Reviewed by:    bnovkov
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D55069
2d0564b9daf49c46e0e4ef6c7d162c73fc8b35d7 Mark Johnston 2026-02-03 19:09:44
if_rge: sync with up to date OpenBSD code
e574c2d36cbcacf2556088879be336775e80154b
Add support for RTL8125D revision 0x6890000

Reviewed by:    adrian
Differential Revision:  https://reviews.freebsd.org/D54922
MFC after: 2 weeks
3f3cc6fd69e4e3abf6b48c242e93b650c00451c1 Brad Smith 2026-02-04 06:25:13
sdt: Enable on 32-bit powerpc and powerpc64le
Reviewed by:  jhibbits, adrian
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D54814
6e32e8d7d16148e9bad1e3544363f318582f4c13 Mark Johnston 2026-02-04 14:48:34
pmc: Import Intel Granite Rapids events
Reviewed by:  mhorne
Sponsored by:   Klara, Inc.
Obtained from:  Intel perfmon (JSON event definitions)
Differential Revision:  https://reviews.freebsd.org/D55081
MFC after:      2 days
a3ff85e11925ba1e25465c8ba633356f405f9214 Bojan Novković 2026-02-02 10:13:12
ufshci: Remove UIC error during initialization
This patch removes the UIC error caused by QEMU not supporting certain
UIC command. Additionally, it removes the unused unipro_version.

Reviewed by:            imp (mentor)
Sponsored by:           Samsung Electronics
Differential Revision:  https://reviews.freebsd.org/D54513
0f515c0a97489d8d35aca7f5e28c28b22f217dc9 Jaeyoon Choi 2026-02-04 23:53:01
Commit group #4: Make message added for Darwin OSI quirk more terse
Make message added for Darwin OSI quirk more terse

The verbose message was way too verbose. Make it terse.

MFC after:      1 week
MFC with:       052a791b00 ("acpi: add Darwin OSI quirk for Apple Mac hardware")
Requested by:   kib
9c666de5b339d3c8f9bf3963691e4310e7d159cb Enji Cooper 2026-02-05 02:57:22

Unbreak the build

Add the missing comma in the `device_printf` statement.

MFC after:      1 week
MFC with:       9c666de5b
Fixes:  https://cgit.freebsd.org/src/commit/?id=9c666de5b ("Make message added for Darwin OSI quirk more terse")
cc702c78f70f972cf2f8ea008752d96df1989988 Enji Cooper 2026-02-05 04:38:31
tpm20: fix suspend/resume and entropy harvesting
There were a few problem here:
  - TPM2_Shutdown results in a response that we need to either process
    or ignore, otherwise any tpm20_write or tpm20_harvest call will
    trivially hang on an `sc->pending_data_length != 0`
  - We should have a matching TPM2_Startup upon resume to restore any
    state that should have persisted
  - We must drain the harvest task before we suspend to avoid problems
    there

This commit is sufficient to avoid breaking suspend/resume.

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=291067
Fixes:  https://cgit.freebsd.org/src/commit/?id=a2d5ed9442bb ("Introduce driver for TPM 2.0 in CRB and [...]")
Fixes:  https://cgit.freebsd.org/src/commit/?id=4ee7d3b0118c ("Allow using TPM as entropy source.")
Co-authored-by: markj (D53835)
Tested by:      garga
Differential Revision:  https://reviews.freebsd.org/D55074
38a4995eb52db21116f8b37ed942e66a8c2f050f Kyle Evans 2026-02-05 03:35:01
powerpc64/pmap: No need to use r0 anymore in tlbie
The only use of `tlbie %rN, 0` is now explicit and covered in the block
above.  Since there's no need for an explicit `tlbie %rN, 0` now, drop
this convoluted piece and let the compiler decide.

While here, a trivial optimization of the old-style tlbie block, by
clearing tlbie_lock and returning, instead of going to the end which
checks again if the lock is needed.  Since it's already known to be
needed, there's no need to check again.
c1a339b4a313ead4122c630ab9ac8f9c54c3e0a2 Justin Hibbits 2026-02-05 03:28:16
arm64: Attach the vgic even if there is no ITS
If there is no ITS device so no memory resources the gicv3 driver would
exit attaching early. This caused the vgic driver to also not be
attached, even if it could.

Reported by:    novel@
Sponsored by:   Arm Ltd
Differential Revision:  https://reviews.freebsd.org/D54791
c12d6cc326b70326d776324067bdf07e4fa328aa Andrew Turner 2026-01-19 14:24:14
bnxt: set hardware checksum only if required
The test condition in the bnxt driver for TCP/UDP transmit hardware checksum
offload is invalid: only the TCP / UDP csum bits should be tested

Only the relevant ipi_csum_flags bits are now tested

Reviewed by: tuexen
Sponsored by: Stormshield
Differential Revision: https://reviews.freebsd.org/D53941
2e94e1631ef517f5495e25d7fa22c95f7dca0dc6 acazuc 2025-11-27 10:29:34
acpi: Fix trying to enter NONE state
In acpi_system_eventhandler_sleep(), I forgot to update
ACPI_STATE_UNKNOWN when switching to new sleep types.

Reviewed by:    olce
Approved by:    olce
Fixes:  https://cgit.freebsd.org/src/commit/?id=97d152698f48 ("acpi: Use sleep types defined in sys/power.h")
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D55119
d15d6bf83de97bd1742621bc10fe2feeb503cfdd Aymeric Wibo 2026-02-05 00:49:26
powerpc64: Fix disappearing low memory on radix MMU systems (POWER9)
The FreeBSD radix implementation piggybacks on the physical memory
allocation function from the HPT implementation, but did not share
the same state information for number of physical memory ranges.
This led to a situation where the HPT physical memory allocator
would attempt to shift the physical memory ranges in the shared
range table, but would use the wrong number of entries, thus
overwriting the large segment of low memory that should have been
available for e.g. 32-bit DMA.

Incorrect physical memory map:

real memory  = 33997058048 (32422 MB)
available KVA = 34359619583 (32767 MB)
Physical memory chunk(s):
0x0000000000003000 - 0x0000000000002fff, 0 bytes (0 pages)
0x000000000000e000 - 0x000000000000ffff, 8192 bytes (2 pages)
0x0000000000094000 - 0x0000000000ffffff, 16171008 bytes (3948 pages)
0x0000000100000000 - 0x00000007a2042fff, 28487987200 bytes (6955075 pages)
0x00000007d0006000 - 0x00000007fc72dfff, 745701376 bytes (182056 pages)
0x00000007fdc00000 - 0x00000007ff79ffff, 28966912 bytes (7072 pages)
0x00000007ff7d1000 - 0x00000007ff7effff, 126976 bytes (31 pages)
avail memory = 29190103040 (27837 MB)
FreeBSD/SMP: Multiprocessor System Detected: 16 CPUs

Correct physical memory map:

real memory  = 33997058048 (32422 MB)
available KVA = 34359619583 (32767 MB)
Physical memory chunk(s):
0x0000000000003000 - 0x0000000000002fff, 0 bytes (0 pages)
0x000000000000e000 - 0x000000000000ffff, 8192 bytes (2 pages)
0x0000000000094000 - 0x0000000000ffffff, 16171008 bytes (3948 pages)
0x0000000002000000 - 0x000000000284ffff, 8716288 bytes (2128 pages)
0x0000000004627000 - 0x000000002fffffff, 731746304 bytes (178649 pages)
0x0000000034040000 - 0x00000000efffffff, 3153854464 bytes (769984 pages)
0x0000000100000000 - 0x00000007982ecfff, 28323008512 bytes (6914797 pages)
0x00000007cc20a000 - 0x00000007fc72dfff, 810696704 bytes (197924 pages)
0x00000007fdc00000 - 0x00000007ff79ffff, 28966912 bytes (7072 pages)
0x00000007ff7d1000 - 0x00000007ff7effff, 126976 bytes (31 pages)
avail memory = 32984436736 (31456 MB)
FreeBSD/SMP: Multiprocessor System Detected: 16 CPUs

Signed-off-by: Timothy Pearson <tpearson@raptorengineering.com>
Sponsored-by: Raptor Computing Systems, LLC
1364e7d0921bfd79738dae80748d836730e39056 Timothy Pearson 2026-02-04 05:16:39
cxgbe(4): sysctl to disable/enable the TCB cache
The TCB cache can be enabled/disabled at any time on the T7 and this
commit adds a sysctl to do that.  This is for debug only.

 # sysctl dev.chnex.0.misc.tcb_cache=0
 # sysctl dev.chnex.0.misc.tcb_cache=1

MFC after:      1 week
Sponsored by:   Chelsio Communications
9352d2f6dd55afcf0ac24d2806da7c6febf19589 Navdeep Parhar 2026-02-05 19:52:51
em: remove M_HASHTYPE when RSS is not enabled
Summary:
Since "73fe85e486d2 tcp: store flowid info in syncache", inp_flowid can be set
if the incoming packet is not M_HASHTYPE_NONE. But this can introduce dummy
and duplicated flowid when a virtual interface set M_HASHTYPE_OPAQUE. This
change will let the upper layer know how to deal with software hash, with
benefits like inp_flowid can be set correctly and m_pkthdr.flowid can be set
correctly in output path.

This fix is similar to "20285cad7a55"

Reviewed by: kbowling
Differential Revision: https://reviews.freebsd.org/D55137
efcc0423d80e4048e11e997abc46bd0343537e1b Cheng Cui 2026-02-05 21:12:15
acpi: New R/O 'hw.acpi.s4bios_supported' sysctl, gate S4BIOS with it
This new sysctl knob indicates whether the ACPI implementation supports
S4BIOS (FACS present with bit S4BIOS_F set, as per the standard).

If S4BIOS is not supported, do not allow 'hw.acpi.s4bios' to be set to
true.

This is also in preparation of probably switching the default for
'hw.acpi.s4bios' to false once OSPM-initiated S4 support is ready, in
which case administrators need some way to determine whether
firmware-initiated S4 support is possible.  For now, we keep the default
of setting 'hw.acpi.s4bios' to true (1) when S4BIOS is supported.

Reviewed by:    obiwac
MFC after:      2 weeks
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D54627
d2aa0a4dace1d0cf8d52614c25b6a8f5cf03fd32 Olivier Certner 2026-01-09 13:43:23
i386 minidump: Remove unused macros
No functional change (intended).

MFC after:      2 weeks
Sponsored by:   The FreeBSD Foundation
584c4e0abbfdbac355601491a695c7a8fd5d8ab3 Olivier Certner 2026-02-05 08:44:28
spibus: Don't leak KVA when freeing a mmap region
Effort:               CHERI upstreaming
Sponsored by:   AFRL, DARPA
Differential Revision:  https://reviews.freebsd.org/D54837
06fd19b5349a1ff27ef338619fdade596986fc2f John Baldwin 2026-02-06 15:30:26
amd64/vmm: Lock global PCI passthrough structures
There is a global list of ppt-claimed devices, accessed via several
vmm ioctls.  The ioctls are locked by per-VM locks, but this isn't
sufficient to prevent multiple VMs from trying to bind a given device.

Add a sleepable lock and use that to synchronize all access to ppt
devices.

Reviewed by:    corvink, jhb
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D55065
36b855f1892575cbfe1cd5455b989bfc8ae07502 Mark Johnston 2026-02-06 15:29:22
thunderbolt: Fix tb_pcib device matching to check PCI class
Light Ridge and earlier Thunderbolt controllers reuse the same device ID
(0x1513) for both the NHI (class 0x088000) and PCI bridges (class
0x060400).

Without checking the PCI class, tb_pcib would incorrectly match NHI
devices, causing a panic when trying to attach bridge code to non-bridge
hardware.

Add PCI class check to tb_pcib_find_ident() to only match actual PCI-PCI
bridges (PCIC_BRIDGE/PCIS_BRIDGE_PCI).

Reviewed by:    obiwac, jhb
Approved by:    obiwac, jhb
Fixes:  https://cgit.freebsd.org/src/commit/?id=2ed9833791f2 (thunderbolt: Import USB4 code)
Differential Revision:  https://reviews.freebsd.org/D55102
067ad8b31bf68b6dcf1ad571746349ed88d63d00 Abdelkader Boudih 2026-02-06 16:12:56
Commit group #5: hwpstate{_amd,intel}(4): Move common knobs to a separate file
sys/sysctl.h: Make it self-contained when included from the kernel

MFC after:      2 weeks
Sponsored by:   The FreeBSD Foundation
1a446f765d9cb34e8137ffa6dbb71ce551560cc1 Olivier Certner 2026-02-06 15:02:39

hwpstate{_amd,intel}(4): Move common knobs to a separate file

Reason for doing this right now is to resolve the conflict on
'machdep.hwpstate_pkg_ctrl' between the Intel and AMD drivers, even
though I expect to remove it for hwpstate_amd(4) at some point.

More generally, this is going to be useful for some future code
factorization.  Also, the 'debug.hwpstate_verbose' knob was moved there,
as we'll likely want to use it for the Intel driver as well (which is
currently not the case).

Note for MFC: Will be partial, since `hwpstate_amd(4)` does not support
CPPC in stable/15 nor stable/14.

Reviewed by:    emaste
Fixes:          https://cgit.freebsd.org/src/commit/?id=3e6e4e4a0d42 ("hwpstate: add CPPC support for pstate driver on AMD")
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D54528
8043295875083b57a6b7b2dc6826fde4cf4e1ba1 Olivier Certner 2026-02-06 10:58:07

sys/sysctl.h: Add missing <sys/kassert.h> include

Hopefully, 'sys/sysctl.h' is really self-contained now.

This fixes the GENERIC-NODEBUG compilation error in 'hwpstate_common.c'
after commit 804329587508 (see below).

Fixes:          https://cgit.freebsd.org/src/commit/?id=1a446f765d9c ("sys/sysctl.h: Make it self-contained when included from the kernel")
Fixes:          https://cgit.freebsd.org/src/commit/?id=804329587508 ("hwpstate{_amd,intel}(4): Move common knobs to a separate file")
Sponsored by:   The FreeBSD Foundation
bfd50a32ff26067552220c6f08e6025be3603962 Olivier Certner 2026-02-06 20:46:48
Commit group #6: hwpstate_amd(4)
hwpstate_amd(4): Factor out printing CPPC registers, fix CPPC_REQUEST's

Factor out these printing, so they can be called from other places than
just the register dump handler.  This also makes surrounding code
clearer.

Fix inverted printing of minimum and maximum performance.

For better diagnostic, print the full raw content of each register
before printing the value of fields we know about.

As fields are printed in decimal, remove 0-padding, which could give the
impression that the numbers are printed in octal or hexadecimal.

While here, remove superfluous blank lines when printing (we use TABs
for the different registers' fields).

Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D54999
73c9d843ffb9d816737aa2cef7551923e68e6eaf Olivier Certner 2026-01-29 10:16:27

hwpstate_amd(4): Rename register dump sysctl handler

While here, rename the callback function and structure to a more
immediately informative name.

While here, remove a superfluous cast and rename the variable containing
the callback data to just 'data' instead of 'req' which can be confusing
(because of CPPC_REQUEST but also the fact that 'req' is a parameter of
sysctl handlers).

No functional change intended.

Reviewed by:    aokblast
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D55000
e938d57e0a8852e956a16dd4fc041047fd1b2c35 Olivier Certner 2026-01-29 10:43:53

hwpstate_amd(4): Assert PSTATE_CPPC is on in corresponding sysctl handlers

No functional change intended.

Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D55001
fa0512f7156d1851a7d498d42c32655e390399cf Olivier Certner 2026-01-29 10:48:55

hwpstate_amd(4): Rename EPP handler, convert to unsigned int

'val' is supposed to be the storage for a sysctl knob of an 'unsigned
int', so consistently don't specify its width.

While here, rename variables in the handler.  The new names feel
clearer, and the 'ret' => 'error' rename is to be more in line with our
tradition.

No functional change intended.

Reviewed by:    aokblast
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D55002
461bac05a1454e8a1656cc35f1308cbd6b374f51 Olivier Certner 2026-01-29 14:06:08
hwpstate_amd(4): Revamp the softc
As the new CPPC and old P-states modes are exclusive, put their
respective data in a union.

Rename the field containing the content of the CPPC_REQUEST register.
It it now to be accessed using 'cppc.request'.

Use an 'unsigned int' instead of 'uint32_t' for 'flags'.  This is an
internal field whose width could be changed at will.  We only have one
flag at the moment.

No functional change intended.

Reviewed by:    aokblast
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D55004
7bc7692b940b0c2af0f4a89ae2ef6fbba0bc3381 Olivier Certner 2026-01-29 16:01:43
Commit group #7: qlnxe
qlnxe: Remove a pointless copy back from the link-layer address

On ifnet attaching, ether_ifattach() makes the link-layer address by
shadow copying the ha->primary_mac. Well, the link-layer address will
not be altered during attaching, thus it is pointless to copy it back.

No functional change intended.

Reviewed by:    kbowling
MFC after:      5 days
Differential Revision:  https://reviews.freebsd.org/D54883
4ac3081b282800158df7abe93f307d76e1b5b808 Zhenlei Huang 2026-02-06 17:52:53

qlnxe: Avoid memcpy with same source and destination

In case the device is VF, qlnx_get_mac_addr() returns ha->primary_mac
hence it ends up memcpy with same source and destination. Refactor
slightly to avoid that.

Reviewed by:    kbowling
MFC after:      5 days
Differential Revision:  https://reviews.freebsd.org/D54884
3aeeedc7e0dc231c16406ff64f4a08a716964c40 Zhenlei Huang 2026-02-06 17:52:53

qlnxe: Fix setting the unicast MAC filter of RX path

When an Ethernet interface is added to lagg(4) as a child interface, its
type, aka if_type, is changed from IFT_ETHER to IFT_IEEE8023ADLAG. Well
changing the link-layer address of the lagg(4) interface will be
propagated to all child interfaces, hence the drivers of child interfaces
shall not presume the type of the interface will not be changed.

Meanwhile, on initializing, an ifnet has been fully attached and it is
guaranteed to have non-null link-layer address so stop NULL checking for
it.

Reviewed by:    kbowling
Fixes:          https://cgit.freebsd.org/src/commit/?id=792226e53023 qlnxe: Allow MAC address override
MFC after:      5 days
Differential Revision:  https://reviews.freebsd.org/D54885
f250852c9a0c1021c3be4b498e27cfc7b42a81db Zhenlei Huang 2026-02-06 17:52:53

qlnxe: Prevent potential concurrency between ioctls

The driver-managed status flags should be lock protected to be touched.
Also this can serialize ioctls those check the IFF_DRV_RUNNING status.

Reviewed by:    kbowling
MFC after:      5 days
Differential Revision:  https://reviews.freebsd.org/D54886
0df8a998a9fe28af659cb401c537c6d785e55f81 Zhenlei Huang 2026-02-06 17:52:53

qlnxe: Avoid reinitializing the interface when it is already initialized

qlnx_init_locked() unconditionally uninitialize the interface thus is
actually reinitializing the interface. Well the init routine qlnx_init()
is to initialize the interface by net stack when assigned with the first
inet or inet6 address. The ioctl SIOCSIFADDR for the first inet6 address
is handled by ether_ioctl() thus the interface is reinitialized no matter
it was initialized or not.

Add a driver status check for that to avoid reinitializing. Further plan
is removing SIOCSIFADDR ioctl from the driver and let ether_ioctl() handle
it.

Reviewed by:    kbowling
MFC after:      5 days
Differential Revision:  https://reviews.freebsd.org/D54887
c10e6bc0f0079e90cb484323ad71d437f1882422 Zhenlei Huang 2026-02-06 17:52:54

qlnxe: Let ether_ioctl() handle SIOCSIFADDR ioctl

Since the change [1], the init routine qlnx_init() works as intended.
Let ether_ioctl() handle SIOCSIFADDR to simplify the code.

Combined with the change [1], this shall be a better fix for PR 287445.

[1] c10e6bc0f007 qlnxe: Avoid reinitializing the interface when it is already initialized

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=287445
Reviewed by:    kbowling
MFC after:      5 days
Differential Revision:  https://reviews.freebsd.org/D54888
4012b63889e40bb877bc0e4c8da1792bce472c08 Zhenlei Huang 2026-02-06 17:52:54
Commit group #8: qlnxe
qlnxe: Refactor setting the promiscuous and allmulti mode

There are two entry points to set the promiscuous and allmulti mode.
One is ioctl, and another is the init routine. Given they share almost
the identical logic, refactor a little to make the code more clear.

While here, for the ioctl, translate the error to EINVAL to avoid
confusing the net stack.

Reviewed by:    kbowling
MFC after:      5 days
Differential Revision:  https://reviews.freebsd.org/D54890
45b1718fadae7d56051ba04ef9d7a175a602a226 Zhenlei Huang 2026-02-06 17:52:54

qlnxe: Allow tapping the TX packets

Currently only the packets in the RX path can be captured by tcpdump
as the ETHER_BPF_MTAP call in the TX path is missing. Add it so that
packets in both directions can be captured.

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=290973
Reviewed by:    kbowling
MFC after:      5 days
Differential Revision:  https://reviews.freebsd.org/D54891
968647502ec21464ad3aecc7577ff0e8dfd41693 Zhenlei Huang 2026-02-06 17:52:54

qlnxe: Overhaul setting the multicast MAC filters

When operating the multicast MAC filters, the current usage of
ECORE_FILTER_ADD and ECORE_FILTER_REMOVE are rather misleading.
ECORE_FILTER_ADD reads "adding new filter", but it actually removes
any existing filters and then addes a new one. ECORE_FILTER_REMOVE
reads "removing a filter", but it actually removes all filters.
Let's use ECORE_FILTER_REPLACE and ECORE_FILTER_FLUSH instead to
avoid confusion.

In the current implementation, only one MAC address is passed to
ecore_sp_eth_filter_mcast() and any previously installed filters are
removed, hence it breaks the multicast function. That can be observed
via either assigning new IPv6 addresses to the interface or putting
the interface as a member of lagg(4) interface with LACP aggregation
protocol. Fix that by calculating the multicast filter bins directly
from multicast MAC addresses and replace the filters every time
the bins changes.

Due to the nature of the multicast filter, which is hash based, a
full 1's multicast filter bin means all multicast packets are to be
accepted. Thus there's no need to make the vport into allmulti mode
when the number of multicast MAC addresses exceeds the limit
(ECORE_MAX_MC_ADDRS, 64).

Tested with a FastLinQ QL41212HLCU 25GbE adapter, both MFW_Version
8.35.23.0 and 8.59.16.0 are tested.

Note: Currently the VF port is set to promiscuous mode unconditionally,
and the setting of the multicast MAC filters for VF ports is
short-circuited, so the VF port functions as it did.

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=265857
PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=290973
Reviewed by:    kbowling
MFC after:      5 days
Differential Revision:  https://reviews.freebsd.org/D54892
70256d2b86d95a678a63c65b157b9c635f1f4c6a Zhenlei Huang 2026-02-06 17:52:55
igb: remove M_HASHTYPE when RSS is not enabled
manually cherry-pick efcc0423d80e

Reviewed by: kbowling
Differential Revision: https://reviews.freebsd.org/D55143
21dd554d16971a9cce36bb48ebbf5219297995b4 Cheng Cui 2026-02-06 14:43:41
nvme: Use __diagused instead of __unused
Reviewed by:  imp
Sponsored by:   Klara, Inc.
Sponsored by:   NetApp, Inc.
1c09ae2be059da0b945a2543ac7dd0bd5198d0e3 Dag-Erling Smørgrav 2026-02-05 16:09:30
chore: asmc: minor code cleanup
- Use symbolic names in Mac definitions in lieu of the unrolled values
  they represent.
- Delete trailing whitespace.
- Fix indentation.

No functional change intended.

MFC after:      1 week
a8f3c3b5d4d9dac1dafe4094fe35b30ffdf26178 Enji Cooper 2026-01-01 06:43:05
ifinfo: improve output of hwassist value
In addition to print the hexadecimal number hwassist, also print
the symbolic names of the corresponding CSUM_* flags.

Reviewed by:            tuexen
MFC after:              1 week
Differential Revision:  https://reviews.freebsd.org/D55055
d84870d90bafe75eb87759df0ab41ff0214c866e Timo Völker 2026-02-08 20:02:58
ure: improve transmit checksum offloading
Apparently, the name of the variable l4off was correct. Providing the
offset to the TCP or UDP header allows the transmit checksum offload to
work for TCP/IPv4, TCP/IPv6, UDP/IPv4, and UDP/IPv6.

Reported by:            vishwin
Reviewed by:            vishwin
MFC after:              1 week
Differential Revision:  https://reviews.freebsd.org/D55187
7266121ce985a1a895441357c20b0e9d56b4e5f5 Michael Tuexen 2026-02-08 20:11:18

Networking

Network-related commands, library, and kernel.

ip_mroute: Make privilege checking more consistent
- The v6 socket option and ioctl handlers had no privilege checks at
  all.  The socket options, I believe, can only be reached via a raw
  socket, but a jailed root user with a raw socket shouldn't be able to
  configure multicast routing in a non-VNET jail.  The ioctls can only
  be used to fetch stats.
- Delete a bogus comment in X_mrt_ioctl(), one can issue multicast
  routing ioctls against any socket.  Note that the call path is
  soo_ioctl()->rtioctl_fib()->mrt_ioctl().

I think all of the mroute privilege checks should be done within the
ip(6)_mroute code, but let's first make the v4 and v6 modules
consistent.

Reviewed by:    glebius
MFC after:      2 weeks
Sponsored by:   Stormshield
Sponsored by:   Klara, Inc.
Differential Revision:  https://reviews.freebsd.org/D54982
74839871be363c5c2ac7ccd3396f36bdb58d19de Mark Johnston 2026-02-02 14:53:35
Commit group #9: ip6_mroute
ip6_mroute: Make MF6CFIND a regular function

This is more natural and corresponds more closely to the v4 multicast
routing code.  No functional change intended.

Reviewed by:    glebius
MFC after:      2 weeks
Sponsored by:   Stormshield
Sponsored by:   Klara, Inc.
Differential Revision:  https://reviews.freebsd.org/D54983
b370fcc716b9cfd4d08e291f0009f02452c84d64 Mark Johnston 2026-02-02 14:57:20

ip6_mroute: Fix the UPCALL_TIMING build

MFC after:      2 weeks
Sponsored by:   Stormshield
Sponsored by:   Klara, Inc.
5bb953b095461b488b102ab3025f42cd2ef61f9d Mark Johnston 2026-02-02 14:57:49

ip6_mroute: Remove an unused constant

No functional change intended.

MFC after:      2 weeks
Sponsored by:   Stormshield
Sponsored by:   Klara, Inc.
b320e89e6909c0c3f29542976df0381990866988 Mark Johnston 2026-02-02 14:58:38

ip6_mroute: Remove an unhelpful comment

ifnets already track if_allmulti() calls in the if_amcount field.  That
field is older than the comment, so I'm not exactly sure what the intent
was; let's just remove it.

MFC after:      2 weeks
Sponsored by:   Stormshield
Sponsored by:   Klara, Inc.
a45fb94801dffd414bdb1981def0e977ef0c774f Mark Johnston 2026-02-02 14:59:20
pf: fix use of uninitialised variable
In pf_match_rule() we attempt to append matching rules to the end of
'match_rules'. We want to preserve the order to make the multiple
pflog entries easier to understand. So we keep track of the last added
rule item in 'rt'. However, that assumed that 'match_rules' was only
ever added to in that one call to pf_match_rules(). This isn't always
the case, for example if we have match rules in different anchors.
In that case we'd end up using the uninitialised 'rt' variable in the
SLIST_INSERT_AFTER call.

Instead track the match rules and the last matching rule (to enable
easy appending) in the struct pf_test_ctx.
This also allows us to reduce the number of arguments for some
functions, because we passed a ctx to most functions that needed
'match_rules'.

While here also make pf_match_rules() static, because it's only ever
used in pf.c

Add a test case to exercise the relevant code path.

MFC after:      2 weeks
Sponsored by:   Rubicon Communications, LLC ("Netgate")
fe9e4eb6f38ae004efb576bf44aded08852f9e6b Kristof Provost 2026-02-03 12:17:08
ipfilter: Fix possible overrun
The destination buffer is FR_GROUPLEN (16 bytes) in length. When
gname is created, the userspace utilities correctly use FR_GROUPLEN
as the buffer length. The kernel should also limit its copy operation to
FR_GROUPLEN bytes to avoid any user written code from exploiting this
vulnerability.

Reported by:    Ilja Van Sprundel <ivansprundel@ioactive.com>
MFC after:      1 week
e40817302ebdf89df2f3bcd679fb7f2a18c244dc Cy Schubert 2026-02-04 17:27:23
bpf: don't clear pointer from descriptor to the tap on descriptor close
During packet processing the descriptor is looked up using epoch(9) and it
can be accessed after bpf_detachd().  In scenario of descriptor close the
tap point is alive (it actually produces packets) and thus the pointer can
be legitimately dereferenced.  This fixes a race on a bpf(4) device close
that would otherwise result in panic.

Differential Revision:  https://reviews.freebsd.org/D55064
5937e1cdc99180b4adae2cf20cabd75dd9f45546 Gleb Smirnoff 2026-02-04 22:07:11
lagg: Make the none protocol a first-class citizen
All the other protocols have corresponding start and input routines,
which are used in the fast path. Currently the none protocol is
treated specially. In the fast path it is checked to indicate whether
a working protocol is configured. There are two issues raised by this
design:

1. In production, other protocols are commonly used, but not the
none protocol. It smells like an overkill to always check it in the
fast path. It is unfair to other commonly used protocols.

2. PR 289017 reveals that there's a small window between checking the
protocol and calling lagg_proto_start(). lagg_proto_start() is possible
to see the none protocol and do NULL deferencing.

Fix them by making the none protocol a first-class citizen so that it
has start and input routines just the same as other protocols. Then we
can stop checking it in the fast path, since lagg_proto_start() and
lagg_proto_input() will never fail to work.

The error ENETDOWN is chosen for the start routine. Obviously no active
ports are available, and the packets will go nowhere. It is also a
better error than ENXIO, since indeed the interface is configured and
has a TX algorithm (the none protocol).

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=289017
Diagnosed by:   Qiu-ji Chen <chenqiuji666@gmail.com>
Tested by:      Gui-Dong Han <hanguidong02@gmail.com>
Reviewed by:    glebius
MFC after:      5 days
Differential Revision:  https://reviews.freebsd.org/D55123
a622030b4baec2136984cea7bd25c2985a2ae9b3 Zhenlei Huang 2026-02-06 03:37:43
lagg: Remove the member pr_num from struct lagg_proto
It is set but never used. Remove it to avoid confusion and save a
little space.

While here, use designated initializers to initialize the LAGG protocol
table. That improves readability, and it will be safer to initialize the
table if we introduce new protocols in the future.

No functional change intended.

Reviewed by:    glebius
MFC after:      5 days
Differential Revision:  https://reviews.freebsd.org/D55124
5ba503fc2cabc1a614997f102ace671d996bcc53 Zhenlei Huang 2026-02-06 03:37:43

System administration

Stuff in man section 8 (other than networking).

Commit group #10: nvmecontrol
nvmecontrol: Always set the RAE bit on telemetry-log requests

nvme-cli, as well as some vendor scripts, always set the RAE bit of the
GET LOG PAGE request when retrieving telemetry logs to avoid the log
getting reset to something new. Adopt that praactice here (nvme-cli
telemetry-log does have a --rae option, but that just turns on the rae
bit which defaults to being on: there's no way to turn it off).

Sponsored by:           Netflix
Differential Revision:  https://reviews.freebsd.org/D55017
05322eec86ae42a8f873ba10d8da61bd61b5b48f Warner Losh 2026-02-02 13:30:08

nvmecontrol: telemetry-log don't sanity check host generation number

Don't sanity check the host initiated generation number. It's not
necessarily constant between the two log page fetches. nvme-cli doesn't
do this stanity check and it generates a lot of false positives.

Sponsored by:           Netflix
Differential Revision:  https://reviews.freebsd.org/D55018
ff9fe85ff245bfbf6f54f98175282be5cf500cb3 Warner Losh 2026-02-02 13:30:22

nvmecontrol: telemetry-log --verbose

Add -v / --verbose to report status report since these things can take
minutes to retrieve.

Sponsored by:           Netflix
Differential Revision:  https://reviews.freebsd.org/D55019
350c1232a57a64b955a3ae7f9b92dde164d1eb65 Warner Losh 2026-02-02 13:30:28
heimdal: Pass the correct pointer to realloc when growing a string buffer
The realloc in my_fgetln was trying to grow the pointer to the string
buffer, not the string buffer itself.

In function 'my_fgetln',
    inlined from 'mit_prop_dump' at crypto/heimdal/kdc/mit_dump.c:156:19:
crypto/heimdal/kdc/mit_dump.c:119:13: error: 'realloc' called on unallocated object 'line' [-Werror=free-nonheap-object]
  119 |         n = realloc(buf, *sz + (*sz >> 1));
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
crypto/heimdal/kdc/mit_dump.c: In function 'mit_prop_dump':
crypto/heimdal/kdc/mit_dump.c:139:11: note: declared here
  139 |     char *line = NULL;
      |           ^~~~

Reviewed by:    rmacklem, cy
Fixes:          https://cgit.freebsd.org/src/commit/?id=a93e1b731ae4 ("heimdal-kadmin: Add support for the -f dump option")
Differential Revision:  https://reviews.freebsd.org/D54933
03d8ac948b1ad9c419b294c3129b7da58d818363 John Baldwin 2026-02-02 17:18:11
rc: run the zfs rc script before tmp
The tmp rc script has much the same problem that the var does: it wants
to test if /tmp is writable, and mount a tmpfs if it's not.  This means
that we actually want our zfs datasets mounted first, because we might
have a /tmp dataset that changes the story.

The ordering problem is particularly noticable with a r/o zfs root,
since the write test will fail and we'll mount a tmpfs that later gets
covered by our /tmp dataset.  If that /tmp dataset inherited readonly,
then we're still in trouble.

This also fixes `tmpmfs=yes`, which would again get covered by a zfs
dataset with the existing ordering.

Reviewed by:    des
Differential Revision:  https://reviews.freebsd.org/D54995
d3f21856aa72c28408660ed40ce76bbd0716a991 Kyle Evans 2026-02-03 03:21:42
nvmecontrol: Pass 1 to uint8_t arg
The rae arg is uint8_t (which we then shift over to the right bit. Pass
'1' instead of 'true' here to match the interface. While true is
promoted to (uint8_t)1, we don't use it as a bool in read_logpage().

Fixes:                  https://cgit.freebsd.org/src/commit/?id=5322eec86ae4 ("nvmecontrol: Always set the RAE bit on telemetry-log requests")
Sponsored by:           Netflix
Reviewed by:            chs
Differential Revision:  https://reviews.freebsd.org/D55060
cbb7441245cf2b22efed17dec3c88587c980c691 Warner Losh 2026-02-03 17:34:36
ifconfig: fix gre(4) status
Set `ifr->ifr_name` to display gre options
for the interface.

Reviewed by: glebius, zlei
Approved by: glebius (mentor)
MFC after: 1 day
Differential Revision: https://reviews.freebsd.org/D55099
c2ba906fa63982d7aa799466d83716d39fe91d2b Pouria Mousavizadeh Tehrani 2026-02-04 11:03:22
etcupdate: Do not ignore empty files.
PR:           bin/https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292773
Reviewed by:    markj
MFC after:      1 week

Differential Revision: https://reviews.freebsd.org/D54935
4f7336a93cb84a0633ca9aa715e474625b4adce5 Xin LI 2026-01-29 03:23:15
pkg: Fix mirror type parsing and service discovery
Signed-off-by: Pavel Knoblokh <info@software-advisory.com.au>
Reviewed by:    emaste, imp, kevans
Fixes:          https://cgit.freebsd.org/src/commit/?id=dc4581589a3 ("pkg: clean support for repositories")
Closes:         https://github.com/freebsd/freebsd-src/pull/1989
abf911af22729858cc876231e7970eff6aefbb9d Pavel Knoblokh 2026-02-05 03:59:21
bhyve/virtio: check negotiated_caps for indirect descriptor support
vq_getchain() erroneously checked vc_hv_caps for indirect descriptor
support when it encountered an indirect descriptor. vc_hv_caps is used
in feature negotiation to advertise what features our device emulation
supports, but we should really check what features we have negotiated
with the driver.

Reviewed by: corvink
Differential Revision: https://reviews.freebsd.org/D53465
5379c4627782ebb2619f95a5784361c88472c8b5 Hans Rosenfeld 2026-02-05 18:48:10
bhyve/virtio-scsi: advertise support for indirect descriptors
Support for indirect registers is actually part of the common virtio code,
the virtio-scsi code doesn't actually care or even know anything about it.

Advertising the features greatly improves performance with some guest
operating systems.

Reviewed by: corvink
Differential Revision: https://reviews.freebsd.org/D53467
94976733d35234c629fdb086036f2319c44eb08c Hans Rosenfeld 2026-02-05 18:52:56
bhyve/virtio-scsi: Unlimit max_sectors
The old default of 2 for max_sectors limits performance significantly
with guest systems where the virtio-scsi driver actually honors this
value.

As CTL doesn't seem to have any limit of the maximum size of a single
transfer, set this to INT32_MAX by default.

Reviewed by:    corvink
Differential Revision: https://reviews.freebsd.org/D53466
73ab91aaade5f33459fda16d9daf6526ab668c42 Hans Rosenfeld 2025-10-29 14:09:43
bhyve: Simplify passthru_msix_addr()
It can use the passthru_mmio_map() helper function.  Make that change,
and also make passthru_mmio_map() use EPRINTLN to fix formatting when
the guest console is stdio.

Reviewed by:    corvink, jhb
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D55067
86150ed98b7903feaba942f01619e74894cd23c4 Mark Johnston 2026-02-06 15:30:56
daemon: Add option for output file mode
The daemon utility has always created its output file with a fixed mode
of 0600. This causes issues for log collection setups where the collector
does not run as root but instead relies on group access to the watched
daemon’s log file.

Introduce a new option that allows specifying the output file mode using
install(1)-style semantics. This enables non-root log collectors to access
the file as intended and improves compatibility with log rotation tools.

Reviewed by:    kevans
MFC after:      1 week
Relnotes:       yes
Differential Revision:  https://reviews.freebsd.org/D54930
a3b90a1f008365d9f62773998f89f9c872e2bed5 Michael Osipov 2026-01-28 18:49:26
vmrun.sh: add option for sharing directory via p9fs to bhyve
Reviewed by:  markj
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D55100
525d00dcf45f6f83b188cf1ad7bfcfcc8ea39eca David Marker 2026-02-07 21:28:58
bsdinstall: Add note to zfsboot pointing to release/tools/vmimage.subr
The VM image creation scripts have a copy of this list of datasets which
should be kept in sync, which can otherwise be easily missed, as was the
case in the now-reverted 3e8619e535b6 ("bsdinstall: Create separate
datasets for directories in /usr/ports").
825aaabcc7ac3750b330d3e54bd1ccf349df48c9 Jessica Clarke 2026-02-08 17:17:06
flua: Fix SIGSEGV in lua_chown when uid/gid doesn't exist
When lua_chown is used to call chown(2) internally, it first resolves
the user and/or group by calling the getpwnam_r(3) and getgrnam_r(3)
functions, respectively. However, although it checks for errors, it does
not check when entries are not found (which is not an error), which
means that the buffer will be set to NULL, and since lua_chown attempts
to access the NULL structure, it will receive a SIGSEGV signal.

Reviewed by:                    imp@
Approved by:                    imp@
Differential Revision:          https://reviews.freebsd.org/D55172
436af5715cdbea87de53d63fcc3762591d93b028 Jesús Daniel Colmenares Oviedo 2026-02-08 20:35:25
rc.d: Convert more service to Use startmsg
Signed-off-by: Thibault Payet <contact@thibaultpayet.fr>
Reviewed by: imp,mhorne
Pull Request: https://github.com/freebsd/freebsd-src/pull/2001
d3ed0e0ab06a1434032abd7f013d02611567fd43 Thibault Payet 2026-02-03 09:27:41

Libraries

libc: Clean up *dir() code
Fix style nits (mostly whitespace issues) and clean up the manual page.

MFC after:      1 week
Sponsored by:   Klara, Inc.
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D55024
387ae6390534b6e9b48931840e7bc76eeb0b258d Dag-Erling Smørgrav 2026-02-02 15:46:53
Commit group #11: libc: Improve POSIX conformance of dirfd()
libc: Improve POSIX conformance of dirfd()

POSIX states that dirfd() should set errno to EINVAL and return -1 if
dirp does not refer to a valid directory stream.  Our interpretation is
that this applies if dirp is null or the file descriptor associated
with it is negative.

MFC after:      1 week
Sponsored by:   Klara, Inc.
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D55025
5074d5c9845e142883cdbb9ad212be66e57615d0 Dag-Erling Smørgrav 2026-02-02 15:46:57

libc: Fix missing include

Although not needed on FreeBSD due to namespace pollution, we should
technically #include <stddef.h> to secure a definition of NULL.

Fixes:          https://cgit.freebsd.org/src/commit/?id=5074d5c9845e ("libc: Improve POSIX conformance of dirfd()")
1c00d5a3b234ef937d848956027e9de5ea8010f9 Dag-Erling Smørgrav 2026-02-02 16:26:17
clnt_broadcast(3): don't free function pointers
Replace use of thr_getspecific/thr_setspecific to stash the function
pointer we're smuggling between clnt_broadcast and rpc_wrap_bcast with a
simple thread local variable.  Clear it after use so the reference
doesn't linger.

In the relatively unlikely event clnt_broadcast was called from threads
that exited prior to program termination, the previous code called free
on a function pointer, which is undefined and might corrupted allocator
state.

Effort:         CHERI upstreaming
Reviewed by:    glebius, jhb
Sponsored by:   DARPA, AFRL
Differential Revision:  https://reviews.freebsd.org/D54939
47413f23e503e796989b35dfb04e453c5b6e2d01 Brooks Davis 2026-02-02 21:20:01
clnt_broadcast(3): fix eachresult argument type
The `eachresult` argument is documented to take a function pointer of
type:

        bool_t (*)(caddr_t, struct sockaddr_in *)

It was declared to take a resultproc_t which has historically been
declared to be:

        bool_t (*resultproc_t)(caddr_t, ...);

This overlapped well enough for currently supported ABIs where variadic
arguments are passed in registers, but this declaration is misaligned
with the documentation (resultproc_t takes three arguments) and will be
fixed in a followup commit.

Fix the type to be non-variadic, matching callbacks, and define a
convenience type of as most callbacks take something other than a char *
as their first argument and need to be cast.

Effort:         CHERI upstreaming
Reviewed by:    ngie, glebius, jhb
Sponsored by:   DARPA, AFRL
Differential Revision:  https://reviews.freebsd.org/D54940
e236502a997da6bc94d018d5c5f79bfe17f0f1e7 Brooks Davis 2026-02-02 21:20:10
rpc: correct resultproc_t's type
It takes exactly three arguments of known type.

Tweak the types of various resultproc_t functions to match the type (mostly
added const to struct pointers) allowing us to drop casts.

Effort:         CHERI upstreaming
Reviewed by:    vangyzen, glebius
Sponsored by:   DARPA, AFRL
Differential Revision:  https://reviews.freebsd.org/D54941
18d47c1856f4ec3f7a2f9a726bba2ebe64d63dd7 Brooks Davis 2026-02-02 21:20:16
libc/aarch64: Split out the MOPS functions
This allows static binaries to only include the functions they
reference.

Reviewed by:    imp
Sponsored by:   Arm Ltd
Differential Revision:  https://reviews.freebsd.org/D54775
f0516ed4652cfb7435f8c5a16b46dc067779a1a8 Andrew Turner 2026-02-03 14:01:07
libc/aarch64: Add memset for a 64 byte dc zva
On arm64 we can use the "dc zva" instruction to zero memory. The CPU
tells software if the instruction is implemented, and if so the size
and alignment it will use.

When the size is 64-bytes the Arm Optimized Routines implementation of
memset can use dc zva to zero memory, and has a build flag to skip
checking.

Use this flag to build a version of memset that will be used when this
assumption is true.

Sponsored by:   Arm Ltd
Differential Revision:  https://reviews.freebsd.org/D54776
32d1f18865abe94d351a6f178a93b7195595ec69 Andrew Turner 2026-02-03 14:01:32
libdiff: Simplify truncation detection
* Adjust the comment to reflect the fact that SIGBUS can occur not only
  if the file is truncated, but also if an I/O error occurs while paging
  in any part of it.

* Instead of setting a flag, just return EIO.

* Adjust the unit test accordingly.

MFC after:      1 week
Sponsored by:   Klara, Inc.
Reviewed by:    thj, kevans
Differential Revision:  https://reviews.freebsd.org/D55108
a689bfa4e25af8307709dc12f75b0e02a65abf18 Dag-Erling Smørgrav 2026-02-05 14:39:34
libfetch: Check for failure to create SSL context
* Drop the ssl_meth member, there is no reason to hang on to it.

* Replace deprecated SSLv23_client_method() with TLS_client_method().

* Check the return value from SSL_CTX_new().

MFC after:      1 week
PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292903
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D55098
4e160c6197f75fda3d5d5997ce893087058cf718 Dag-Erling Smørgrav 2026-02-07 14:24:40

Filesystems

devfs: unlock the directory vnode around the call to dev_clone handler
The lock around dev_clone is unfortunate because cloner might need to
take its own locks that establish the order with devfs vnodes, and then
transiently participates in further VFS locks order.  For instance, this
way the proctree_lock or allproc_lock become involved.

Unlock dvp, we can unwind if the vnode become doomed while cloner was
called.

Reported and tested by: pho
Reviewed by:    kevans, markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D55028
a8e92198f854c2766eedec5a2ea3cc23c64d7b12 Konstantin Belousov 2026-01-26 01:49:32
bectl: Add -E flag to create an empty boot environment
Signed-off-by: Pat Maddox <pat@patmaddox.com>
Reviewed by:    kevans
MFC after:      1 week
Closes:         https://github.com/freebsd/freebsd-src/pull/1975
2e020c84cb5ee1452e448f27ff7a7b6076c0147a Pat Maddox 2026-02-05 03:54:09

Kernel

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

sdt: Use the "cc" operand modifier for the address of probes for GCC 15+
This is required for GCC on RISC-V.  The GCC 15 docs claim that "cc" is
similar to "c" except that it "tries harder".

NB: I have not yet found a way to make the DTrace probes compile on
RISC-V with older versions of GCC.

Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D54964
f7144a9c4a11214a71a3091ce1b232a8243b83ea John Baldwin 2026-02-02 17:19:51
Re-introduce kern.sched.topology_spec
Move it back from kern.sched.ule.topology_spec.
Make it scheduler-agnostic.
Provide trivial report for UP kernels.

Apparently the MIB is used by some third-party software.  Obviously it
did not worked on UP or 4BSD configs.

PR:     https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292574
Reviewed by:    olce
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D55062
120ca8d74b46caa260702485e30fe5f9f9984682 Konstantin Belousov 2026-02-02 20:22:46
unmount(2): do not allow MNT_DEFERRED or MNT_RECURSE flags from userspace
Repprted and tested by:       pho
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
cd8d44173adc375b59a24b1363476c086a7c86b4 Konstantin Belousov 2026-02-02 22:38:32
vm_phys: Check `RB_FIND()` return value in case it is NULL
When trying to unregister a fictitious range in
`vm_phys_fictitious_unreg_range()`, the function checks the properties
of the looked up segment, but it does not check if a segment was found
in the first place.

This can happen with the amdgpu DRM driver which could call
`vm_phys_fictitious_unreg_range()` without a fictitious range registered
if the initialisation of the driver failed (for example because
firmwares are unavailable).

The code in the DRM driver was improved to avoid that, but
`vm_phys_fictitious_unreg_range()` should still check the return value
of `RB_FIND()` before trying to dereference the segment pointer and
panic with a page fault.

Reviewed by:    emaste
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55076
465ba08bb53796b24dceca0d2ccde5a0e2630a2b Jean-Sébastien Pédron 2026-02-03 12:04:58
Commit group #12: sockets: let protocols be responsible for socket buffer mutexes
sockets: let protocols be responsible for socket buffer mutexes

Sockets that implement their own socket buffers (marked with PR_SOCKBUF)
are now also responsible for initialization of socket buffer mutexes in
pr_attach and for destruction in pr_detach (or pr_close).

This removes a big bunch of reported LORs, as now WITNESS is able to see
that tcp(4) socket buffer mutex and netlink(4) socket buffer mutex are two
different things.  Distinct names also improve diagnostics for blocked
threads.

This also removes a hack from unix(4), where we used to mtx_destroy().
Also removes an innocent bug from unix(4) where for accept(2)-ed socket
soreserve() was called twice.  This one was innocent since first call to
soreserve() was asking for 0 bytes of space.

This slightly increased amount of pasted code in TCP's syncache_socket().
The problem is that while for sockets created with socket(2) it is
pr_attach responsible for call to soreserve() (including !PR_SOCKBUF
protocols), but for the sockets created with accept(2) it was
solisten_clone() doing soreserve(), combined with the fact that for
accept(2) TCP completely bypasses pr_attach. This all should improve once
TCP has its own socket buffers.

Reviewed by:            markj
Differential Revision:  https://reviews.freebsd.org/D54984
64f7e3c9c178ab35cb1f8fdf791aec74ede6f6b2 Gleb Smirnoff 2026-02-03 17:09:49

sockets: repair sctp_peeloff(2)

The shim function soattach() may be passed a non-listening socket by SCTP.

NB: the change makes soattach() more hairy, but long term plan is that
this function goes away.

PR:     https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=293010
Fixes:  https://cgit.freebsd.org/src/commit/?id=64f7e3c9c178ab35cb1f8fdf791aec74ede6f6b2
f5923578eb67c6363e4575c107d3be3180ac9371 Gleb Smirnoff 2026-02-06 18:51:38
Commit group #13: sysctl(9): Booleans: Accept integers to ease knob conversion
sysctl(9): Booleans: Accept integers to ease knob conversion

In sysctl_handle_bool(), if the output buffer (for the old value) has
room for exactly 4 bytes (sizeof(int)), then output the current boolean
value as an integer rather than a 'uint8_t'.  Conversely, if 4 bytes
exactly remain in the input buffer (for the new value), treat them as an
integer and derive the new boolean value from it.

Doing so allows to convert existing integer syscstl knobs that are
interpreted as a boolean into true boolean ones while staying
backwards-compatible.

That brings no drawback as no code currently uses sysctl_handle_bool()
as part of a series of calls to sysctl_handle_*() functions for
(de)serialization of some compound structure.  If that case ever
materializes, it can be easily solved, e.g., by creating
a sysctl_handle_bool_strict() variant.

In the future, we might want to go further and generally be more liberal
in the external type of integers we accept and output, by tolerating any
kind of supported integers (8-bit to 64-bit), enabling integer type
changes of knob's internal representations without breaking the ABI for
consumers hardcoding the passed integers (instead of relying on sysctl
knob type information).

Reviewed by:    jhb
MFC after:      2 weeks
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D54925
406da392ef8d77b39fe9bfd36bdb440eb3e5ae0a Olivier Certner 2026-01-27 09:45:03

sysctl(9): Booleans: Fix old value length discovery

When calling sysctl(3) with a null 'oldp', i.e., length discovery mode,
'oldix' can be equal to 'oldlen', and we should not fail.

More generally, let SYSCTL_OUT() and SYSCTL_IN() handle corner cases,
simply removing the comparisons between 'oldidx' and 'oldlen' and
'newidx' and 'newlen' done by hand as the test just after is an equality
that does not require to know if 'idx' is smaller than 'len'.

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292917
Reported by:    cy
Fixes:          https://cgit.freebsd.org/src/commit/?id=406da392ef8d ("sysctl(9): Booleans: Accept integers to ease knob conversion")
Sponsored by:   The FreeBSD Foundation
895e1c6567d9561c86f8d20b47e924911bce989e Olivier Certner 2026-02-03 22:25:46
LinuxKPI: add str_read_write()
Needed by a wireless driver.

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
Reviewed by:    kib, emaste
Differential Revision: https://reviews.freebsd.org/D55029
6ea242cc305b7ec5b44488c9f04d413ebbf0b731 Bjoern A. Zeeb 2026-01-31 23:16:06
LinuxKPI: string_choices.h: use ternary operator
Switch from using if () else to a direct return (?:) code.
No functional changes.

Suggested by:   kib (D55029)
Sponosred by:   The FreeBSD Foundation
MFC after:      3 days
Reviewed by:    emaste (before removing more () as suggested by him)
Differential Revision: https://reviews.freebsd.org/D55088
8df7af9c9ecf7fc0b1c664f3d95893a9fcc16fcd Bjoern A. Zeeb 2026-02-03 18:50:00
sys/power.h: enum power_sstate_transition
Turn POWER_SLEEP_STATE_* defines into enum power_sstate_transition.

Reviewed by:    markj
Approved by:    markj
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D52497
d35e369d0a7f37c580b89485a148d007faf05b52 Aymeric Wibo 2026-02-05 14:55:17
riscv: implement kernel ifunc resolution
This completes the set of architectures implementing this feature.

Move the calls to sched_instance_select() and link_elf_ireloc() later in
initriscv(), after identify_cpu(0). There will be more information
available to any resolver functions at this time.

Reviewed by:    imp, kib
MFC after:      2 weeks
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D55082
cf41d1113377c44be5aad20c2f7ff2c5324ca89f Mitchell Horne 2026-02-05 16:11:25
sched_shim: Drop the no-ifunc case
Now all architectures support kernel ifunc resolvers. Therefore, the
alternate implementation can be removed.

Reviewed by:    kib
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D55114
0d3652f67d246348e2c017205c6782caf4484449 Mitchell Horne 2026-02-05 16:12:03
sys/subr_module: remove useless macro gates
These constants are always defined by sys/sys/linker.h.

Reviewed by: vexeduxr
Signed-off-by: Quentin Thébault <quentin.thebault@defenso.fr>
Sponsored by: Defenso
MFC after: 2 weeks
Closes: https://github.com/freebsd/freebsd-src/pull/2004
912418193ed1f9a0f58b083037751b1fbc4c30ef Quentin Thébault 2026-02-05 14:57:11
sys/conf/options: remove improper full stops
Only keep them when used in a sentence.

Reviewed by: vexeduxr
Signed-off-by: Quentin Thébault <quentin.thebault@defenso.fr>
Sponsored by: Defenso
Closes: https://github.com/freebsd/freebsd-src/pull/2004
87b2c0168d9deb79aacf3f13dbd3201054371b2b Quentin Thébault 2026-02-06 06:03:21
STACKALIGN: Reimplement in terms of __align_down
This changes STACKALIGN to be type-preserving when operating on
pointers.

Reviewed by:    brooks, kib
Effort:         CHERI upstreaming
Sponsored by:   AFRL, DARPA
Differential Revision:  https://reviews.freebsd.org/D54920
e9a697bf20ccbb2a19f6ad01fa3e0c14e0390847 John Baldwin 2026-02-06 15:30:50
Commit group #14: LinuxKPI
LinuxKPI: 802.11: set extra tx info flag for EAPOL for mt76

mt76 requires IEEE80211_TX_CTL_USE_MINRATE to be set for EAPOL, so
add it.

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
c529e1a8f8edb575de6b109981c4ca7ffdd3b81c Bjoern A. Zeeb 2026-02-04 22:25:50

LinuxKPI: 802.11: make sure we are scheduled before wake_tx_queue()

If we are not scheduled before calling wake_tx_queue() packets may
never go out, which at first will look like EAPOL fails (as
wpa_supplicant suggest possibly with a wrong key).  Using monitor
mode it will be clear what is going on.
Pass a flag down to wake_tx_queue() to call ieee80211_schedule_txq()
in case (*wake_tx_queue)() is supported or not, which solves the
problem for the lkpi_80211_txq_tx_one() which was failing.

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
7d60647a1a6c19e7be33428c33b77faadfe863a1 Bjoern A. Zeeb 2026-02-04 22:39:01

LinuxKPI: 802.11: catch possible NULL pointer deref with mt76

With mt76 we, for the first time, see that txstat->skb or
txstat->info may not be filled in linuxkpi_ieee80211_tx_status_ext().
Guard for these cases checking for skb and info to be not NULL and
assume a TX failure in case info is NULL.

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
94be5dbdfd22de4ec9ad699803ae18d9d209d824 Bjoern A. Zeeb 2026-02-04 22:46:47
linux_file.c: Fix handling of NFS getdents() emulation
Bugzilla PR#292282 reports a problem, where a Linux
binary running in the Linuxulator gets bogus entries
in a readdir()/getdents() reply when the directory is
an NFS mount.

This appears to be caused by the NFS client including
entries with d_fileno == 0, which are always ignored by
BSD, but are not ignored by Linux.

This patch filters out the "d_fileno == 0" entries and
the reporter of the bugzilla PR notes that it fixes the
problem for him.

It could be argued that the NFS client should filter out
the "d_fileno == 0" entries, but the NFS client readdir
code is "fragile" and any change to it runs a significant
risk of causing regression type problems.

As such, since the LInuxulator is already broken for this
case, it seems safer to filter them out there.

PR:     https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292282
Tested by:      Jerry Williams <jwillia3@proton.me>
Reviewed by:    markj
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D54679
110f2567cb51f1eeddbd5d9937000ad64f6dc746 Rick Macklem 2026-02-07 22:12:55
vt: Fix handling of backtab
5fec99caff3ac4f476bb88078ebf85fbecf6afb3 Nathaniel Braun 2026-01-17 17:14:42

Build system

pkgbase-stage.lua: Add *-jail metapackages to the offline repo
Having *-jail metapackage variants on the installation media allows convenient offline jail creation.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1991
638fb31a75f69d8ed243a93eea0aa4a7510916f9 zxbv3 2026-01-27 16:24:14
pkgbase-stage.lua: Add '*-jail-dbg' variant to dvd1
- Add *-jail-dbg variant to dvd1 to match the non-jail variant;
- Remove assertion introduced in the previous commit for consistency with existing code.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1991
49d75d93206a9f3e92a5c6ff9cddb80c6cf77581 zxbv3 2026-01-29 06:07:57
Remove bsnmpd tests when MK_BSNMP == no
MFC after:    1 week
51509500acdc5d23285a962e9c55dd9e38d2b30a Enji Cooper 2026-02-03 05:12:25
tftpd: remove tests when MK_TFTP=no
MFC after:    1 week
1ccee516edb681b33182f0a57531752eb98ec838 Enji Cooper 2026-02-03 05:24:33
usr.bin/factor: remove tests when MK_GAMES=no
factor(1) is only installed when MK_GAMES != no. Ergo, remove the tests
when that's not true.

MFC after:      1 week
7baa76c30c833750007e8d8823c9f5d94f5b2925 Enji Cooper 2026-02-03 05:40:50
usr.bin/tftp: remove tests when MK_TFTP=no
These tests require the tftp client, which is not installed when
`MK_TFTP=no`. Remove them when that's not true.

MFC after:      1 week
e1f36b9db9220cf51c6c3d2d2ad230fb9490bc3e Enji Cooper 2026-02-03 05:44:47
Makefile.inc1: Don't mark GCC broken for riscv64
Reviewed by:  mhorne
Differential Revision:  https://reviews.freebsd.org/D54969
dbe9fa0be1d627522a532160f6f8780701b86c72 John Baldwin 2026-02-03 16:56:44
libc/aarch64: Add a Makefile.inc dependency
If we update Makefile.inc it may be to change the contents of these
files.

Reviewed by:    imp
Sponsored by:   Arm Ltd
Differential Revision:  https://reviews.freebsd.org/D54774
00f68392130cf597c7c76669c63dab26b31630c1 Andrew Turner 2026-02-03 14:00:46
Commit group #15: Remove additional libtpool and libuutil-related files
Remove additional libtpool and libuutil-related files

This change removes additional library files and tests orphaned in the
commit referenced below.

MFC with:       8b78d412a
Fixes: https://cgit.freebsd.org/src/commit/?id=8b78d412a ("zfs: world changes after https://cgit.freebsd.org/src/commit/?id=89f729dcc merge")
b78806b156f78733f8d6f1e0d593845e5e55221e Enji Cooper 2026-02-04 07:28:41

Remove the tpool Kyuafile as well as the test

This was accidentally missed in b78806b156f78733f8d6f1e0d.

Reported by:    des
Fixes:          https://cgit.freebsd.org/src/commit/?id=b78806b15 ("Remove additional libtpool and libuutil-related files")
d411a5d3a905b53cc61cb1a04cf0bef47f76adbf Enji Cooper 2026-02-08 07:37:52
OptionalObsoleteFiles: Add etc/zfs/compatibility.d
If the world is built and installed with WITHOUT_ZFS, then make
-DBATCH_DELETE_OLD_FILES delete-old-dirs will give the error:

> rmdir: /etc/zfs: Directory not empty

because /etc/zfs/compatibility.d is still there.  While we're here,
clean out /usr/share/zfs as well.

Co-authored-by: kevans
Differential Revision:  https://reviews.freebsd.org/D54758
5c9d988d865cc4ce849507173c0a2e2f399d0f62 Artem Bunichev 2026-02-05 03:35:01
builtin.1: Command list maintenance
+ link to return(1) like the other exclusive builtins
+ fix alphabetical sorting of list in rendered manual

MFC after:      3 days
e54a1ef4ebdf1ea606eb0e00cf2345f9c0db7a7f Alexander Ziaee 2026-02-05 03:37:08
hyperv: Add opt_acpi.h to SRCS
Add opt_acpi.h to SRCS as it is required by the hyper-v pcib sources.

Reviewed by: imp
Sponsored by: Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D48166
b18604ed93766b317dd40438793b714523b50123 Vijeyalakshumi Koteeswaran 2026-02-05 15:34:17
usr.sbin/jail/Makefile: remove riscv linker workaround
It links fine with newer binutils 2.44 (and GCC 15), so the workaround
can be dropped.

Reviewed by:    emaste
PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=242109
MFC after:      3 days
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D55083
39148cbead211163f7e5a203d7c88ece5c3e30e0 Mitchell Horne 2026-02-05 16:41:31
release: Pass optional VM_IMAGE_CONFIG to vm-image
`make vm-image` calls mk-vmimage.sh, which supports
`-c CONFFILE`. This file gets sourced before building the image.

One example of how to use it is to define
vm_extra_filter_base_packages() to filter the list of packages
installed into the VM image:

    # vm-nodbg32.conf
    vm_extra_filter_base_packages() {
        grep -v -E '(-dbg|lib32)'
    }

    $ make VM_IMAGE_CONFIG=path/to/vm-nodbg32.conf \
        VMFORMATS=raw \
        -DWITH_VMIMAGES \
        vm-image

Signed-off-by: Pat Maddox <pat@patmaddox.com>
Reviewed by:    cperciva
Closes:         https://github.com/freebsd/freebsd-src/pull/1993
93f482ab3e6b4577f13e85e216a50bdf3704dda3 Pat Maddox 2026-02-06 07:50:20
universe: Bump default GCC version to 15
Reviewed by:  lwhsu, emaste
Differential Revision:  https://reviews.freebsd.org/D55085
f73101fabc74255d70f4e7ce0e71f0f6655c51ea John Baldwin 2026-02-06 15:32:58
qlnxev: Remove now unneeded include for opt_inet.h
Since the change [1], this is not required anymore.

This change partially reverts commit 8a847947153e.

[1] 4012b63889e4 qlnxe: Let ether_ioctl() handle SIOCSIFADDR ioctl

Reviewed by:    kbowling
MFC after:      5 days
Differential Revision:  https://reviews.freebsd.org/D54889
ec7950fe42344900567cb72c83845ea4dc5a7114 Zhenlei Huang 2026-02-06 17:52:54
release: Turn off debugging in pkg(8)
Running `pkg -d` in pkg-stage.sh results in multiple GB of network
traffic being written into the log files, which is less than helpful
when it comes to tracking down build failures.  Remove the -d flag.

MFC after:      5 days
X-MFC-note:     The code in 15 has diverged from 14, but the flag is
                there, just in a different place.
18721be356043f6749a6e2470bc9f7351c450c6e Colin Percival 2026-02-06 21:03:11
mt76: sort bus attachments in module Makefiles for pci and usb
With PCI enabled and USB still disabled add knobs to (i) enabled
them manually in the common Makefile.inc and (ii) add bus
attachment depend knobs where needed to enable them in individual
drivers.  For now the focus is in 7921 and 7925.

Sponsored by:   The FreeBSD Foundation
MFC atfer:      3 days
201fc8a55a4832174b5943e17ac90800aebe5772 Bjoern A. Zeeb 2026-02-02 01:23:10
mt76: module Makefiles fix .PATH
The common Makefile.inc had the .PATH set for the common code.
That .PATH is only needed for the mt76_core module, which shares
code for all other drivers.  We leave the COMMONDIR variable defined
in Makefile.inc as we need it for CFLAGS+= -I for each driver but
migrate the .PATH to avoid drivers picking up the wrong files.

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
03f6b1fd6af0bb43f74b38d8b5373f5485da0e8f Bjoern A. Zeeb 2026-02-03 18:26:37

Internal organizational stuff

ObsoleteFiles.mk: Remove obsolete MIT KRB5 plugins
d0309745e621dd0554f271f4b7e2bc5e8ff597e4 Cy Schubert 2026-01-19 15:51:47
committers-ports: Belatedly add jwb
8c40c7bb361f0c8b595bfee9dc6f8790e0eb6d68 Alexander Ziaee 2026-02-05 14:12:29
MAINTAINERS, CODEOWNERS: Update capsicum-test
Fixes: https://cgit.freebsd.org/src/commit/?id=670b568ec1c3 ("capsicum-test: Move out of contrib")
Sponsored by: The FreeBSD Foundation
b773da180e02c0c27de48dbba72f3fb7a64656da Ed Maste 2026-02-05 18:21:27
MAINTAINERS, CODEOWNERS: Add myself for vt(4) review
d255b40e2dcce2ec085931bdbd19520bca9136ec Ed Maste 2026-02-08 17:41:58

Testing

atf_python: Run vnet handlers in $HOME
When kyua runs a test, it creates a temp directory and sets $HOME to
point to it.  Tests are run with the cwd set to that temp directory.

When a process attaches to a jail, its cwd is set to the root of the
jail.  Modify atf_python to cd to $HOME instead, so that it's easier for
tests to share files.

Reviewed by:    zlei, ngie
MFC after:      2 weeks
Sponsored by:   Stormshield
Sponsored by:   Klara, Inc.
Differential Revision:  https://reviews.freebsd.org/D54971
07940d1d85eb338853fcba0697c6b9a96412a7f2 Mark Johnston 2026-02-02 14:52:43
tests/netgraph: fix tests that depended on connect(in6addr_any)
32c3723f06554db7d0da49c6f361c7b8f1a394c1 Gleb Smirnoff 2026-02-02 20:15:26
libc/tests: Clean up *dir() tests
Mainly, avoid reusing the name of one of the functions we should be
testing (but aren't) for local variables.

Sponsored by:   Klara, Inc.
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D55054
d70b9eb74fc4aa430bd2ff4bca37e6a9b6c8004f Dag-Erling Smørgrav 2026-02-03 14:39:21
m4: Convert tests to ATF
MFC after:    1 week
Sponsored by:   Klara, Inc.
Reviewed by:    imp
Differential Revision:  https://reviews.freebsd.org/D55115
16e073df4a33646fa0e0fba5b41ddc6b44df3605 Dag-Erling Smørgrav 2026-02-07 18:16:17

Style, typos, and comments

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

tftpd tests: clean trailing whitespace
No functional change intended.

MFC after:      1 week
fd6217075e6a5926bdc627145b38194b6c5ba8da Enji Cooper 2026-02-03 05:17:54
stand: Minor style tweaks
re-wrap the function calls in a couple of ifs in get_zfs_root so they
are more readable. They really didn't need to be wrapped like this in
the first place.

Sponsored by:           Netflix
fe8105de1485063a02ff25e686761247f78aaed9 Warner Losh 2026-02-04 17:19:43
endian.h: Visibility comment: Fix grammar, a typo and punctuation
No functional change.

MFC after:      2 weeks
Sponsored by:   The FreeBSD Foundation
8bdcfc2a3febcd1aade1d9a3a8a87581c7b2928d Olivier Certner 2026-02-05 15:55:48
hwpstate_amd(4): attach(): Fix style
No functional change intended.

Reviewed by:    aokblast, emaste
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D55003
0f747142c16b1f1921f8f983cba362a204158e9a Olivier Certner 2026-01-29 14:08:47
libsa/geli: Fix a typo in an error message
- s/crypo/crypto/

MFC after:      5 days
fa567fe7c537950fe48e35fa3b0827af4a45ec57 Gordon Bergling 2026-02-07 05:20:16
netinet6: Fix my style issues
Reported by:          pouria
Reviewed by:            pouria, ziaee, glebius
Approved by:            glebius
Fixes:                  https://cgit.freebsd.org/src/commit/?id=31ec8b6407fdd5a87d70265762457c67ce618283
Differential Revision:  https://reviews.freebsd.org/D55136
4548149a81026ad9b1706b2b7e7ad47a4c1358b6 Guido Falsi 2026-02-07 12:46:05
arm/broadcom: Fix a typo in a source code comment
- s/preceeded/preceded/

MFC after:      3 days
8aa4fa7bf9b36a873aa2fd3cc22e8e15b97ea81e Gordon Bergling 2026-02-08 11:58:39
kern: Fix a typo in a source code comment
- s/segement/segment/

MFC after:      3 days
f87ab066722f3ffb19885ed501a7a136355340a2 Gordon Bergling 2026-02-08 11:59:37
qlnxe(4): Fix a typo in a source code comment
- s/segement/segment/

MFC after:      3 days
ff08ad36c2acb3553b9f585a9bd01fd1306bfd7e Gordon Bergling 2026-02-08 12:00:39
mlx(4): Fix a typo in a source code comment
- s/segements/segments/

MFC after:      3 days
3e46676638ac089c71e8424961449895c0babcfb Gordon Bergling 2026-02-08 12:01:27
nfsserver: Fix a typo in a source code comment
- s/preceeded/preceded/

MFC after:      3 days
afe666a8db82c42fe0b8d55d3142c9d305d1bc28 Gordon Bergling 2026-02-08 12:02:40
Commit group #16: chore: asmc: additional style(9) cleanup
chore: asmc: additional style(9) cleanup

Pick out non-gratuitous style(9) changes suggested by `clang-format` on
the driver. This helps eliminate minor stylistic issues with spaces,
braces, line lengths, etc, so future functional changes in the driver
will be easier to pick out.

Many of the other `clang-format` suggested changes were not taken because
they were considerably more gratuitous.

No functional change intended.

MFC after:      1 week
d76bb14e0224e235209d8c07ec132d602b18648b Enji Cooper 2026-02-08 20:04:32

asmc: unbreak build: add missing curly brace

Fixes:  https://cgit.freebsd.org/src/commit/?id=d76bb14e022 ("chore: asmc: additional style(9) cleanup")
9ccdf3f36e014f0060ea192ffed91a7679003355 Enji Cooper 2026-02-08 23:51:51
chore: ignore style(9) changes made in dd1410321
MFC after:    1 month
2fe3f16b1c219d2565a60a8bb3142b437f8c683f Enji Cooper 2026-02-08 20:09:27
Fix typo in build(7) man page
Signed-off-by: Kalevi Kolttonen <kalevi@kolttonen.fi>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/2009
e4b1dc43289853910c791b3de470ff5f6fb6fe76 Kalevi Kolttonen 2026-02-08 20:34:25
t_ptrace_wait.c: clean up trailing whitespace
This is being done to aid with future potential updates of this file.

MFC after:      1 week
fa3519d068d95f87e773d27f96e9f1e18f70075a Enji Cooper 2026-02-08 23:40:56

Contrib code

MFV less v691
Relnotes:     yes
MFC after:      2 weeks
dafba19e42e78cd3d7c9264ece49ddd3d7d70da5 Xin LI 2026-02-02 20:50:35
Commit group #17: mt76
mt76: sort out MODULE_DEPEND for PCI and USB

It is not enough to depend on mt76_core which then depends on linuxkpi
and linuxkpi_wlan.  Given each mt76 driver is its own module, each
also needs to depend on these linuxkpi modules.
In addition the core module usb part also has to depend on linuxkpi_usb.

This in addition to the previously sorted PCI drivers, allows (or will
allow) the individual chipsets (drivers) to load on systems with USB,
if compiled in, as well.

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
b129f79a8985a92cd061afa4ee31311cfe31d285 Bjoern A. Zeeb 2026-02-02 01:24:07

mt76: make USB compile

This is the mt76-specific changes to make the USB driver targets for
7921 and 7925 compile.

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
642c8387647daabc2505497cdafef4d3ce82bbf2 Bjoern A. Zeeb 2026-02-03 18:25:02

mt76: mt7925: add missing LINUXKPI_PARAM_PREFIX

There is a module_param_named() in the file so we need to set
LINUXKPI_PARAM_PREFIX to get it a uniq sysctl name.  mt7921
has the exact same option.  Without their individual prefixes
the names would clash on systems with both chipsets and not
work for both.

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
bc820edd2d7906e04e93aef8a6137991ad86f4cc Bjoern A. Zeeb 2026-02-04 22:20:37

mt76: fix a check wrongly giving us random ether addresses all the time

Do not cover the is_valid_ether_addr() check under CONFIG_OF.
Unclear if this is an initial porting or a merging error before the
driver hit the FreeBSD src tree.
The end result was that we always got a random link-layer address,
while the individual drivers may have setup phy->macaddr and this
function would only overwride if given in device tree.
Only if both, driver and and the OF backup, fail then go and use
the random link-layer address.

While here adjust printing the random link-layer address using
a FreeBSD format specifier and not the unsupported Linux one.

Fixes:          https://cgit.freebsd.org/src/commit/?id=6c92544d7c97
Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
3afe9e12fb331dc698ac62f3b918d82d768a2792 Bjoern A. Zeeb 2026-02-05 00:20:04
MFV: Import blocklist 2026-02-07 (10a907f)
Merge commit 'a39ba5e2935176fe982235556e46ba3f51178187'

Changes:

https://github.com/zoulasc/blocklist/compare/8a4b011...10a907f

MFC after:      3 days
56c94c76432b1aafcc9b099398e674f0ae87623c Jose Luis Duran 2026-02-07 22:59:49
blocklist: blacklist: Chase recent upstream changes
MFC after:    3 days
a25b12c6ce63be1fefb31d14daca332682fd31fc Jose Luis Duran 2026-02-07 23:06:32

Reverted commits

Revert "sym(4): Employ memory barriers also on x86"
The problem will be avoided in a different way.

This reverts commit e769bc77184312b6137a9b180c97b87c0760b849.
bfbcd310bd4997c4ddb21bb81d61f2f29c68937c Marius Strobl 2026-01-28 21:20:42
Revert "acpi: Make taskqueue only run on BSP"
This change causes some ACPI problems, such as power button events being
processed even if just used for resume.

This reverts commit c0df8f6f0e6a5f77ec9140e8075d09c55fe4c3c7.
f3e9c94bc5e6b819c9c95020a2f60d523d55cb66 Aymeric Wibo 2026-02-07 20:09:54
Revert "Additional icache paranoia: non-PLT relocations can modify the text segment."
reloc_nonplt_object, and thus reloc_non_plt, only ever handles data
relocations, so this paranoia is completely unfounded and only has the
effect of significantly slowing down program startup for binaries with
large amounts of code, like Clang.

If this breaks any systems, that would likely be due to insufficient
flushing in the pmap implementation for executable mappings, as this
existing rtld behaviour would mask any such bugs.

This reverts commit 4b51c69976fd84e93ec7695858375c8150c4fe61.

Reviewed by:    adrian
Differential Revision:  https://reviews.freebsd.org/D54221
5beaa1ee7595ce4a09ac4827ec3e3e2aa13a9f67 Jessica Clarke 2026-02-08 16:35:01
Revert "bsdinstall: Create separate datasets for directories in /usr/ports"
This reverts commit 3e8619e535b61c99f0dc50cc6c7e237eb82a8be7.

While it's generally a good idea to have separate datasets for things
like this, it breaks git clone with:
fatal: destination path 'ports' already exists and is not an empty directory.

Signed-off-by: Ricardo Branco <rbranco@suse.de>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/2006
be3962a383dbbbd6fef458879173f09dc2f2373d Ricardo Branco 2026-02-08 12:41:04

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-02-02 (debug) (contains info about the classification)