FreeBSD git weekly: 2025-09-29 to 2025-10-05

Introduction

This is a display of mostly-automatically-classified git commits from 2025-09-29 to 2025-10-05.

In the future, these reports might include summaries or additional information, but for now our focus is figuring out what type of classification would be most useful.

Table of contents and commits per category:

(5) Highlighted commits (these are copies, not in stats)
3 1.2% Userland programs
20 8.3% Documentation
55 22.9% Hardware support
19 7.9% Networking
27 11.2% System administration
7 2.9% Libraries
6 2.5% Filesystems
14 5.8% Kernel
51 21.2% Build system
4 1.7% Internal organizational stuff
11 4.6% Testing
4 1.7% Style, typos, and comments
9 3.8% Contrib code
10 4.2% Reverted commits
0 0.0% Unclassified commits
240 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.

mdo(1): Add support and shortcuts for fully specifying users and groups
While preserving compatibility ('root' implied if no user is specified,
option '-i' not setting groups), introduce options to control finely
which user and group IDs are set in the launched process.

To minimize the risks of user error, mdo(1) by default enforces that all
user and group IDs are specified, either with explicit values from the
command-line or, if a known user name is passed with '-u', from the
corresponding content of the password and group databases.  The other
main type of use cases is to start from the current process'
credentials, only amending part of them.  It is now also possible to
blend both approaches, where some parts must be specified and the others
can just be amended or left as is.

Options:

* As before:
-u: Specifies a user name or ID to change all user IDs to.  If a known
    name is passed, also automatically sets all groups as per the
    password and group databases.
-i: Starts from the current groups, instead of having to specify them
    by using '-u' with a known user name or explicitly.

* New:
-k: Starts from the current users (incompatible with '-u').  Implies '-i'.
-g: Sets/overrides the primary group IDs with the passed group name or ID.
-G: Sets/overrides the supplementary groups set with the passed list of
    comma-separated names or IDs.
-s: Amend the supplementary groups set according to the list of
    comma-separated directives from the following:
    - @: Empties the set.  Must be the first directive.  Incompatible with '-G'.
    - +<group>: Add a group to the set.
    - -<group>: Remove a group from the set.  Takes precedence over +<group>.
--euid: Overrides the effective user ID.
--ruid: Overrides the real user ID.
--svuid: Overrides the saved user ID.
--egid: Overrides the effective group ID.
--rgid: Overrides the real group ID.
--svgid: Overrides the saved group ID.

Option '-k' was introduced as a requirement to be explicit when one
wants to keep the current user(s) instead of specifying new ones.  This
is both for the purpose of avoiding foot-shooting and preserving the
possibility to omit '-u' to switch to 'root'.  In order to avoid
confusion, if any user or group overrides are specified, mdo(1) however
enforces that either '-u' or '-k' has been specified (so, in practice,
'-u root' is implied only in the absence of any other options except
'-i').

Some base supplementary groups set is needed when '-s' is used without
directive '@'.  It can be an explicit one specified with '-G',
effectively meaning that '-G' is processed before '-s'.  Else, it is
determined from the password/group database (see initgroups(3)) if '-u'
with a user name was passed, or is simply the current set if '-i' (or
'-k') was specified.  Other cases require specifying the full set (using
'-G' or '-s' with '@'), and will fail otherwise.

As the release process for 15.0 is progressing, this is committed in
advance of the still-in-progress tests and manual page updates.

Note for MFC to stable/14: As initgroups() has its old behavior,
consistently with it, remove the effective GID from being passed also as
a supplementary group.

Reviewed by:    bapt
MFC after:      3 days
Relnotes:       yes
Event:          EuroBSDCon 2025
Sponsored by:   The FreeBSD Foundation
Sponsored by:   Google LLC (GSoC 2025)
Co-authored-by: Kushagra Srivastava <kushagra1403@gmail.com>
Differential Revision:  https://reviews.freebsd.org/D52613
3ca1e69028acdee30739c0e0856692395a36fd21 Olivier Certner 2025-09-25 11:30:00
Remove ftpd(8)
This was previously deprecated and is slated for removal in 15.0.
Users who still need ftpd(8) can install the ftp/freebsd-ftpd port.

Retain the ftp(d) PAM services since other FTP daemons use them.

Update /etc/inetd.conf to point to /usr/local.

Add ftpd to ObsoleteFiles, but do not list configuration files since
users may want to preserve these to use with the freebsd-ftpd port.

There is still some language in the manual referring to ftpd(8)
which is relevant to the port, which has been retained but updated
to reference the port.

MFC after:      3 days
Relnotes:       yes
Reviewed by:    cperciva
Differential Revision:  https://reviews.freebsd.org/D52739
614c8750ce116865953916b8b5bab2467ee94187 Lexi Winter 2025-09-29 20:26:26
UPDATING: bump __FreeBSD_version for drm-kmod/nvidia-drm vs. LinuxLPI
Both drm-kmod and nvidia-drm were updated to keep compiling and/or
working after the latest LinuxKPI PCI changes.  Some of what should
have worked for a long time but did not or conflicted was hidden
behind native PCI calls instead of using LinuxKPI.  We cleaned this
up.  Bump __FreeBSD_version so that users will get the updated packages.

MFC after:      3 days
PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=289647
52ce810302f70cc7b995651eb1b19adfa014b351 Bjoern A. Zeeb 2025-09-29 23:10:10
sh: Remove /.profile
root's home directory was moved to /root many years ago, so there's no
reason to keep this old link.  This brings sh in line with csh, where
/.cshrc was removed in dcb65c5a94d4.

Relnotes:       yes
Approved by:    re (cperciva)
MFC after:      1 day
PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=289097
Reviewed by:    cperciva, jilles, bapt, emaste
Differential Revision:  https://reviews.freebsd.org/D52161
d31e342bcc8e22d7eb25c21a711cd4b8a54db6c0 Lexi Winter 2025-09-30 06:02:06
packages: Add a sound package
Put virtual_oss, /etc/devd/snd.conf and the other audio-related tools
into a new "sound" package.  Don't create a separate -lib package,
since it's unlikely someone will want mixer(3) without mixer(8).

Put the sound package in the optional set rather than minimal, since
it's not actually required for audio hardware support, and many systems
(including nearly all servers) won't want it installed.

MFC after:      3 seconds
Reviewed by:    christos
Sponsored by:   https://www.patreon.com/bsdivy
Differential Revision:  https://reviews.freebsd.org/D52823
1b806e607f52285f973fb1106491668fd28da6a4 Lexi Winter 2025-10-02 01:16:11

Userland programs

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

mdo(1): Add support and shortcuts for fully specifying users and groups
While preserving compatibility ('root' implied if no user is specified,
option '-i' not setting groups), introduce options to control finely
which user and group IDs are set in the launched process.

To minimize the risks of user error, mdo(1) by default enforces that all
user and group IDs are specified, either with explicit values from the
command-line or, if a known user name is passed with '-u', from the
corresponding content of the password and group databases.  The other
main type of use cases is to start from the current process'
credentials, only amending part of them.  It is now also possible to
blend both approaches, where some parts must be specified and the others
can just be amended or left as is.

Options:

* As before:
-u: Specifies a user name or ID to change all user IDs to.  If a known
    name is passed, also automatically sets all groups as per the
    password and group databases.
-i: Starts from the current groups, instead of having to specify them
    by using '-u' with a known user name or explicitly.

* New:
-k: Starts from the current users (incompatible with '-u').  Implies '-i'.
-g: Sets/overrides the primary group IDs with the passed group name or ID.
-G: Sets/overrides the supplementary groups set with the passed list of
    comma-separated names or IDs.
-s: Amend the supplementary groups set according to the list of
    comma-separated directives from the following:
    - @: Empties the set.  Must be the first directive.  Incompatible with '-G'.
    - +<group>: Add a group to the set.
    - -<group>: Remove a group from the set.  Takes precedence over +<group>.
--euid: Overrides the effective user ID.
--ruid: Overrides the real user ID.
--svuid: Overrides the saved user ID.
--egid: Overrides the effective group ID.
--rgid: Overrides the real group ID.
--svgid: Overrides the saved group ID.

Option '-k' was introduced as a requirement to be explicit when one
wants to keep the current user(s) instead of specifying new ones.  This
is both for the purpose of avoiding foot-shooting and preserving the
possibility to omit '-u' to switch to 'root'.  In order to avoid
confusion, if any user or group overrides are specified, mdo(1) however
enforces that either '-u' or '-k' has been specified (so, in practice,
'-u root' is implied only in the absence of any other options except
'-i').

Some base supplementary groups set is needed when '-s' is used without
directive '@'.  It can be an explicit one specified with '-G',
effectively meaning that '-G' is processed before '-s'.  Else, it is
determined from the password/group database (see initgroups(3)) if '-u'
with a user name was passed, or is simply the current set if '-i' (or
'-k') was specified.  Other cases require specifying the full set (using
'-G' or '-s' with '@'), and will fail otherwise.

As the release process for 15.0 is progressing, this is committed in
advance of the still-in-progress tests and manual page updates.

Note for MFC to stable/14: As initgroups() has its old behavior,
consistently with it, remove the effective GID from being passed also as
a supplementary group.

Reviewed by:    bapt
MFC after:      3 days
Relnotes:       yes
Event:          EuroBSDCon 2025
Sponsored by:   The FreeBSD Foundation
Sponsored by:   Google LLC (GSoC 2025)
Co-authored-by: Kushagra Srivastava <kushagra1403@gmail.com>
Differential Revision:  https://reviews.freebsd.org/D52613
3ca1e69028acdee30739c0e0856692395a36fd21 Olivier Certner 2025-09-25 11:30:00
Tcopy: add -r option to usage()
97d395d91025b5b652f2998c90716c253600dcd1 Poul-Henning Kamp 2025-10-02 08:24:52
getconf: Report value of _SC_PHYS_PAGES
aa9e4fe3c9021d623743e26aef879a0036f87c0f Jason W. Bacon 2025-10-03 20:43:47

Documentation

Man pages, release notes, etc.

mpr.4: Improve HARDWARE introductory sentance
Add context for inclusion in Hardware Release Notes.

MFC after:      3 days
c856f327fa6ccf1c5b9e4f531581fa2a0d83c3e0 Alexander Ziaee 2025-09-29 13:23:24
aac.4: Improve HARDWARE introductory sentance
For the improvement of the hardware release notes. While here, tag SPDX.

MFC after:      3 days
17be686a39a07958f61e42c4b5c797bb1d1e9895 Alexander Ziaee 2025-09-29 19:58:48
ahc.4,ahd.4: Improve HARDWARE + tag SPDX
Add some context for the Hardware Relnotes, and tag SPDX while here.

MFC after:      3 days
2c2a2b8281be2f4270fd98eda743a3a8c2f36949 Alexander Ziaee 2025-09-29 22:32:42
namei.9: Remove duplicate WANTPARENT description
Fixes:          https://cgit.freebsd.org/src/commit/?id=5673462af533 ("namei.9: sort operational modifiers in numerical order")
MFC after:      2 days
Sponsored by:   The FreeBSD Foundation
f45608124286a7e0616d1d23b9506709f10c12fc Olivier Certner 2025-09-30 17:05:24
trim.8: update the manual with references to zpool-trim and fsck_ffs -E
MFC after:    3 days
5d8fde850768d31f722de6177204ec7cab199bd1 Eugene Grosbein 2025-10-01 04:05:54
ip(4): fix description of struct ip_mreqn
This is a minor bug, since the kernel ignores imr_address and applications
are not supposed to initialize it.
e91fc88bca02a74ea972ebf7f66aef3a3298ad54 Gleb Smirnoff 2025-09-29 22:50:42
arch.7: Remove mention of PDP11_ENDIAN
AFACT, this was never accurate.  When there was support (such as it was)
for PDP endian it seems to have been spelled PDP_ENDIAN.

Reviewed by:    imp, kib, emaste
Sponsored by:   Innovate UK
Differential Revision:  https://reviews.freebsd.org/D52817
0a551f8a7d68ca42d60824682123f12bba76c477 Brooks Davis 2025-10-02 09:25:01
arch.7: correct claim about ILP32 alignment
Only i386 lays out structures with weak (4-byte) alightment.  It may be
that access works when weakly aligned, but from an ABI perspective, it's
all about struct layout.

Reviewed by:    kib, emaste
Sponsored by:   Innovate UK
Differential Revision:  https://reviews.freebsd.org/D52818
f7b6ea699b23b3af81866ef3aafb398c2c0d45af Brooks Davis 2025-10-02 09:25:53
mmcsd.4: s/DESCRIPTION/HARDWARE + HISTORY + SPDX
This manual only describes a tiny amount suitable for the HW Relnotes.
Remove the description section and replace it with a hardware section
which will appear there.

MFC after:      3 minutes
Reported by:    ivy
History Ref:    5bcb64f20afff21be511cc5 (Add mmc and mmcsd)
0c1c81c479bef8d3e67f93ea00fc5d34ccf5af33 Alexander Ziaee 2025-10-02 14:55:18
usbhid.4: Note that it was enabled by default for 15.0
Also add cross-references to hkbd.4 and hms.4.

Sponsored by:   The FreeBSD Foundation
7b18bf2a225af348c2d56ad345862fe0f1055839 Ed Maste 2025-10-02 16:14:35
usbhid.4: Note where debug messages go
PR:           https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=280377
Sponsored by:   The FreeBSD Foundation
44f3e9f7f6c9afed33d2967c1ed48361bb6b404b Ed Maste 2025-10-02 16:50:15
Commit group #0: umass.4: Add HISTORY, HARDWARE, and SPDX
umass.4: Add HISTORY, HARDWARE, and SPDX

While here, break a long line that agitates the linter.

Fixes:          https://cgit.freebsd.org/src/commit/?id=cc16f1b9d9261f18 (Add umass.c)
MFC after:      1 hour
Discussed with: imp, ivy

diff --git a/sys/dev/usb/FILES b/sys/dev/usb/FILES
70993c2fbe1acb68f45bea5fc5fa086650876e23 Alexander Ziaee 2025-10-02 17:37:27

umass.4: Remove some extra lines which snuck in

Fixes:          https://cgit.freebsd.org/src/commit/?id=70993c2fbe1ac (umass.4: Add HISTORY, HARDWARE, and SPDX)
MFC with:       70993c2fbe1ac (umass.4: Add HISTORY, HARDWARE, and SPDX)
34a2b5b09afe2a2fa3672f448d522b4665db9272 Alexander Ziaee 2025-10-02 18:02:01
snl.3: escape \n propertly
Reported by:  Bruno Silvestre
2ed9abe1d873465d375b47ece0a379e1dbd99719 Maxim Konovalov 2025-10-02 18:15:16
sdhci.4: Improve HARDWARE for HW Relnotes + SPDX
MFC after:            1 hr
Discussed with:         ivy, olce
Co-authored-by:         ziaee (typed up imps suggestion, tagged spdx)
Differential Revision:  https://reviews.freebsd.org/D52860
bc433a0b7b046b0412777e0f3cc8f18a233af8ff Warner Losh 2025-10-03 13:49:32
nda.4: Add a HARDWARE section, tag SPDX
The description likely also needs some love.

MFC after:              1 hour
Co-authored-by:         ziaee (typed up imps suggestion, tagged spdx)
Differential Revision:  https://reviews.freebsd.org/D52866
f19aea89abd8964bf96d134c2bd6e127464c79f6 Warner Losh 2025-10-03 14:30:15
fts: Document thread (un)safety
MFC after:    3 days
Sponsored by:   Klara, Inc.
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D52828
64f8416afd4cd042b34e3e975f84fb3493397828 Dag-Erling Smørgrav 2025-10-04 18:35:38
ice.4: Avoid first person language
Approved by:  ziaee
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D52896
85531add28443e4202632fedcb3ae6038d4acb0c Brad Davis 2025-10-03 22:01:45
bsdinstall.8: Minor maintenance
Replace CD-ROMs with "discs, USBs, or network boot environments"
to both modernize aesthetic and also nudge youths to think at scale.
Since I'm disrupting the flow of these lines anyway, expand the VM
acronym because I think this is one of the first manuals people will
be looking at.

Reset list alignment to seven characters. It was at 19 characters,
and that was not enough to align them all, wasting many extra lines
by crunching all the words over. Seven actually bought us some lines
from six due to avg item size. Tag SPDX.

MFC after:      3 days
Discussed with: ivy, zi
81d9e08a4df42079d5e163b5991d5d6f3a28d4f0 Alexander Ziaee 2025-10-03 22:26:05
ice.4: Zap registered mark from document descr
Document descriptions for device drivers always contain registered
trademarks of the manufacturers, but this is not a place for the
registered mark symbol. While here, remove another useless symbol,
the hyphen in the first line comment.

MFC after:      3 days
6720975ba0c5b821ea0e889457737a3e2692125a Alexander Ziaee 2025-10-04 23:11:50

Hardware support

Hardware drivers and architecture-specific code.

Commit group #1: cxgbe(4)
cxgbe(4): Rename lport to hw_port.

No functional change intended.

MFC after:      3 days
Sponsored by:   Chelsio Communications
499ff78fb11a5868dfaeaa3fa86ca782b8f06f27 Navdeep Parhar 2025-09-29 05:40:24

cxgbe(4): Use hw_port and tx_chan correctly all over the driver

The port's tx channel and its hardware index are different things that
happen to have the same value on NICs using T4 through T6.  This is
going to change so use the correct spelling all over the driver.
Specifically, the firmware expects the hw port index in all of these:

* PCIe channel for queues
* TX interface for TX CPLs
* PORTID in FW_PORT commands
* PORTID in t4_alloc_vi
* flowid in all the firmware flowc WRs
* mbox commands that deal with the tx scheduler

Also, create a port_id lookup table for hw_port, just like the one for
tx_chan.  Use it to lookup the port softc in the port_info handler.

MFC after:      3 days
Sponsored by:   Chelsio Communications
6d29d22a9e0c33d1e3e70b8c458982c59b76eb29 Navdeep Parhar 2025-09-29 05:45:01

cxgbe(4): hw/fw headers and shared code for the Terminator 7 ASIC

This is the first of a series of commits that will add T7 support to
cxgbe.  The ASIC is gen5x16 on the PCIe side and has a 400Gbps MAC on
the Ethernet side.  NICs using the T7 will come in the following
variants:

* 1 x 400Gbps with QSFP-DD connector
* 2 x 200/100/40Gbps with QSFP56/QSFP28/QSFP+ connectors
* 4 x 50/25/10/1Gbps with SFP28/SFP+/SFP connectors

There are 8 general purpose ARM A72 cores available on select
SmartNIC/DPU boards.

Obtained from:  Chelsio Communications
MFC after:      3 days
Sponsored by:   Chelsio Communications
c7b2e390de43bb2b1a5918a23310ec5464ee3787 Navdeep Parhar 2025-09-29 06:21:02

cxgbe(4): Claim T7 based devices

The nexus/ifnet names are chnex/che respectively.

MFC after:      3 days
Sponsored by:   Chelsio Communications
1ba1c783296bc651e1af3174a1643dff39edf05a Navdeep Parhar 2025-09-29 07:54:13

cxgbe(4): Add T7 support to routines that deal with memory windows

MFC after:      3 days
Sponsored by:   Chelsio Communications
87d3ee5d14ba2e912010531e5bb601180bd5803d Navdeep Parhar 2025-09-29 08:17:17

cxgbe(4): Update meminfo for T7

There are new regions in the T7 and internal addresses are not limited
to 32b.

MFC after:      3 days
Sponsored by:   Chelsio Communications
f487e4778bb7154bec5057f5a6f9ca2a0230d4ae Navdeep Parhar 2025-09-29 08:24:05

cxgbe(4): Support for displaying T7 MPS TCAM entries

MFC after:      3 days
Sponsored by:   Chelsio Communications
6fa85bf1222672681f6f6bd1502cba752d7c5d5f Navdeep Parhar 2025-09-29 08:30:14

cxgbe(4): Include T7 PMRX cache stats in the sysctl that shows PM stats

MFC after:      3 days
Sponsored by:   Chelsio Communications
fc7f27c31eee81c46f20991343799f017aa79948 Navdeep Parhar 2025-09-29 08:32:08

cxgbe(4): T7's SGE context has 4 more bytes

MFC after:      3 days
Sponsored by:   Chelsio Communications
d4fb12583adc0690ae102c47d08598b3dbb06384 Navdeep Parhar 2025-09-29 08:36:34

cxgbe(4): Congestion manager context settings for T7

MFC after:      3 days
Sponsored by:   Chelsio Communications
c392b5a9e44b9c8a0173a4e2c1fb87ee88f4aa3f Navdeep Parhar 2025-09-29 08:43:28

cxgbe(4): Recognize the new capabilities reported by T7 firmwares

MFC after:      3 days
Sponsored by:   Chelsio Communications
cfcf1394efb90ff05cd8acce7805145ff93ecac5 Navdeep Parhar 2025-09-29 08:51:20

cxgbe(4): T7 LB mode support

This is the new mode where multiple internal channels are used to
service 1 port.  LB = Load Balancing.

* Ask for tx_tpchmap from the firmware and update sc->chan_map.
* Statistics for a port should include all its channels.

MFC after:      3 days
Sponsored by:   Chelsio Communications
a16423b7a48c61370d4eeb542e3ca6c1b4c9579a Navdeep Parhar 2025-09-29 09:03:02

cxgbe(4): Updates for T7 CIM multicore operation

T7 has a multicore microprocessor and each core has its own queue
configuration, inbound/outbound queues, and logic analyzer.  A work
request involving a tid can only be handled on queues where
(tid & tid_qid_sel_mask) == (eq->cntxt_id & tid_qid_sel_mask).

MFC after:      3 days
Sponsored by:   Chelsio Communications
3d76a4feeead2bbda7792a3c4ca534fd4c159721 Navdeep Parhar 2025-09-29 09:17:51

cxgbe(4): Update the filtering code for T7

There are new fields available and the width of the optional part has
changed.  This affects the ntuples used by TOE/filters/hashfilters.

MFC after:      3 days
Sponsored by:   Chelsio Communications
c231e86ce388a0d0fb64e0fd2ff736c990ec97bb Navdeep Parhar 2025-09-29 09:48:18

cxgbe(4): T7 TCB CPLs have queue and channel in different location

MFC after:      3 days
Sponsored by:   Chelsio Communications
721033a7d96f24e80ec18ec9cc17712be55a52b7 Navdeep Parhar 2025-09-29 09:52:55

cxgbe(4): T7 ULPTX supports larger data length with MEMIO commands

MFC after:      3 days
Sponsored by:   Chelsio Communications
77098268dc397ea86f157f6e66540cd6618e0a05 Navdeep Parhar 2025-09-29 13:18:07
cxgbe(4): Support for T7 tracing filters
These are the filters that can be used to sniff wire traffic after all
hw offloads.

MFC after:      3 days
Sponsored by:   Chelsio Communications
3203b1a110c890e7b407a83fa3d65b4ba711e59d Navdeep Parhar 2025-09-29 13:54:10
cxgbe(4): Add support for port types SFP56 and QSFP56 and speed 200Gbps
This enables the 2x200/100/40Gbps and 4x50/25/10/1Gbps boards.

MFC after:      3 days
Sponsored by:   Chelsio Communications
a02f38ccedc2c648d57fb6e575723b0b31b67ea0 Navdeep Parhar 2025-09-29 14:20:07
Commit group #2: cxgbe
cxgbe: Refactor find_offload_adapter and move to t4_tom from cxgbei

This allows it to be used for other offload drivers.

MFC after:      3 days
Sponsored by:   Chelsio Communications
c341048373ac6d4bad6dccc63880ff3f326ba15f John Baldwin 2025-09-29 14:50:34

cxgbe: Move send_iscsi_flowc_wr to t4_tom.ko

Rename the function to send_txdataplen_max_flowc_wr to match the
parameter it sets.  This function will be reused by other ULP modules.

MFC after:      3 days
Sponsored by:   Chelsio Communications
35b883ccf36521a46ba1cd959c144328cce223c5 John Baldwin 2025-09-29 14:52:18

cxgbe: Move the STAG and PBL memory pool arenas to the base driver

Both RDMA (iw_cxgbe) and NVMe offloads use TPT table entries to map
transaction tags in incoming PDUs to buffers in host memory permitting
direct placement of received data into host memory buffers avoiding
copies (iSCSI offload uses a different scheme for mapping tags to host
memory).  Move the vmem arenas for the supporting card memory regions
from iw_cxgbe to the main driver so they can be shared with the NVMe
offload driver.  In addition, add some helper routines for
constructing work requests to update TPT table entries.

MFC after:      3 days
Sponsored by:   Chelsio Communications
19d9a9b15178ed7cfe3f463f43e28cce13fc4f94 John Baldwin 2025-09-29 14:55:16
ccr: Support T7.
- Use expanded channel ID fields (2 bits vs 1 bits), even on T6 as on
  T6 the extra bits were previously reserved and the channel IDs should
  only be 0 or 1 on T6.

- Set CMDMORE in ULP_TX_PKT on T7.

MFC after:      3 days
Sponsored by:   Chelsio Communications
8bc9d3089314635572accfe31a4a56afcc299bab John Baldwin 2025-09-29 14:58:06
Commit group #3: cxgbe
cxgbe: Support for NIC KTLS transmit on T7 adapters.

Unlike NIC KTLS support on T6, T7 is able to reuse the existing TSO
functionality directly, including trimming the output of the crypto
engine before it is passed on to TSO.  This is much simpler and does
not require the use of bypass pseudo-connections in the TOE engine.
Among other things this permits arbitrary TCP options (including the
full range of possible TCP timestamp values) while also avoiding
various edge cases where parts of a requested TCP packet could not
always be transmitted (e.g. partial trailers).  This implementation
also permits NIC KTLS to be used in parallel with TOE.

This version does not yet support connections over a VF (specifically
the ktls_tunnel_packet function needs to handle the VF work request),
nor does it support VxLAN offload.

MFC after:      3 days
Sponsored by:   Chelsio Communications
4f272a5ef3d8073940e7719401d1e8de2de6100a John Baldwin 2025-09-29 14:59:03

cxgbe: Support for TLS 1.3 in key contexts.

For TLS 1.3 the 4 byte salt field has been extended to hold the 12
byte nonce.

MFC after:      3 days
Sponsored by:   Chelsio Communications
6154961e2e4c7e1d998f4c9e22c5370d17edb160 John Baldwin 2025-09-29 15:02:28

cxgbe: Extend NIC TLS to support TLS 1.3.

One unusual quirk is that the crypto engine requires the driver to
provide an 8 byte placeholder as input before the AAD that is replaced
with the middle 8 bytes of the nonce generated from the sequence
number and key context.

MFC after:      3 days
Sponsored by:   Chelsio Communications
5b9dc22c91068e206fb6cc18ee0cef27067223df John Baldwin 2025-09-29 15:04:44
Commit group #4: cxgbe TOE TLS
cxgbe TOE TLS: Better support for partial records for T7.

T7 is able to start TOE TLS receive offload more cleanly if a partial
TLS record containing a full header and at least one other byte has
been received.  In that case it is able to request the remaining bytes
for the current TLS record from the NIC.  Once those bytes has been
received TLS receive offload can then be received starting with the
subsequent record.

MFC after:      3 days
Sponsored by:   Chelsio Communications
1e9849415ff9ed958d63bc7e5128c39e991933d2 John Baldwin 2025-09-29 15:06:46

cxgbe TOE TLS: Support for TLS 1.3 for transmit.

MFC after:      3 days
Sponsored by:   Chelsio Communications
7de77bea2a6136af55fdf9cc49fb5b6e7cb9615e John Baldwin 2025-09-29 15:09:03

cxgbe TOE TLS: Support for TLS 1.3 for receive

MFC after:      3 days
Sponsored by:   Chelsio Communications
e2fae07e093bf4953ad7359b2aa9ca62b0d76adf John Baldwin 2025-09-29 15:10:08
cxgbe mp_ring: Add mp_ring_enqueue_only
Unlike mp_ring_enqueue, this function is meant to be called from
within a drain routine to enqueue more packets to the queue currently
being drained.  To avoid recursion, it only enqueues additional items
without becoming a consumer.

MFC after:      3 days
Sponsored by:   Chelsio Communications
96054b97b418d1ff2b781e9e23cc86a79d91909a John Baldwin 2025-09-29 15:10:42
cxgbe: Permit multiple handlers for CPL6_FW_PLD
Currently this CPL is only used to handle replies from lookaside
crypto requests submitted by ccr(4).  However, in the future this
request will be returned for other requests.  Use the low bit in the
cookie field as a way to identify replies to ccr(4) vs other use
cases.  This should be safe as 'struct cryptop' pointers should be
word-aligned.

MFC after:      3 days
Sponsored by:   Chelsio Communications
96469647bce10132408db9b436dae8941356453b John Baldwin 2025-09-29 15:12:09
cxgbe: Use partial GCM mode for partial TLS records on T7
T7's crypto co-processor adds a new partial GCM mode.  This permits an
AES-GCM operation to be split into multiple requests.  After each
request, the partial GHASH state is returned to the host and must be
included in the subsequent request to continue the GHASH computation.

Make use of this when sending a TLS record that spans multiple TCP
"request" (where a request can use TSO to span multiple segments).
This permits computing the final GHASH value across multiple requests
without having to re-send the entire TLS record for the final request.

To ensure that intermediate GHASH results are available when needed,
mbuf chains are queued in the TLS pcb and only dispatched one at a
time to the NIC TXQ.  Packets which do not request a GHASH result
queue the next mbuf from the connection as soon as they are written
into the TXQ.  Packets which do request a GHASH result queue the next
mbuf after the the GHASH result is returned by a message on a NIC RXQ.

Note that partial GCM mode is only used for the in-order data at the
"tip" of a connection and not for retransmits of earlier data.
Retransmits will not request a GHASH result so will enqueue the next
mbuf from the connection to the NIC TXQ after being written.

Partial GCM mode is also not TLS-aware and only supports "plain"
AES-GCM.  Thus, TLS AAD must be explicitly constructed and sent as
part of the work request in the TXQ at the start of each TLS record.
However, by avoiding the need to retransmit the entire TLS record's
contents for the last mbuf spanning a TLS record, the overall amount
of "wasted" DMA is reduced by a factor of about 30.

MFC after:      3 days
Sponsored by:   Chelsio Communications
9e269eafebfca6c876be76a78e4bda621a921e45 John Baldwin 2025-09-29 15:14:26
gpio: implement bus_setup_intr and bus_teardown_intr
Implement bus_setup_intr and bus_teardown_intr as bus_generic_setup_intr
and bus_generic_teardown_intr respectively for GPIO drivers that support
interrupts. This allows children to setup interrupts.

Reported by:    Evgenii Ivanov <devivanov@proton.me>
Reviewed by:    imp
MFC after:      1 day
Differential Revision:  https://reviews.freebsd.org/D52197
f1a372ed88b11c1e096523c0b6cf62902c1db37c Ahmad Khalifa 2025-09-30 04:19:37
Commit group #5: snd_hda: Implement automatic redirection between associations
snd_hda: Implement automatic redirection between associations

For audio to be redirected to the headphones/headset after plugging the
jack, or back to the speaker/internal mic when unplugging it, the
speaker and headphone pins need to be part of the same association
(i.e., the same PCM device). This patch makes it possible to redirect
audio even between different associations, which can reduce the need for
manual pin patching.

The idea is that we issue a devctl_notify() from within the jack
detection callback whenever a jack is (un-)plugged to redirect audio to
the appropriate device. Then the snd.conf devd script is responsible for
using virtual_oss to change the playback/recording device to whatever
snd_hda(4) selected. The reason for requiring virtual_oss is that it has
hot-swapping support, which is necessary for jack redirection.

Sponsored by:   The FreeBSD Foundation
MFC after:      2 days
Differential Revision:  https://reviews.freebsd.org/D50070
2ffaca551eaf32c17f701762ecf29a961cf19aa4 Christos Margiolis 2025-09-30 10:52:44

devd: Remove SND package

This was done by accident, build snd.conf always.

Reported by:    ivy
Fixes:          https://cgit.freebsd.org/src/commit/?id=2ffaca551eaf ("snd_hda: Implement automatic redirection between associations")
Sponsored by:   The FreeBSD Foundation
MFC after:      1 day
5cc36854ee63dc695d90a841d9db587bec67ba24 Christos Margiolis 2025-10-01 08:18:32
Commit group #6: gpioc
gpioc: allocate priv->events with the correct size

MFC after:      1 day
fa26e445544eb88f05779258e2ab9c96384fe74d Ahmad Khalifa 2025-09-30 11:09:28

gpioc: fix race in ioctl(GPIOCONFIGEVENTS)

A race can occur in gpioc_ioctl when it is called with GPIOCONFIGEVENTS
closely followed by GPIOSETCONFIG. GPIOSETCONFIG can alter the
priv->pins list, making it no longer empty and opening the door for
access to priv->events while we are reallocating it. Fix this by holding
priv->mtx while handling GPIOCONFIGEVENTS.

Reported by:    Qiu-ji Chen
PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=289120
Reviewed by:    mmel
MFC after:      1 day
Differential Revision:  https://reviews.freebsd.org/D52783
d000adfe41e6f2fe8f3dbe92d8fc2d34ae882086 Ahmad Khalifa 2025-09-30 11:09:50

gpioc: allocate new fifo size

This slipped through after I resolved some merge conflicts.

Fixes:          https://cgit.freebsd.org/src/commit/?id=d000adfe
MFC after:      1 day
2679636b4412927242e46d3806fbb58e2702eddb Ahmad Khalifa 2025-09-30 11:55:34
amd64: bump sleepq hash size to 2048
This is the most contended lock type during the first hour of -j 104 poudriere.

Drops significantly with the change.

Note there are suspicous acquires which most likely don't need to
happen, artificially exacerbating tehe problem..
2bdc89535a8837347bb3b523715bba021dea4418 Mateusz Guzik 2025-09-30 14:06:48
vtnet: disable hardware TCP LRO by default
Hardware TCP LRO results in problems in settings with IP forwarding
being enabled. In case of nodes without IP forwarding, using
software LRO is also beneficial in general, since it can provide better
information about what was received on the wire.
Therefore, disable hardware TCP LRO by default.
By tuning the loader tunable, this can be changed.

PR:                     https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=263229
Reviewed by:            Timo Völker
MFC after:              3 days
Differential Revision:  https://reviews.freebsd.org/D52684
6e4b811009d63f33c59d51f28fd4a030ca90843e Michael Tuexen 2025-09-29 23:58:37
ath: fix ath_buf leak if ath_tx_tag_crypto() returns an error
If ath_tx_tag_crypto() returns an error, then ath_tx_normal_setup()
should consume the mbuf and return an error, so the caller knows to
free the ath_buf.  But it wasn't.

This fixes issues I've seen locally where a an AP VAP constantly hits
error conditions (due to other RF/PHY/MAC chipset issues which I haven't
yet figured out) and encryption fails because the station goes away
whilst something's being queued.

Locally tested:

* AR9380, AP mode (2G HT20, 5G HT20, 5G HT40)
f7aad20db59210a4411559d07976a48809b3b0a7 Adrian Chadd 2025-10-01 02:21:01
watchdog: ifdef wd_ioctl_patpat on COMPAT_FREEBSD14
Sponsored by: Rubicon Communications, LLC ("Netgate")
5b63afc09a86318fa8bf09a786a1b084e000cc51 Mateusz Guzik 2025-10-01 07:40:31
Commit group #7: arm64/vmm
arm64/vmm: Clear all pmc fields

When clearing pmcntenclr_el0, pmintenclr_el1, and pmovsclr_el0 clear
all bits as new fields may be added in the upper 32-bits.

Sponsored by:   Arm Ltd
Differential Revision:  https://reviews.freebsd.org/D52801
c1723bbe2aa7f6c8b23d3aa97379d89e883b0a93 Andrew Turner 2025-10-02 15:34:23

arm64/vmm: Save more PMU registers

These were missed in the initial vmm.ko change.

While here keep the order the same in all locations we handle these.

Sponsored by:   Arm Ltd
Differential Revision:  https://reviews.freebsd.org/D52802
35d0c9efb17a9a7fea57c3a4a056141b21dad18f Andrew Turner 2025-10-02 15:34:35

arm64/vmm: Save dbgclaimset_el1

It may be used by the guest.

Sponsored by:   Arm Ltd
Differential Revision:  https://reviews.freebsd.org/D52803
4954ec00c4200d8bfd29875fc13f541942209824 Andrew Turner 2025-10-02 15:34:43
arm64: Rename the MDCR_EL2 macros
To be consistent within the register prefix all fields with MDCR_EL2_.

Reviewed by:    emaste
Sponsored by:   Arm Ltd
Differential Revision:  https://reviews.freebsd.org/D52804
d552556b7e6d226887ebb6da30e4f1dcff3cb407 Andrew Turner 2025-10-02 15:34:54
arm64: Sort hypervisor.h
Move the MDCR_EL2 macros into the correct alphabetical location.

Sponsored by:   Arm Ltd
Differential Revision:  https://reviews.freebsd.org/D52805
4aa762f3cb97402f0345ce5112c47a303dd4107d Andrew Turner 2025-10-02 15:35:04
arm64/vmm: Add missing debug traps
These are features we don't support or advertise to the guest so can
safely be trapped.

Sponsored by:   Arm Ltd
Differential Revision:  https://reviews.freebsd.org/D52806
c67ea2707d2b5e6deb5986710f520ff69e4f78a3 Andrew Turner 2025-10-02 15:35:11
x86: Keep cumulative MCA statistics in the kernel
Keeping cumulative MCA statistics in the kernel provides a way for
users to get an accurate count of various kinds of errors reported
by the CPU.

After ca8929d2a3e9b9df31d2e487377f99d7c39aa01d, it is possible that
the kernel will drop the record of some MCA interrupts. Moreover, this
provides a cheaper interface to obtain statistics if that is the only
reason a user is processing MCA logs.

Reviewed by:    markj
Sponsored by:   Netflix
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D52709
5f1f7d8457d4fc28c6cff7e26a629a2d6ee3fc61 Jonathan T. Looney 2025-09-24 14:35:18
Commit group #8: iwx
iwx: add some missed beacon debugging

I'm seeing random disconnects in iwx without any useful information
as to why.  I'll start by adding missed beacon debugging here; hopefully
they're generally useful.

Differential Revision:   https://reviews.freebsd.org/D52524
Reviewed by:    bz
f53137556059764f5c028880d09d3c234877d37f Adrian Chadd 2025-09-14 19:36:18

iwx: add some lock assertions in the TX start path

The locking paths into these routines LOOK correct, but I figured
it'd be good to at least enforce we're not doing concurrent entry
into iwx_start() / iwx_tx() without the lock held.

Differential Revision:  https://reviews.freebsd.org/D52655
Reviewed by:    thj
262172de955ff09f5029039f0d823996a63ff3d1 Adrian Chadd 2025-09-21 04:55:45

iwx: don't log VHT rate lookups in iwx_tx_fill_cmd() for data frames

iwx is now logging a lot of stuff to the kernel when associated at VHT
rates.  It's my fault; the replacement tx rate APIs print out a warning
when you're handing the legacy rate /HT rate APIs a VHT rate.

However all of the supported chipsets in iwx will be pushing the
rate control entirely into firmware.  We don't need to do per-frame
TX rate control like in previous chips.

So for now, just put in an if (rate == VHT) into the path and
a TODO comment.  A few lines later the function will just skip the
rate assignment stuff for data frames, thus saving us the logging.
The other paths (control traffic, multicast traffic) uses legacy
rates / HT rates by default and won't trigger a warning log.

Yes, iwx_tx_fill_cmd() really does deserve a rate control logic
rewrite, but I want to fix this particular issue first.

Locally tested:

* AX210, STA mode, HT and VHT associations

Differential Revision:  https://reviews.freebsd.org/D52766
Reviewed by:    thj
88f467bd1a113b65cebcb6eca145dbd3bea72adc Adrian Chadd 2025-09-28 03:13:06

iwx: rewrite iwx_rs_update() to be VHT aware, refactor it a bit

The current iwx_rs_update() code doesn't handle setting VHT rates
at all.

So:

* write a routine - iwx_rs_update_node_txrate() - which will update
  the given node txrate info with the given notification
* .. which is based on the print_ratenflags() logic and decoding
* migrate iwx_rs_update() to use this routine, only on the STA BSS node.

This only handles decoding the version 2 rate_n_flags format response -
same as print_ratenflags() - so print if someone somehow sees a version
1 response.

It's shown a few things that deserve some later follow-up work:

* I really should have net80211 APIs that operate on the txrate struct
  itself, not on the ieee80211_node, but I'll use what I have.
  Changing it later is easy.

* the current net80211 txrate API doesn't include channel width,
  LDPC/STBC and such.  I didn't need it for the earlier tx rate
  representation migration, but it would be nice to add it.
  (The reason is that those choices are currently made in the drivers
  using rate control, rather than the rate control module, which is
  again what the older code did as well.)

  This means that the displayed rate isn't EXACTLY what the NIC has
  chosen - eg the NIC could quite happily decide to transmit a 20MHz
  or 40MHz frame to an 80MHz STA if that actually works out better.
  So just add TODOs for those.

Locally tested:

* AX210, STA mode

Differential Revision:  https://reviews.freebsd.org/D52767
Reviewed by:    thj
4a5a884c4a77e800bb37e1c12db72c724a2220bc Adrian Chadd 2025-09-28 03:19:57
pci: add quirk to disable Function-Level Reset (FLR)
MediaTek mt76 WiFi cards are advertising FLR support but after issuing
a FLR the chipset is gone.  Add a quirk so we can disable FLR.  The
current reset code will automatically fall back to a power reset.

This makes the card show up under bhyve where before it would just not
be discovered at all. That should make wifibox work for it and will help
development for a LinuxKPI based mt76 driver as found in framework laptops
as no dedicated machine and constant reboots are needed anymore.
We will likely need to add more PCI vendor/device IDs once we can test
the other device IDs.

Event:                  EuroBSDCon Devsummit 2025
After a lot of help from: jhb
Really implemented by:  jhb (I just typed and tested)
GH issue:               github.com/pgj/freebsd-wifibox/issues/73
MFC after:              3 days
Reviewed by:            imp, emaste
Differential Revision: https://reviews.freebsd.org/D52728
4c0e53aced2251eb5ac7eca44e13a6b947be8582 Bjoern A. Zeeb 2025-09-25 12:49:07
if_vmx: fix panic during kldload
Just like vmxnet3_intr_disable_all, iflib may invoke this routine
before vmxnet3_attach_post() has run, which is before the top-level
shared data area is initialized and the device made aware of it.

MFC after:      1 week
Sponsored by:   Dell Inc.
01b0690c495e1043a72cae9ee945f9f2c2adc216 Eric van Gyzen 2025-10-04 12:23:41
apei_detach: fix swi_remove parameter
swi_remove expects a void *, but we were passing void **.

MFC after:      1 week
Sponsored by:   Dell Inc.
9dd865a59edda38e6a379c5081e9483a87abc1eb Eric van Gyzen 2025-10-04 15:18:05

Networking

Network-related commands, library, and kernel.

iflib: ifdef iflib_simple_transmit and iflib_simple_select_queue on ALTQ
Otherwise builds warn about them being unused.

Sponsored by:   Rubicon Communications, LLC ("Netgate")
6cb542e31bef5fe6e3867b4cfb608f4caeef076d Mateusz Guzik 2025-09-29 15:13:06
openssh: blocklist: Use NetBSD probes
Use NetBSD probe locations for consistency.  We have submitted all
improved or missing probes, keeping them synchronized with NetBSD (our
blocklist upstream) should simplify upgrades and maintenance, as the
locations of these probes are a moving target, depending on upstream
OpenSSH changes.

Additionally, use BLACKLIST_AUTH_FAIL exclusively for now.  At the time
of this commit BLACKLIST_BAD_USER, is a no-op.  However, it will change
in a future upgrade.

Also, enhance blacklist notification messages for better debugging by
making them more descriptive.

Reviewed by:    emaste
Approved by:    emaste (mentor)
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D52749
e02003bce726333872d65b7b9a1557d97b6d91a0 Jose Luis Duran 2025-09-29 16:32:36
Remove ftpd(8)
This was previously deprecated and is slated for removal in 15.0.
Users who still need ftpd(8) can install the ftp/freebsd-ftpd port.

Retain the ftp(d) PAM services since other FTP daemons use them.

Update /etc/inetd.conf to point to /usr/local.

Add ftpd to ObsoleteFiles, but do not list configuration files since
users may want to preserve these to use with the freebsd-ftpd port.

There is still some language in the manual referring to ftpd(8)
which is relevant to the port, which has been retained but updated
to reference the port.

MFC after:      3 days
Relnotes:       yes
Reviewed by:    cperciva
Differential Revision:  https://reviews.freebsd.org/D52739
614c8750ce116865953916b8b5bab2467ee94187 Lexi Winter 2025-09-29 20:26:26
wlanstat(8): Rename from wlanstats(8) to keep consistency
All the status and statistics utilties in base are ending with "stat",
the only exception is mailstats(8) but that's from sendmail.

Reviewed by:    imp, adrian
MFC after:      3 days
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D52724
89eee8ee2ce57b7884defb8f9af016cd28ef1562 Li-Wen Hsu 2025-09-30 03:30:08
wlanstat(8): Follow-ups after moving to /usr/sbin and renaming
- Update related comments
- Remove from tools/tools/net80211

Reviewed by:    imp, adrian
MFC after:      3 days
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D52726
6952bb321c5cc14168a4f2638a0ce2483cc5149c Li-Wen Hsu 2025-09-30 03:31:12
tcp: apply rate limits to challenge ACKs
When sending challenge ACKs from the SYN-cache, apply the same rate
limiting as in other states.

Reviewed by:            cc, rrs
MFC after:              3 days
Sponsored by:           Netflix, Inc.
Differential Revision:  https://reviews.freebsd.org/D52754
c2900b6e8255ba4f54dbd897cf42427db577ed3d Michael Tuexen 2025-09-30 20:06:33
tcp: cleanup syncache_expand()
Only validate SEG.SEQ and SEG.ACK when processing a real SYN-cache
entry. In the SYN-cookie case, these conditions are always true, since
the SYN-cache entry on the stack is constructed from the incoming
TCP segment.
While there, fix the logging messages.

Reviewed by:            Nick Banks
MFC after:              3 days
Sponsored by:           Netflix, Inc.
Differential Revision:  https://reviews.freebsd.org/D52816
3034fa3d4321fdc487428c9050711de9ce234567 Michael Tuexen 2025-10-01 19:14:23
iflib: Implement tx desc reclaim threshold
On some iflib drivers, the txd reclaim routine can be fairly expensive
at high packet rates.  Iflib was designed with the intent of only
reclaiming tx descriptors above a configurable threshold, but this
logic was left unimplemented.

This change:

   - implements 2 new knobs, iflib.tx_reclaim_thresh and
      iflib.tx_reclaim_ticks.
   - moves tx reclaim thresh from the if_shared_ctx and into the
      iflib_ctx as drivers don't need to see it, and it needs to be
      changed, so it can't be const
   - tx_reclaim_thresh and ticks are replicated into the txq to
      improve cache locality of data accessed in the hot path
    - ticks is used rather than more expensive timekeeping mechanism so
       as to keep things simple and cheap

This change substantially improves packet rates on bnxt. It has been
tested on bxnt and ixl

Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D52561
Reviewed by: markj (initial version)
213170eb956fa7eec93c2ab4159d6ed68e8e1b1d Andrew Gallatin 2025-10-01 22:43:05
tcp: keep SYN-cache entry when sending of challenge ACK fails
Don't drop a SYN-cache entry just because a challenge ACK couldn't
be sent. This might only be a temporary failure.

Reviewed by:            Nick Banks, glebius, jtl
MFC after:              3 days
Sponsored by:           Netflix, Inc.
Differential Revision:  https://reviews.freebsd.org/D52840
7841b44f8491d69c75207d0f3a1eb34501d99edd Michael Tuexen 2025-10-02 06:57:14
pf: mark pf_match_translation() static
It's only used in this file.

Sponsored by:   Rubicon Communications, LLC ("Netgate")
244a5188e7681bf8d98a49c78439df61e6816c93 Kristof Provost 2025-10-01 15:51:33
sys/netinet6: fix memory corruption in in6_ifadd
The routine allocates the wrong size and then passes it to in6_get_ifid.

At the same time it violates invariants by issuing malloc with M_WAITOK
while within net epoch section.

Sponsored by:   Rubicon Communications, LLC ("Netgate")
f9fc93690aef7a56f62a051de6231fe2af699728 Mateusz Guzik 2025-09-29 15:01:53
tcp: improve segment validation in SYN-RECEIVED
The validation of SEG.SEQ (first step in SEGMENT ARRIVES of RFC 9293)
should be done before the validation of SEG.ACK (fifth step in
SEGMENT ARRIVES in RFC 9293).
Furthermore, when the SEG.SEQ validation fails, a challenge ACK
should be sent instead of sending a RST-segment and moving the
endpoint to CLOSED.

Reported by:            Tilnel on freebsd-net
Reviewed by:            Nick Banks
MFC after:              3 days
Sponsored by:           Netflix, Inc.
Differential Revision:  https://reviews.freebsd.org/D52849
b7118461f9099876cb2c2923948f8fb647defd57 Michael Tuexen 2025-10-02 14:51:09
pf: fix possibe SCTP panic
While processing SCTP packets we can enqueue work for later, in the
sctp_multihome_jobs queue. This deferred job includes a copy of the current
struct pf_pdesc, which must contain a valid pcksum pointer (in case of NAT).

However, jobs could be enqueued before we'd actually set this pointer in
pf_setup_pdesc(). Set this pointer before we scan the SCTP chunk headers (and
could enqueue deferred jobs.)

While here sprinkle in a few more assertions to ensure we got this right.

Reported-by: syzbot+974d0fb7e53c9aa31b90@syzkaller.appspotmail.com
MFC after:      3 days
Sponsored by:   Rubicon Communications, LLC ("Netgate")
dd2fc08d85431e10ad60e01e97b98e9dc23322bd Kristof Provost 2025-10-02 14:48:22
pf: return PF_PASS/PF_DROP from pf_setup_pdesc()
We returned 'PF_DROP' instead of '-1' in one case, which would lead to us
continuing the processing for an invalid packet.
This also aligns us closer to OpenBSD, and reduces the odds of future similar
mixups.

MFC after:      3 days
Sponsored by:   Rubicon Communications, LLC ("Netgate")
5d210f396e3f00698caa45077330dea8ffe979b5 Kristof Provost 2025-10-02 14:55:07
tcp: close two minor races with debug messages
The syncache entry is locked by the hash bucket lock. After running
SCH_UNLOCK(), we have no guarantee that the syncache entry still
exists.

Resolve the race by moving SCH_UNLOCK() after the log() call which
reads variables from the syncache entry.

Reviewed by:    rrs, tuexen, Nick Banks
Sponsored by:   Netflix
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D52868
ad38f6a0b466bf05a0d40ce1daa8c7bce0936271 Jonathan T. Looney 2025-10-02 17:26:03
pf: fix 'natpass'
If an rdr (or nat) rule specifies 'pass' we don't run the filter rules, we just
pass the traffic. Or at least, we did until that got unintentionally broken.
Restore that behaviour and add a test case.

While here also fix nat:dummynet_mask, which relied on the broken behaviour.

MFC after:      3 days
Sponsored by:   Rubicon Communications, LLC ("Netgate")
Differential Revision:  https://reviews.freebsd.org/D52838
b93394a38bc41f8afceaf0c03ed5d8b8b5a9aefb Kristof Provost 2025-09-30 17:40:08
carp6: revise the generation of ND6 NA
* use ND_NA_FLAG_ROUTER flag in carp_send_na() when we work as router.
* use in6addr_any as destination address for nd6_na_output(), then it
  will use ipv6-all-nodes multicast address.
* add in6_selectsrc_nbr() function that accepts additional argument
  ip6_moptions. Use this function from ND6 code to avoid cases when
  nd6_na_output/nd6_ns_output can not find source address for
  multicast destinations.
* add some comments from RFC2461 for better understanding.
* use tlladdr argument as flags and use ND6_NA_OPT_LLA when we need
  to add target link-layer address option, and ND6_NA_CARP_MASTER when
  we know that target address is CARP master. Then we can prepare
  correct CARP's mac address if target address is CARP master.
* move blocks of code where multicast options is initialized and
  use it when destination address is multicast.

Reviewed by:    kp
Obtained from:  Yandex LLC
MFC after:      2 weeks
Sponsored by:   Yandex LLC
Differential Revision: https://reviews.freebsd.org/D52825
716acd9367df49d44f29eeb783706025f3a04c65 Andrey V. Elsukov 2025-10-03 07:57:44
sys/netinet6: Use atomic(9) for dad_failures counter
Replace counter(9) usage with more lightweight atomic(9) in the
code handling RFC 7217 SLAAC address generation.

Also, use `u_int` types with this. Leaving `dad_failures` local to
`in6_get_stableifid()` as a `uint64_t` to avoid changing the generated
addresses from previous code; this also gives some headroom for
future changes.

While here, moved some `#include` lines to adhere to style(9).

Reviewed by:            glebius, jhibbits, jtl, zlei
Approved by:            glebius, jtl, zlei
Differential Revision:  https://reviews.freebsd.org/D52731
0c94dc9da7c238603e43c55ca6da64c417fc2204 Guido Falsi 2025-10-03 10:09:42
netstat: Fix -ia missing multicast addresses on some interfaces
sdl_data isn't always NULL terminated

Signed-off-by: nreilly@qnx.com

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=288958
Reviewed by:    markj
MFC after:      1 week
0952943a680dca12fe8f65f8813a9dca0783ce88 Nick Reilly 2025-09-12 19:27:59

System administration

Stuff in man section 8 (other than networking).

stand: Remove support for FreeBSD 12.2 and earlier
Remove 'pager' shim that was last not supported in FreeBSD 12.2, which
went EOL on March 31, 2022. People have had enough time to upgrade the
boot loader.

Sponsored by:           Netflix
55025f42f6fa517aaffc902b3d69fc707536907d Warner Losh 2025-09-28 06:40:37
loader: make disable-device more rebust
Check the number of arguments and ensure that the passed-in device to
disable parses correctly.

Sponsored by:           Netflix
b7473a5d68b8ade1ce6c6c08965fe284cc70bd75 Warner Losh 2025-09-28 17:58:31
core.lua: Consistently check for single user
While boot_single:lower() should always be in {yes,no}, it might not
be. In one place we check == yes, and another ~= no. Make both places ~=
no for consistency. We generally try to test != default.

Sponsored by:           Netflix
ebc32e74b6f98a6f2b9ed7cba0078cd64d48701f Warner Losh 2025-09-28 19:19:29
virtual_oss(8): Use proper format specifier for uintmax_t *
Fixes armv7 build.

Reported by:    CI
Fixes:          https://cgit.freebsd.org/src/commit/?id=9cab9fde5eda ("virtual_oss: Port to base")
Sponsored by:   The FreeBSD Foundation
MFC after:      4 days
69ede18b950e32317d7741410cde7543fa0fce3c Christos Margiolis 2025-09-29 10:40:10
cxgbetool(8): Updates for T7
* Registers dump
* SGE context
* TCB info

MFC after:      3 days
Sponsored by:   Chelsio Communications
bc48ca42d0d40b0b88df9cc1d8aec49533529690 Navdeep Parhar 2025-09-29 13:22:47
virtual_oss(8): Fix GCC errors and warnings
Reported by:  CI
Fixes:          https://cgit.freebsd.org/src/commit/?id=9cab9fde5eda ("virtual_oss: Port to base")
Sponsored by:   The FreeBSD Foundation
MFC after:      4 days
0532cd2d771372d3266b97aebf4043d5b31b64bd Christos Margiolis 2025-09-29 16:16:26
ftpd: blocklist: Add an extra probe
Add a blocklist probe when user access is denied.

Reviewed by:    emaste
Approved by:    emaste (mentor)
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D52747
307929b211e07f91260105211b57678e906327af Jose Luis Duran 2025-09-29 16:26:54
ftpd: blocklist: Add a permission denied probe
Reviewed by:  emaste
Approved by:    emaste (mentor)
Obtained from:  NetBSD
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D52746
1060684b04b0ee1e07c6c91f7c52978835ff676a Jose Luis Duran 2025-09-29 16:27:24
bsdinstall: Add loader.efi to all ESPs we create
For proper redundancy, add copies of loader.efi to each of the ESPs we
create when we create multi-volume ZFS datasets. zfsboot creates a list
of secondary ESPs, while bootpart doesn't create any (it's the UFS
partitioning tool) because we don't supporg UFS over gmirror. The
primary ESP is mounted and is what we use efibootmgr to boot from. The
redundant copies allow the system to boot if the primary disks fails.

Sponsored by:           Netflix
MFC After:              2 days
PR:                     https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=208802
Reviewed by:            cperciva
Differential Revision:  https://reviews.freebsd.org/D52780
494de51bc0074472d1b01604f085daea0844f240 Warner Losh 2025-09-30 02:46:57
bsdinstall: Only offer to enable services which are installed
With pkgbase, users may decide to install a minimal set of packages
that's missing some daemons.  Check which services are installed, and
only include the ones which are present in the dialogue.

MFC after:      1 day
Reviewed by:    cperciva
Differential Revision:  https://reviews.freebsd.org/D52646
2507698b630db3d88b0aab12c348873f827255a2 Lexi Winter 2025-09-30 06:02:51
virtual_oss(8): Remove floating point formats from preference list
virtual_oss(8) chooses formats based on preference lists (see
VPREFERRED_*) for each sample depth (-b option). However, if we, for
example, use 32 bits LE for the sample depth, what will end up happening
is that the format chosen will be 0x10001000, which corresponds to
AFMT_S32_LE *and* AFMT_F32_LE OR'd together. This happens because the
preference lists include both AFMT_S32_* and AFMT_F32_* in the 32-bit
cases.

Because we essentially end up using an invalid format, sound(4) will
eventually reach pcm_sample_write()'s (sys/dev/sound/pcm/pcm.h)
__assert_unreachable() case.

This patch is a temporary fix to address the panic, until a proper
solution for using floating point formats is found.

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=289904
Sponsored by:   The FreeBSD Foundation
MFC after:      2 days
8af6aee96ed609456900c6dd92dafabac5e89c0a Christos Margiolis 2025-09-30 13:13:46
bsdinstall/pkgbase: Restore the kernel-dbg component
Commit 561dc357c2f5 changed the way we handle components in the prompt,
and accidentally resulted in the kernel-dbg component not being listed
since we now hide all components ending in "-dbg".

Add an exception for kernel-dbg to bring it back.

Fixes:  https://cgit.freebsd.org/src/commit/?id=561dc357c2f5 ("bsdinstall: Use package sets for pkgbase install")
MFC after:      3 seconds
Reviewed by:    emaste
Sponsored by:   https://www.patreon.com/bsdivy
Differential Revision:  https://reviews.freebsd.org/D52826
ed6716207debca81c37a1399ecf1d799be0e688d Lexi Winter 2025-10-02 01:13:56
Commit group #9: rc: Teach netwait to wait for DAD
rc: Teach netwait to wait for DAD

In some configurations, especially in jails, it is possible for the
system to boot so fast that we end up launching daemons while duplicate
address detection is still ongoing.  If that happens, said daemons may
fail to bind to IPv6 addresses, as they are still tentative.  Teach the
netwait service to wait (up to 10 seconds, by default) for the tentative
flag to vanish.

MFC after:      1 week
Reviewed by:    olce
Differential Revision:  https://reviews.freebsd.org/D51889
5ead817c3b7af6d6b5fea222ab144db2c3167b22 Dag-Erling Smørgrav 2025-10-02 09:28:05

rc: Improve netwait DAD logic

Disable if IPv6 is not supported, and instead of 10 seconds, default to
one more than the value of net.inet6.ip6.dad_count.

Fixes:          https://cgit.freebsd.org/src/commit/?id=5ead817c3b7a ("rc: Teach netwait to wait for DAD")
Reviewed by:    bz
Differential Revision:  https://reviews.freebsd.org/D52905
ec6ad605ecea5c4a76d2e744df0265cc3f3a01b9 Dag-Erling Smørgrav 2025-10-05 18:40:39
ipfilter ippool: Flag deleted entries with "#"
List deleted entries prefixed by "#". This is consistent with other
ippool list functions.

Fixes:          https://cgit.freebsd.org/src/commit/?id=7531c434a593
MFC after:      1 week
94758e72fdbd6b218e79884e22347eb357a7e51d Cy Schubert 2022-11-02 05:28:19
ipfilter ippool: Prefix deleted entries with "#"
To maintain consistency with ippool list functions, prefix deleted
entries with "#".

MFC after:      1 week
f3ff6abb9d816a68e65af5ed55552d152a58b5e4 Cy Schubert 2022-11-02 05:34:54
ipfilter/ippool: Dump a copy of ippool hash data in "new" format
As with 7531c434a593, which dumped ippool table data in the "new"
format, print hash data in the "new" format.

MFC after:      1 week
2f30b43fa269bc63086b0428f45c79e982abb02f Cy Schubert 2022-11-02 05:46:41
ipfilter/ippool: Dump a copy of ippool dstlist data in "new" format
As with 7531c434a593, which dumped ippool table data in the "new"
format, print dstlist data in the "new" format.

MFC after:      1 week
eee36ffa0d874f1c8aca912f7c2a8eba34509927 Cy Schubert 2023-03-01 03:18:07
bsdinstall: Improve pkgbase handling for jails
Add a new --jail option to the pkgbase script which installs
jail-specific set variants if they exist:

* "minimal" is replaced with "minimal-jail"

* A kernel is not installed.

* For sets shown in the component selection dialogue, only show the
  appropriate variant (jail or non-jail) for the target.

Modify the jail script to pass --jail to the pkgbase script.

Remove the redundant --no-kernel option, which was added in 15.0 and
was only used to install jails.

MFC after:      3000ms
Reviewed by:    ifreund_freebsdfoundation.org
Sponsored by:   https://www.patreon.com/bsdivy
Differential Revision:  https://reviews.freebsd.org/D52829
8d0a90512ee35064697fbeffd0886eba4c82eb8d Lexi Winter 2025-10-03 21:36:30
acpidump: quiet GCC -Wmaybe-uninitialized
Reviewed by:  kib
daf4da4d09718980d96fa41a8f420cc0e0bf1bd8 Ryan Libby 2025-10-03 22:48:28
flua: support our flua modules in the bootstrap flua
This version builds every module into the flua binary itself, since all
of the bootstrap tools are built -DNO_SHARED.  As a result, we also
cannot dlsym(), so we can't really discover the names of our newly
builtin modules.  Instead, just build out a linker set with all of our
luaopen_*() functions to register everything up-front.

Building in all of the modules isn't strictly necessary, but it means
that we have an example of how to add a bootstrap module everywhere you
go and one doesn't need to consider whether bootstrap flua can use a
module when writing scripts.  On my build machine, the consequence on
our binary size is an increase from around 1.6M -> 1.9M, which isn't
really that bad.

.lua modules can install into their usual path below $WORLDTMP/legacy
and we'll pick them up automagically by way of the ctor that sets up
LUA_PATH early on.

This re-lands bootstrap module support with a more sensible subset, and
after having verified that it cross-builds fine on macOS and Linux -- we
cannot do libfreebsd on !FreeBSD because it's more system header
dependant.  We also need to bootstrap libmd to bring in libhash, and
libucl + libyaml.

Reviewed by:    bapt, emaste (both previous version)
Differential Revision:  https://reviews.freebsd.org/D51890
151bd3516b541823b16793460d73916e63d2b9c1 Kyle Evans 2025-10-04 02:16:51
Commit group #10: flua: kick out the remaining builtin modules
flua: kick out the remaining builtin modules

Bootstrap flua has some magic now to handle modules by building them in
and discovering them via linker sets.  This is slightly cleaner than
always building them in and baking them into loadedlibs for both
bootstrap and system flua.

Adjust the stand build now that these three libs have their own new
homes.

Reviewed by:    bapt, emaste
Differential Revision:  https://reviews.freebsd.org/D51891
b11a5709ec2b61fefb03bfdd38e2f06d2c1107c1 Kyle Evans 2025-10-04 02:16:51

flua: move lposix back into flua for now

The real luaposix is structured differently, and our builtin version
tends to model that in its own special way.  Build it back in until we
get the shlib model just right to unbreak nuageinit, among other things.

This is a partial revert of the below-referenced commit; the other two
modules are simple, though, and were accurately split out.

Reported by:    markj
Fixes:  https://cgit.freebsd.org/src/commit/?id=b11a5709ec2b6 ("flua: kick out the remaining builtin modules")
9c7db0931d486ce800aa71d9f41abfad9f7f691f Kyle Evans 2025-10-04 13:57:59

nuageinit: require lfs where it's needed

nuageinit largely already did this, but one spot was missed -- add the
necessary require() in to get the module loaded.

Fixes:  https://cgit.freebsd.org/src/commit/?id=b11a5709ec2b6 ("flua: kick out the remaining builtin modules")
bb4167463ac44b47ded4e0223a0abd8381ca6cd8 Kyle Evans 2025-10-04 13:58:00

flua: unbreak the build

Local tree pollution let this escape.  *sigh*.

Pointy hat:     kevans
Pointy hat:     kevans
Pointy hat:     kevans
Fixes:  https://cgit.freebsd.org/src/commit/?id=9c7db0931d486ce ("flua: move lposix back into flua for now")
d505ef08ffbe3b7383fbc6ed30121de9256ac18e Kyle Evans 2025-10-04 15:01:40
Commit group #11: heimdal-kadmin: Add support for the -f dump option
heimdal-kadmin: Add support for the -f dump option

The "-f" dump option allows a dump of the Heimdal
KDC in a format that the MIT kdb5_util command can
load into a MIT KDC's database.
This makes transitioning from the Heimdal KDC to
the current MIT one feasible without having to
re-create the KDC database from scratch.

glebius@ did the initial work, cherry picking these
commits from the Heimdal sources on github and then doing
extensive merge conflict resolution and other fixes so
that it would build.
Heimdal commit fca5399 authored by Nico Williams:
Initial commit for second approach for multiple kvno.  NOT TESTED!

Heimdal commit 57f1545 authored by Nico Williams:
Add support for writing to KDB and dumping HDB to MIT KDB dump format
    Before this change Heimdal could read KDBs.  Now it can write to
    them too.

    Heimdal can now also dump HDBs (including KDBs) in MIT format,
    which can then be imported with kdb5_util load.

    This is intended to help in migrations from MIT to Heimdal by
    allowing migrations from Heimdal to MIT so that it is possible
    to rollback from Heimdal to MIT should there be any issues.  The
    idea is to allow a) running Heimdal kdc/kadmind with a KDB, or
    b) running Heimdal with an HDB converted from a KDB and then
    rollback by dumping the HDB and loading a KDB.

    Note that not all TL data types are supported, only two: last
    password change and modify-by.  This is the minimum necessary.
    PKINIT users may need to add support for KRB5_TL_USER_CERTIFICATE,
    and for databases with K/M history we may need to add KRB5_TL_MKVNO
    support.

This resulted in a Heimdal kadmin that would dump
the KDC database in MIT format.  However, there
were issues when this dump was loaded into the
current MIT KDC in FreeBSD current/15.0.

The changes I did to make the dump more useful are listed below:
When "-f MIT" is used for "kadmin -l dump" it writes
the dump out in MIT format.  This dump format is understood
by the MIT kdb5_util command.  The patch modifies the above
so that the MIT KDC's master key keytab file can be provided
as the argument to "-f" so that the principals are re-encrypted in
it. This allows any principal with at least one strong encryption
type key to work without needing a change_password.
The strong encryption types supported by the Heimdal KDC are:
aes256-cts-hmac-sha1-96
aes128-cts-hmac-sha1-96

The issues my changes address are:
- If there are weak encryption keys in a principal's entry,
  MIT's kadmin.local will report that the principcal's entry
  is incomplete or corrupted.
- The keys are encrypted in Heimdal's master key.  The
  "-d" option can be used on the "kadmin -l dump" to
  de-encrypt them, but the passwords will not work on the
  current MIT KDC.

To try and deal with the above issues, this patch modied the above to:
- Does not dump the weak keys.
- Re-encrypts the strong keys in MIT's master key if the argument
  to "-f" is actually a filename which holds the MIT KDC's
  master key keytab and not "MIT".
- For principals that only have weak keys, it generates
  a fake strong key. This key will not work on the MIT
  KDC, but the principal entry will work once a
  change_password is done to it.
- It always generates a "modified_by" entry, faking one if
  not already present in the Heimdal KDC database.
  This was necessary, since the MIT kadmin will
  report that the principal entry is "incomplete or
  corrupted" without one.

It also fixed a problem where "get principal" no longer
worked after the initial patch was applied.

A man page update will be done as a separate commit.

I believe this commit is acceptable since the Heimdal
sources are now essentially deprecated in favor of the
MIT sources and that this new "-f" patch simplifies
the transition to the MIT KDC.

Discussed with: glebius, cy
MFC after:      3 days
5000d023a446b81f6d45ed59aa379607ec814f01 Rick Macklem 2025-10-05 16:18:35

kadmin.8: Document the new dump -f flag

Commit 5000d023a446 added a new flag to the dump option.

This patch documents this new flag.

This is a content change.

MFC after: 3 days
Fixes:  https://cgit.freebsd.org/src/commit/?id=5000d023a446 ("heimdal-kadmin: Add support for the -f dump option")
03da141d59ae1da4e66974c466e2cb26f296e6df Rick Macklem 2025-10-05 21:06:26

Libraries

libpfctl: fix memory leak in pfctl_get_status()
Remember to also free ncounters.

Fixes:          https://cgit.freebsd.org/src/commit/?id=c00aca9a71 ("pf: Show pf fragment reassembly counters.")
MFC after:      3 days
Sponsored by:   Rubicon Communications, LLC ("Netgate")
bdb205c53ed769ad9f5e8da1ec6d05c48992dbf8 Kristof Provost 2025-10-01 09:41:25
libexec/kgdb: Add new modules and install them together with debug info
This change simplifies integration of gdb python scripts with our kernel
debugging infrastructure.  Rather than putting debugging scripts in
/usr/libexec/kgdb, move them to <path-to-kernel-debug-symbols>/gdb, and
add a kernel-gdb.py which automatically loads modules from that
directory.  kernel-gdb.py will be automatically executed by kgdb when
loading kernel debug symbols (assuming a default configuration), so one
no longer needs to do anything to use these modules.

The change also adds a couple of new modules, vnet.py and pcpu.py, for
conveniently accessing VNET symbols and PCPU/DPCPU fields, respectively.
Note that these require a change to the kernel linker when accessing
symbols from a loadable kernel module.

sys/tools/gdb/README.txt describes the scheme in more detail and
provides some rudiementary documentation for the commands and functions
added by these modules.  It should be updated when adding new features.

sys/tools/gdb/selftest.py can be used to do some primitive testing of
the modules.  All it does is execute a number of gdb commands making use
of commands and functions added by these modules.  The developer is
expected to verify that the commands complete without errors and that
the output looks sane.

Discussed with: kp, avg, jhb, glebius
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D50825
ea675a43f09ba569adf1dd17b4f1ced970e48de4 Mark Johnston 2025-10-03 14:25:53
lib{c,openbsd}: use ckd_mul() for overflow checking in re(c)allocarray
Summary:
This makes the code easier to understand and slightly faster,
but requires C23.  calloc() would  benefit, too, but I didn't
want to touch the imported jemalloc code base.

Reviewed by:    kib
Differential Revision:  https://reviews.freebsd.org/D52854
7233893e949689d378d38c11651e68321deed12c Robert Clausecker 2025-10-02 13:26:46
lib/libc: add FBSD-1.9 to Versions.def
In preparation of adding recallocarray() to libc.

See also:       D52863
Reviewed by:    kib
Differential Revision:  https://reviews.freebsd.org/D52878
969c1191957a9ad689546ddb4e8c4df2217c5052 Robert Clausecker 2025-10-03 01:43:48
lib/libc: add recallocarray()
This function from OpenBSD is a hybrid of reallocarray() and calloc().
It reallocates an array, clearing any newly allocated items.
reallocarray() ultimately originates from OpenBSD.

The source is taken from lib/libopenbsd, which now no longer has the
function unless when bootstrapping (needed for mandoc).

Reviewed by:    kib
Differential Revision:  https://reviews.freebsd.org/D52863
42664610795bc0a728851ba6223fcf9b93801167 Robert Clausecker 2025-10-02 14:33:55
libc/resolv: get rid of MD5
MD5 is used by libc/resolv to generate a random sequence id from a
current time stamp.  Replace this convoluted mechanism with a call
to arc4random().  This permits us to entirely drop MD5 from libc,
simplifying the MD5 rework proposed in D45670.

Approved by:    markj
Reviewed by:    kevans, markj
See also:       D45670
Event:          EuroBSDcon 2025
Differential Revision:  https://reviews.freebsd.org/D52784
d518f64cef6db1d301377e78742b94ca96a881e3 Robert Clausecker 2025-09-29 13:53:14
libc: Move NLS catalogues to the locales packages
We don't want to put these in clibs (where libc is) since they are not
critical to system operation.  Move them to locales, since anyone who
is interested in translated versions of strerror() is going to have
that installed anyway.

While here, add some more documentation to bsd.nls.mk, particularly
the NLSPACKAGE option.

MFC after:      3 seconds
Reviewed by:    manu, kib
Sponsored by:   https://www.patreon.com/bsdivy
Differential Revision:  https://reviews.freebsd.org/D52898
0242d4c3aea4b56ba76da440d1948d9e3d19ae87 Lexi Winter 2025-10-05 05:03:21

Filesystems

vfs cache: Add vn_fullpath_jail(), factor out common code
Introduce vn_fullpath_jail(), which returns a path to the passed vnode
relative to the current jail's root.  It will be used by mac_do(4) in
a subsequent commit.

Factor out common code between the new variant and vn_fullpath().  While
here, rework the comments a bit.

Add vn_fullpath_jail() to the vn_fullpath.9 manual page.  While here,
document all the existing public vn_fullpath*() functions.

Reviewed by:    kib (except latest manual page changes)
MFC after:      3 days
Event:          EuroBSDCon 2025
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D52757
c5a813c9f486da49551c3be2e7700ca0cb0a489a Olivier Certner 2025-09-26 10:18:12
ddb show lockedvnods: avoid trap for ufs vnode under construction
ddb show lockedvnods might find a ufs vnode after it is inserted into
the mount queue in ffs_vgetf but before the dinode is allocated.  Avoid
trapping by testing for the dinode pointer.

Reviewed by:    markj
Discussed with: mjg
Sponsored by:   Dell Inc.
Differential Revision:  https://reviews.freebsd.org/D52795
76157a63a0c63dd7363f6c8ae60edc814b3c138a Ryan Libby 2025-10-01 18:25:27
Commit group #12: nullfs
nullfs: remove the vhold/vdrop cycle around unlock

Both lower vnode and null data are safe while the lock is held,
at the same time neither is touched after unlock.

While here remove stale comment about interlock handling. It is no
longer legal to pass to unlock.

Reviewed by:            kib
Tested by:              pho (previous version)
Differential Revision:  https://reviews.freebsd.org/D38761
94aae0513896de398a1feda6cd97f7efa2a5dc2e Mateusz Guzik 2025-10-01 11:09:50

nullfs: assert the vnode is not doomed in null_hashget_locked

While here some style touch ups and fixing a stale name in an assert.

Reviewed by:            kib
Tested by:              pho (previous version)
Differential Revision:  https://reviews.freebsd.org/D38761
72347d73464ccdd361c4d286486b9b4ea8d7c945 Mateusz Guzik 2025-10-01 10:28:48

nullfs: smr-protected hash lookup

Vast majority of real-world contention on the hash comes from lookups,
notably seen during highly parallel poudriere runs.

Lockless lookup largely alleviates the problem.

Reviewed by:            kib
Tested by:              pho (previous version)
Differential Revision:  https://reviews.freebsd.org/D38761
249ec85352b5b69d70f71e3a329d16334ca71f59 Mateusz Guzik 2025-09-30 15:16:30

nullfs: avoid the interlock in null_lock with smr

This largely eliminates contention on the vnode interlock.

Note this still does not scale, to be fixed(tm).

Reviewed by:            kib
Tested by:              pho (previous version)
Differential Revision:  https://reviews.freebsd.org/D38761
641a58239520de9fc5a9077e9a709481cfc75dc0 Mateusz Guzik 2025-10-01 10:06:39

Kernel

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

Commit group #13: MAC/do: Check executable path from the current jail's root
MAC/do: Check executable path from the current jail's root

Contrary to my initial belief, vn_fullpath() does return a vnode's path
from the current chroot, and not from the global root (which would have
been a bug also, but without security consequences).  This enables
a "confused deputy"-like scenario where a chroot(2) can change which
executable can be authorized by MAC/do, which is even more problematic
for unprivileged chroot(2).

This was found by re-examining the code following two close events:
1. Shawn Webb sent a mail to freebsd-hackers@ on 08/05 saying that in
   HardenedBSD they had added a check on P2_NO_NEW_PRIVS (in
   mac_do_priv_grant()), which I responded to on 08/20 saying that
   P2_NO_NEW_PRIVS was not necessary for mac_do(4), with a correct
   reasoning but based on the wrong above-mentioned assumption about
   vn_fullpath().
2. I reviewed some code by Kushagra Srivastava (GSoC 2025 student
   working on mac_do(4)/mdo(1)) adding the ability to specify which
   executables can spawn processes that mac_do(4) may decide to
   authorize (others are simply ignored), which currently is hardcoded
   to '/usr/bin/mdo'.

MFC after:      3 days
Event:          EuroBSDCon 2025
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D52758
9f269a0a771aff4f0a735211907a52c52fc0661b Olivier Certner 2025-09-27 09:56:33

vn_fullpath.9: Add missing links for described functions

To reflect all the functions that are now described in the manual page.

Fixes:          https://cgit.freebsd.org/src/commit/?id=9f269a0a771a ("MAC/do: Check executable path ...")
MFC after:      3 days
Event:          EuroBSDCon 2025
Sponsored by:   The FreeBSD Foundation
05e5de00b9ea048f868522ff0bdae4e388685ddf Olivier Certner 2025-09-29 17:48:09

share/man/man9: Fix compilation

I goofed in the previous commit.

Fixes:          https://cgit.freebsd.org/src/commit/?id=05e5de00b9ea ("vn_fullpath.9: Add missing links for described functions")
MFC after:      3 days
Event:          EuroBSDCon 2025
Sponsored by:   The FreeBSD Foundation
c87a9f51a0debf707cb4fc9a5e3b4425b08d154d Olivier Certner 2025-09-29 18:58:03
LinuxKPI: pci: implementation of [lkpi_]pci_get_slot()
Like lkpi_pci_get_domain_bus_and_slot() implement lkpi_pci_get_slot()
using pci_find_bsf() instead of pci_find_dbsf() (no domain).
This is needed for a wireless driver.

Unfortunately the name [pci_get_slot()] collides with the native PCI
function.  Add a guard around it and disable the use when the native
version is required (in lkpifill_pci_dev() and in bnxt/bnxt_en; if the
latter gets fixed we can probably also fix work around it in the former;
further conflicts in drm-kmod 6.1-lts, 6.6-lts, and master were resolved).

Sponsored by:   The FreeBSD Foundation (initially)
MFC aftre:      3 days
Reviewed by:    dumbbell
Differential Revision:  https://reviews.freebsd.org/D52065
4179e6b78297369f0cf0eae1076e01e5151c5cbe Bjoern A. Zeeb 2025-09-04 20:19:48
UPDATING: bump __FreeBSD_version for drm-kmod/nvidia-drm vs. LinuxLPI
Both drm-kmod and nvidia-drm were updated to keep compiling and/or
working after the latest LinuxKPI PCI changes.  Some of what should
have worked for a long time but did not or conflicted was hidden
behind native PCI calls instead of using LinuxKPI.  We cleaned this
up.  Bump __FreeBSD_version so that users will get the updated packages.

MFC after:      3 days
PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=289647
52ce810302f70cc7b995651eb1b19adfa014b351 Bjoern A. Zeeb 2025-09-29 23:10:10
ddb show allchains: avoid traps and show pointers for lockmgr and sx
When trying to walk lock chains, we have to deduce what a thread is
blocked on.  Checking LOCK_CLASS(td->td_wchan) is not a very reliable
method by itself, as it just tests whether a particular 4 bits near
where td_wchan points have a particular value.  Misinterpreting wait
channel pointers of other sleeps as lockmgr locks would frequently cause
ddb show allchains (or show lockchain) to trap, or to produce incorrect
output.

Now, check the sleepq_type.  When calling sleepq_add, we use SLEEPQ_LK
for lockmgr locks and SLEEPQ_SX for sx locks.  This is a more reliable
indication that the td_wchan is actually a lock.

While here, also make the output of lockmgr and sx locks consistent with
the output for other locks (see print_lockchain).  Outputting a pointer
to the lock allows it to be inspected further with ddb show lock or
other methods.

Reviewed by:    markj
Sponsored by:   Dell Inc.
Differential Revision:  https://reviews.freebsd.org/D52794
e7e958d83d8503c3b8714f68418d4509b8288ed9 Ryan Libby 2025-10-03 05:47:47
isa_common: allow multiple device instances
In some devices, there may be multiple isa bridges available from different
sources. Therefore, we allow multiple lpc devices to be generated so that
pcie bus won't show "none" anymore.
For example, in my AMD based Framework Laptop, there are two such
bridges. One is acpi hinted, another is from pcie.

Reviewed by:    imp
Approved by:    lwhsu (mentor)
MFC after:      2 weeks
Differential Revision: https://reviews.freebsd.org/D52815
f32ffd11b54792d7bdd37b6dfc0f904a561b879c ShengYi Hung 2025-10-01 08:33:19
linker: Make it easier to find the VNET section layout
When trying to find the address of a VNET variable from a debugger, it
helps to have the original address of the VNET section.  In particular,
given the address of a vnet_entry_foo symbol, one wants to easily find
the linker file that the symbol belongs to.

In link_elf_obj.c, the section address for VNET and DPCPU sections is
overwritten in link_elf_link_preload() and link_elf_load_file().  Add an
"origaddr" field to store the original absolute address of the section
base.

In link_elf.c the elf_file_t already has the fields we want, but they
were not getting filled out for the kernel itself.  Fix that too, since
that simplifies things for debuggers and improves consistency.

Reviewed by:    kib
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D52730
07747afd516e710814fdc65afb0e5000d046f28f Mark Johnston 2025-10-03 14:25:38
filedesc: Close race between fcntl(F_SETFL) and ioctl(FIONBIO/FIOASYNC)
- Use the recently-added fsetfl_lock/unlock API to synchronize direct
  FIONBIO and FIOASYNC ioctls with fcntl(F_SETFL).

- While here, skip calling the underlying ioctl if the flag's current
  state matches the requested state.

- Also while here, only update the flag state if the underlying ioctl
  succeeds.  This fixes a bug where the flags represented the new
  state even if the underlying ioctl failed.  A test is added for this
  last case that a failing FIOASYNC on /dev/null doesn't result in
  setting O_ASYNC in the file flags.

Reviewed by:    kib
Differential Revision:  https://reviews.freebsd.org/D52721
dfd7d1610aeb654aafcaa8cf77b75fc5c7d60250 John Baldwin 2025-10-03 16:43:30
mtx: remove stale commentary about inlined spinlock ops
While both locking and unlocking a spinlock used to be inline, this
changed when spinlock_enter/spinlock_exit got introduced, defeating the
point of inlining them.

This either needs to have inlined spinlock enter/exit in place or have
mtx lock/unlock as function calls with the irq flags inlined in there.

Sponsored by:   Rubicon Communications, LLC ("Netgate")
6cc493c79d9b9f8318c87d3d6bfd225924cc933b Mateusz Guzik 2025-10-04 02:20:37
pipe: consistently use PIPE_LOCK_ASSERT
d0a35ec01c31b498bd9996b50641a8629757b65f Mateusz Guzik 2025-10-05 15:37:41
mtx: retire _mtx_release_lock_quick
The macro is misleading and of questionable value to begin with.

For starters, it is used for both spinlocks and regular mutexes (the
latter only the in the slow path), which have fundamentally different
requirements on unlock -- spinlocks are guaranteed to not have blocked
waiters and can blindly do a store.

The commentary above the it is also head-scratching:
> Release mtx_lock quickly, assuming we own it.

You can't *just* release a sleepable mutex "quickly". The only legal use
right now is when the turnstile lock is held.

Note that unlock of a sleepable mutex without using RMW atomics is very
much possible and may show up soon (tm).

Sponsored by:   Rubicon Communications, LLC ("Netgate")
ccb600906f152df310794f146eac54372e6b2665 Mateusz Guzik 2025-10-05 15:38:06
vfs foffset: drop weird commentary about offset protection
It is readily apparent the FOFFSET_LOCKED flag protects it because the
read followed its use.

It also does not matter who said how it was protected earlier.

Reviewed by: kib, markj
Sponsored by:   Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D52915
f16178e0bba81c32b1f4fba310c7d0f2756aca85 Mateusz Guzik 2025-10-05 17:02:01
vfs offset: fix assertion failure in face of racing ffofset and setfl locking
Both use the same 16 bit var to store their locked and waiters bits,
then this in file_v_unlock:

        state = atomic_load_16(flagsp);
        if ((state & lock_wait_bit) == 0 &&
            atomic_cmpset_rel_16(flagsp, state, state & ~lock_bit))
                return;

can fail if for example foffset is being unlocked while setfl is getting
locked.

Afterwards the code assumes there are blocked waiters on foffset.

Reviewed by: kib, markj
Sponsored by:   Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D52915
b1de02c415de5df2d24d8021827634fc095b7a26 Mateusz Guzik 2025-10-05 17:03:54

Build system

Commit group #14: packages: Add an "optional" set
packages: Add an "optional" set

This is everything in "base" but without compilers.  This means we
have sets to support four basic workloads:

- "minimal" for a small installation where the user intends to add
  other packages by hand.

- "optional" for a complete installation on a production system which
  does not need to compile software.

- "devel", which can be added to either minimal or optional when
  compilers are required.

- "base" for a complete installation, including compilers, for users
  who don't want to interact with pkgbase and just want the complete
  system installed like it was before.

This is probably the last set want to add; any further metapackages
would be better treated as "task" packages intended to target one
specific workload.

MFC after:      3 days
Reviewed by:    cperciva, bapt
Differential Revision:  https://reviews.freebsd.org/D52777
eaecc9551ae4d342fee921fb4c0a1eeb6bf68b86 Lexi Winter 2025-09-29 20:33:38

create-sets.sh: Always build the base sets

Since all packages were moved to the optional set, no packages are
directly in the base sets, which means nothing caused the base sets
to be built.  Add the base sets to create-sets.sh so they're always
built.

Fixes:          https://cgit.freebsd.org/src/commit/?id=eaecc9551ae4 ("packages: Add an "optional" set")
MFC after:      1 day
a087b4aec38c37d47b888aa8411948250cdd4bc0 Lexi Winter 2025-09-30 04:25:38
Commit group #15: sh: Remove /.profile
sh: Remove /.profile

root's home directory was moved to /root many years ago, so there's no
reason to keep this old link.  This brings sh in line with csh, where
/.cshrc was removed in dcb65c5a94d4.

Relnotes:       yes
Approved by:    re (cperciva)
MFC after:      1 day
PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=289097
Reviewed by:    cperciva, jilles, bapt, emaste
Differential Revision:  https://reviews.freebsd.org/D52161
d31e342bcc8e22d7eb25c21a711cd4b8a54db6c0 Lexi Winter 2025-09-30 06:02:06

bin/sh: Fix the build

Removing <bsd.prog.mk> was unintentional; put it back.

Fixes:          https://cgit.freebsd.org/src/commit/?id=d31e342bcc8e ("sh: Remove /.profile")
MFC after:      1 day
bb0955ee4db8870bb013cf7d208ad9b2fc27b619 Lexi Winter 2025-09-30 06:22:39
liby: Move to toolchain package
We don't need an entire package for this trivial library.  Move it to
toolchain, which in practice means it's installed in toolchain-dev as
it only contains a static library.

MFC after:      1 day
Reviewed by:    bapt
Sponsored by:   https://www.patreon.com/bsdivy
Differential Revision:  https://reviews.freebsd.org/D52793
b0f25a38d7217b04dcdf7f2272ecf5f2f314d314 Lexi Winter 2025-09-30 08:10:32
libstdthreads: Move to the runtime package
This library is required for C11 conformance, and is tiny (11kB), so
instead of creating a bunch of packages for it, put it in runtime.

Although this is a core C library and might be expected to live in
clibs, kib objected to this on the basis that almost nothing actually
uses libstdthreads and putting it in clibs would be wasteful.

MFC after:      1 day
Reviewed by:    kib
Sponsored by:   https://www.patreon.com/bsdivy
Differential Revision:  https://reviews.freebsd.org/D52792
11709058bf680f5738c6656597f2ff9e662c9400 Lexi Winter 2025-09-30 08:11:14
packages: Rename liblzma package to xz
Rename liblzma to xz, and use LIB_PACKAGE to create an xz-lib package
for runtime libraries.

MFC after:      1 day
Reviewed by:    bapt
Sponsored by:   https://www.patreon.com/bsdivy
Differential Revision:  https://reviews.freebsd.org/D52791
9124ace751eb9c856c50c3698cf93ede45a9897d Lexi Winter 2025-09-30 08:11:55
libsdp: Move to bluetooth-lib package
Instead of creating a separate libsdp package, use LIB_PACKAGE to
ship this in bluetooth-lib.

MFC after:      1 day
Reviewed by:    bapt
Sponsored by:   https://www.patreon.com/bsdivy
Differential Revision:  https://reviews.freebsd.org/D52790
41ee4321cc528b1f72d6a674fafdd5337be83f95 Lexi Winter 2025-09-30 08:12:28
libbsm: Rename package to audit-lib
This is part of audit, so use the new LIB_PACKAGE feature to name the
package audit-lib, rather than libbsm.

MFC after:      1 day
Reviewed by:    bapt
Sponsored by:   https://www.patreon.com/bsdivy
Differential Revision:  https://reviews.freebsd.org/D52789
a053f948ade60e8a63ebdaa676bf95c5ce38af07 Lexi Winter 2025-09-30 08:13:03
libstdbuf: Move to the utilities package
This is a niche tool which is only useful in a small number of
specific situations.  It's very small (8kB), and the executable
component /usr/bin/stdbuf is already in -utilities, so move the
shlib to -utilities as well.

MFC after:      1 day
Reviewed by:    bapt
Sponsored by:   https://www.patreon.com/bsdivy
Differential Revision:  https://reviews.freebsd.org/D52788
4c8bbf5897b7e8e580f8ecb1d9d93f5d6d6c7f24 Lexi Winter 2025-09-30 08:13:34
virtual_bt_speaker(8): Do not build if WITHOUT_BLUETOOTH is set
virtual_bt_speaker(8) includes bluetooth.h, which won't exist if
WITHOUT_BLUETOOTH is set, which will result in a build failure.

Reported by:    peterj
Fixes:          https://cgit.freebsd.org/src/commit/?id=9cab9fde5eda ("virtual_oss: Port to base")
Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
25d551b5fb1d28ed485d56d9d637993eb2d223b1 Christos Margiolis 2025-09-30 09:10:01
packages: Move ctf-tools to ctf
Remove the ctf-tools package.  Add a new package which contains the
previous contents of ctf-tools along with libctf.  This removes
CDDL-licensed code from the utilities package.

Set LIB_PACKAGE for libctf so that DTrace runtime doesn't need to
install the tools.

MFC after:      1 day
Reviewed by:    bapt
Sponsored by:   https://www.patreon.com/bsdivy
Differential Revision:  https://reviews.freebsd.org/D52776
24e4dcf4ba5e9dedcf89efd358ea3e1fe5867020 Lexi Winter 2025-09-30 08:29:37
package: Use correct license for clang
LLVM was relicensed under Apache 2.0 with LLVM exception a while ago.

MFC after:      1 day
Reviewed by:    bapt, imp (previous version)
Sponsored by:   https://www.patreon.com/bsdivy
Differential Revision:  https://reviews.freebsd.org/D51769
3cbd1f81688855a91f826ee4e04618ceace101ca Lexi Winter 2025-09-30 08:31:17
Commit group #16: pkgbase: move ncurses into its own package
pkgbase: move ncurses into its own package

Pushing ncurses into clibs adds extra upgrade risk to a package that
otherwise consists of integral libs with non-trivial interdependencies.

Adding it to -runtime was considered, but the move was historically
motivated to some extent by allowing a much smaller set of base libs to
be installed for smaller VM images that don't really need all of the
runtime package.

This also fixes the ncurses build to ensure that libmenuw is grouped
with the rest of the ncurses libraries, which doesn't seem to have been
an intentional omission.

Reviewed by:    ivy
MFC after:      2 days (pkgbase movement)
Differential Revision:  https://reviews.freebsd.org/D52786
06afa0a55e0acc00823f08fe17305df13502f235 Kyle Evans 2025-09-30 12:21:33

packages: remove ncurses-all license text

The "Software" line in the license text seems to trip some kind of UCL
parsing bug.  Replace it with an SPDX tag and a pointer to the file for
the time being.

Reported by:    fluffy, madpilot
Fixes:  https://cgit.freebsd.org/src/commit/?id=06afa0a55e0ac ("pkgbase: move ncurses into its own package")
df74ea7f41090f38d9fa1c739029b135cd199a45 Kyle Evans 2025-09-30 19:34:31
pkgbase: move libedit into the -runtime package
libedit isn't as foundational as the rest of -clibs, but various bits
of -runtime do need it.  Give it a new home over in -runtime.

This also fixes the libedit build to group the readline bits into the
same package as the libedit that implements them.

Reviewed by:    ivy
MFC after:      2 days (pkgbase movement)
Differential Revision:  https://reviews.freebsd.org/D52787
5e4e12ae64b3e0377984d22610a6b3d6ccd6cee6 Kyle Evans 2025-09-30 12:21:34
libc: Add missing MLINK for tzname(3)
While here, fix manlint warnings and a typo in tzset(3).

MFC after:      3 days
be8830612314d9afb64b5c040db689de44eb4b85 Dag-Erling Smørgrav 2025-09-30 12:27:24
Commit group #17: virtual_oss: Do not build if WITHOUT_CUSE is set
virtual_oss: Do not build if WITHOUT_CUSE is set

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=289920
Fixes:          https://cgit.freebsd.org/src/commit/?id=9cab9fde5eda ("virtual_oss: Port to base")
Sponsored by:   The FreeBSD Foundation
MFC after:      1 day
Reviewed by:    emaste
Differential Revision:  https://reviews.freebsd.org/D52807
f040ee6e407832fc9f08d85cd792d1cfb8104976 Christos Margiolis 2025-09-30 17:01:37

rc.d: Fix package for virtual_oss

There is no virtual_oss package.  Install the virtual_oss script in
rc, since there's currently no specific package for sound utilities.
This fixes the pkgbase build.

Fixes:  https://cgit.freebsd.org/src/commit/?id=f040ee6e4078 ("virtual_oss: Do not build if WITHOUT_CUSE is set")
bce8cdaf4cb184db577a5633e82bdabe24239af1 Lexi Winter 2025-10-01 10:04:19
release: Use standard Azure disk image extension
Azure images are Microsoft VHD files which use the .vhd extension.
We use the mkimg format arg "vhdf" to specify the fixed vhd format, but
the extension should remain .vhd.

Reviewed by:    lwhsu, whu
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D38761
fb77d8e546e1894300843600409c48596644b3b6 Ed Maste 2023-02-24 18:31:26
.github: Update to use llvm 15
This is the latest supported version in Ubuntu 22.04

Reviewed by:    vexeduxr, imp, emaste
Sponsored by:   Arm Ltd
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1862
cf583997282f962d9e8bf478667d5087f7c1f2da Andrew Turner 2025-09-11 07:22:38
diff3: Move to own package
diff3 is the last remaining GPL-licensed userland component.  Move it
to its own package, so that it may be excluded if desired.

Reviewed by:    ivy
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D52810
e7258c42520c18c034f644b97377d8d2a0ad8b7c Ed Maste 2025-10-01 09:28:56
Makefile.inc1: Force NO_ROOT for distribute* and package*
These targets are used to produce legacy dist sets for install media and
now always use NO_ROOT mode.  Extend existing logic that forces NO_ROOT
mode to these cases to ensure they do not run in the wrong mode.

Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D50551
300aa267efaa08564337797e89590737a7cc6af0 Ed Maste 2024-12-11 13:50:55
etc, ypserv: Fix symlink creation for pkgbase
The Makefile logic for /etc/aliases, /var/yp/Makefile and /etc/unbound
tries to avoid creating the symlink if it already exists in the target,
but this breaks with pkgbase since the symlink won't be installed (and
therefore won't be added to METALOG) if building with an existing
worldstage, meaning it's missing from the generated package.

Change the logic to forcibly install the symlink if NO_ROOT is defined,
but keep the existing logic for non-package builds to avoid trashing
the user's custom symlinks on non-pkgbase installworld.

MFC after:      3 seconds
Reported by:    cperciva
Reviewed by:    cperciva, emaste
Sponsored by:   https://www.patreon.com/bsdivy
Differential Revision:  https://reviews.freebsd.org/D52834
09cd3decf0fae4b769b04c1e900ed5935c40957e Lexi Winter 2025-10-02 01:10:28
libexec: Move blacklistd-helper to the blocklist package
Reviewed by:  emaste
Sponsored by:   https://www.patreon.com/bsdivy
Differential Revision:  https://reviews.freebsd.org/D52830
63ce00f5d0b5dc34d57fb8d3969b875732c93eb2 Lexi Winter 2025-10-02 01:12:01
packages: Add a sound package
Put virtual_oss, /etc/devd/snd.conf and the other audio-related tools
into a new "sound" package.  Don't create a separate -lib package,
since it's unlikely someone will want mixer(3) without mixer(8).

Put the sound package in the optional set rather than minimal, since
it's not actually required for audio hardware support, and many systems
(including nearly all servers) won't want it installed.

MFC after:      3 seconds
Reviewed by:    christos
Sponsored by:   https://www.patreon.com/bsdivy
Differential Revision:  https://reviews.freebsd.org/D52823
1b806e607f52285f973fb1106491668fd28da6a4 Lexi Winter 2025-10-02 01:16:11
release: Install pkg(8) from the release repo on bootonly
Although bootonly doesn't contain an offline package repository, we
still want pkg installed so the user can use it to repair an existing
system.  Installing it from the release repository ensures it's always
available without depending on pkg.freebsd.org.

While here, fix a typo in PKGBASE_REPO_ARGS.

MFC after:      3 seconds
Reviewed by:    cperciva
Sponsored by:   https://www.patreon.com/bsdivy
Differential Revision:  https://reviews.freebsd.org/D52848
3b9d89e1c90fd3b2667c07d5a0bfd300bf635bb3 Lexi Winter 2025-10-02 11:45:09
Commit group #18: thunderbolt.4: Initial manual for HW Relnotes
thunderbolt.4: Initial manual for HW Relnotes

This manual contains nothing and is only suitable for the HW Relnotes,
but lets get it in so we have something and then can iterate on it.

MFC after:              3 minutes
Fixes:                  https://cgit.freebsd.org/src/commit/?id=2ed9833791f2 (thunderbolt: Import USB4 code)
Discussed with:         obiwac
Differential Revision:  https://reviews.freebsd.org/D52847
2f7a796b590e67c5d123f2b00b3aaf7ba7a32a13 Alexander Ziaee 2025-10-02 12:05:25

thunderbolt.4: Mention Thunderbolt 3

MFC after:      1 hr
Reported by:    emaste
Fixes:          https://cgit.freebsd.org/src/commit/?id=2f7a796b590e (thunderbolt.4: Initial manual)
e4e412e45a17d2f63f6693d41b274379d108c82f Alexander Ziaee 2025-10-02 15:27:43
Cirrus-CI: Use nproc instead of sysctl -n hw.ncpu
It is available on all supproted FreeBSD versions.

Sponsored by:   The FreeBSD Foundation
5bba547a678beb280bf4080375f45b04ceb44fc5 Ed Maste 2025-10-02 14:37:19
Cirrus-CI: Build packages in parallel
Reviewed by:  ivy
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D52857
e2796f0359afad522113c25d720fa30677a044ab Ed Maste 2025-10-02 14:39:11
release: Fix NO_ROOT cross-building VM images
Pass PKG_ABI to virtual machine image builds.

Reviewed by:    cperciva
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D52874
5c5c0571c2984669024dca5356f973ffc18a3e02 Ed Maste 2025-10-02 22:07:04
vmimage.subr: Fix NO_ROOT build in ..._rmcache
When doing a NO_ROOT build we can't run pkg inside a chroot, for
multiple reasons including not having /dev mounted.

MFC after:      6 hours
Sponsored by:   https://www.patreon.com/cperciva
86221f965c06efa1cd5b2da640ae23edded7c8b9 Colin Percival 2025-10-03 01:06:44
create-sets.sh: Add missing copyright header
I wrote this file and am the only person who has modified it since
it was added.

MFC after:      3 days
a22f8bd45701ce1535147ddd71291fd1de769ecf Lexi Winter 2025-10-03 03:58:06
Makefile: Fix ordering for (update-)packages
The (update-)packages targets require buildworld and buildkernel to
run first.  Add some .ORDER statements to ensure this happens.

This fixes 'make -j8 buildworld buildkernel packages'.

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=289969
Reported by:    yasu
MFC after:      3 days
Reviewed by:    yasu, emaste
Sponsored by:   https://www.patreon.com/bsdivy
Differential Revision:  https://reviews.freebsd.org/D52877
dfc9da6248491072e31f924f5ae6b6238603089a Lexi Winter 2025-10-03 05:43:15
Commit group #19: vmimage.subr: Support NO_ROOT pkgbase
vmimage.subr: Support NO_ROOT pkgbase

We need to tell pkg to record files in METALOG; otherwise when we
create the VM image it's almost empty.

MFC after:      6 hours
Sponsored by:   https://www.patreon.com/cperciva
08b497dc6c4da23be83f7cd51edff07f09d63fd6 Colin Percival 2025-10-03 07:23:43

vmimage.subr: fix typo in checking NO_ROOT var

Reviewed by: imp
Fixes: https://cgit.freebsd.org/src/commit/?id=08b497dc6c4d ("vmimage.subr: Support NO_ROOT pkgbase")
Signed-off-by: Siva Mahadevan <me@svmhdvn.name>
Pull-request: https://github.com/freebsd/freebsd-src/pull/1867
Sponsored by: The FreeBSD Foundation
65e2ce55b662447fb4e87246262c07bf5a25efe9 Siva Mahadevan 2025-07-15 16:45:24
release: Consolidate pkgbase-repo dependency
Use the same approach for pkgbase-repo-dir as for the packagesystem
dependency.

Reviewed by:    Isaac Freund <ifreund@freebsdfoundation.org>
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D52884
ac1408bd1d2d3f2bb2d8c77e91420fe9e66926ca Ed Maste 2025-06-23 14:53:02
Cirrus-CI: Switch back to tzst packages, but use level 1
We previously used `PKG_FORMAT: tar` to avoid spending a lot of time in
zstd compression.  Instead just set PKG_LEVEL to compression level 1,
which still produces packages that are much smaller than uncompressed
tarballs with only a small penalty in build time.

Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D52858
ae5914c0e4478fd35ef9db3f32665b60e04d5a6f Ed Maste 2025-10-02 14:39:43
man: Conditionally install ar.5 in toolchain package
Previously if WITHOUT_TOOLCHAIN was set we'd create a FreeBSD-clang
package that contained only ar.5.  As ar.5 describes the ar format
and doesn't come from Clang/LLVM move it to the FreeBSD-toolchain
package and make it conditional on MK_TOOLCHAIN.

Reviewed by:    ivy
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D52886
a8d774d9708c100a52f231065d9d5f1b4c3aceb7 Ed Maste 2025-10-03 16:02:20
*/*: remove recallocarray() compat shims following import into libc
libopenbsd retains recallocarray() during bootstrapping for now
as it is needed for mandoc.

Reviewed by:    kib
Differential Revision: https://reviews.freebsd.org/D52864
acd546f01e58354af049455472980c6c4a52e18b Robert Clausecker 2025-10-02 14:36:13
Commit group #20: release
release: Check for empty NODISTSETS

Treat an empty NODISTSETS the same as if it is not defined; this avoids
problems if a script calls 'make release NODISTSETS=${NODISTSETS}'.

MFC after:      3 days
Sponsored by:   https://www.patreon.com/cperciva
4b8b4c7dbf0fd4f946195dd7e8e4ddf10505beea Colin Percival 2025-10-03 23:55:44

release: Respect NODISTSETS

In addition to not putting distribution sets onto ISO images, if
NODISTSETS is set then we should not build the distribution sets
or put them onto the "FTP" site (aka download.freebsd.org).

MFC after:      3 days
Sponsored by:   https://www.patreon.com/cperciva
e64eb9ea0f4c88a9fa32ae3ae517cbe15a193a08 Colin Percival 2025-10-03 23:56:53

release: Publish pkgbase-repo.tar

This is a tarball containing the pkgbase repository for the release.

Note: This is an uncompressed tarball, because all of its constituent
.pkg files are already compressed; there's no point adding another
layer of compression.

Reviewed by:    ivy
MFC after:      1 minute
Sponsored by:   https://www.patreon.com/cperciva
Differential Revision:  https://reviews.freebsd.org/D52899
d0ff67db2908a56b2f146963bb79f1a8e6283131 Colin Percival 2025-10-03 23:57:33
release: Complete NO_ROOTification of Vagrant builds
- Don't clean pkg files, they won't be recorded in the manifest anyway.
- Use pw's new metalog mode to create the vagrant user.  Note that we do
  not need to manually create the home directory, pw will do it, so just
  remove that.
- Write metalog entries for the vagrant user's ssh key dir and
  authorized keys file

Note, this depends on an updated pw being installed on the host.

Reviewed by:    emaste
MFC after:      1 day
Sponsored by:   Klara, Inc.
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D52631
02dfca2458081587d8224c5ebf8bde99fa360f94 Mark Johnston 2025-09-19 21:01:52
Cirrus-CI: Bump to FreeBSD 14.3 image
Sponsored by: The FreeBSD Foundation
cca9295dd6adc4245fbeeefbe05c13c52d089bd7 Ed Maste 2025-10-04 13:10:09
release: Don't publish pkgbase.repo for embedded
The embedded "SD card" images build very differently from regular
releases, and don't use pkgbase yet.

MFC after:      3 days
Sponsored by:   https://www.patreon.com/cperciva
026707768f673518c2fe9bcd9020d53a0d02fc7e Colin Percival 2025-10-04 16:52:42
Makefile.inc1: Fix package-pkg with CROSS_TOOLCHAIN
CROSS_TOOLCHAIN is used to build src with a different toolchain than
the bundled one.  Ports also has a CROSS_TOOLCHAIN option, but it has
a different meaning.  When building ports-mgmt/pkg from ports for the
package-pkg target, unset CROSS_TOOLCHAIN to prevent ports from being
confused.

This fixes 'make CROSS_TOOLCHAIN=llvm19 package-pkg' for the native
target, but cross-building (e.g., targetting powerpc from amd64) is
still broken due to an issue in pkg itself.

MFC after:      3 seconds
Reviewed by:    emaste
Sponsored by:   https://www.patreon.com/bsdivy
Differential Revision:  https://reviews.freebsd.org/D52902
b09dd586518aaa0ac24b70ca522f4054165c8031 Lexi Winter 2025-10-04 16:50:56
Makefile.inc1: Remove svn support
We don't need this, and we don't use this. It's left over from the svn
days. We stopped supporting svn as a project entirely when 12.x went
EOL. And VCS_REVSION isn't in any current ucl file or anywhere else in
the tree.

Sponsored by:           Netflix
Reviewed by     :       kevans, brd
Differential Revision:  https://reviews.freebsd.org/D52912
28b858f5059c8b25fa08be494699997000fce58c Warner Losh 2025-10-05 14:25:06
Makefile.inc1: Add back missing if
The .if defined(_MKSHOWCONFIG) covered an unusually large area, so it
should have not been removed in the last commit. I must have tested in
the wrong tree before pushing...

FixeS: 28b858f5059c
Sponsored by:           Netflix
106951f09fe39dc693fd7130ab4bc751e1438631 Warner Losh 2025-10-05 15:11:29
zfs: install missing openzfs-2.4 files in /usr/share/zfs/compatibility.d
MFC after: 3 days
4dc4a512e0659c9155db7412d2821bef409b48af Martin Matuska 2025-10-05 21:21:51

Internal organizational stuff

committers-ports.dot: add tiga and mentors
Onboard new ports committer Tiago Gasiba (tiga)
in accordance with step 5 of sec. 7.1 committer's guide

PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=289889
Approved by:    eduardo, flo (mentors)
d4cbdd9ad04ab1d68046b62541b2a487e6df077e Tiago Gasiba 2025-09-29 17:03:04
tests/netinet: rename and extend sendto-IP_MULTICAST_IF.c
Rename this test helper app to multicast-send.c.  Extend it to send
from/to arbitrary addresses and arbitrary payload so that it can be used
in more test scenarios.
36f2eda251713d4d38f41cf269876b069e3897ff Gleb Smirnoff 2025-09-30 02:34:13
mfc-candidates: Improve branch detection and repository handling
- Use git to detect the latest stable branch rather than hardcoding it.
- Handle the case where the script is run outside a src or ports repository.
- Fix a pattern to match .git instead of *git.

Reviewed by:    andrew, releng (emaste)
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D52681
e57d72a7f35c3fc80dc9ac744056b2354b1be741 Joseph Mingrone 2025-09-22 18:18:20
calendar.freebsd: Update calendar for tiga@
da25573ee07f7f36bd0bd90820f1c5e359cd9d5a Tiago Gasiba 2025-09-30 20:42:08

Testing

tzcode: Test escape from TZDIR
Test a value of TZ that temporarily escapes from TZDIR (which is not
permitted when setugid) then reenters it.

MFC after:      3 days
cf76bfbb235116702ea1689bf984f200a72d2790 Dag-Erling Smørgrav 2025-09-29 12:36:24
atf_python: allow test scripts to pass jail options
Test scripts based on atf_python can now pass jail command options via the
'opts' key in the 'vnetX' key of TOPOLOGY.

Reviewed by:    melifaro
MFC after:      1 week
Sponsored by:   Rubicon Communications, LLC ("Netgate")
Differential Revision:  https://reviews.freebsd.org/D52761
2213e158886f72f45f288c94069a9a40c4f334ed Kristof Provost 2025-09-27 14:38:19
pf tests: fix intermittent mld test failures
We can't reliably check for the absence of replies to our MLD queries (because
a host may announce its multicast subscriptions), so enable pf logging and check
for the relevant error message instead.

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=289821
MFC after:      1 week
Sponsored by:   Rubicon Communications, LLC ("Netgate")
Differential Revision:  https://reviews.freebsd.org/D52762
a57f6ce4792f12bebdbe3e46d6d9d39da10055db Kristof Provost 2025-09-27 14:41:30
Commit group #21: tests/netinet: extend IPv4 multicast testing framework
tests/netinet: extend IPv4 multicast testing framework

Provide a helper program multicast-receive.c that joins arbitrary group on
arbitrary specified interface and receives a single datagram and prints it
out.

In multicast.sh provide a template with two jails connected by two
interface pairs, so that we can check sends/receives in presence of
multiple interfaces.

Compose a few basic tests to check legacy and new IP_ADD_MEMBERSHIP and
MCAST_JOIN_GROUP.
d0c8a0b3e6fc5372428eb4fddcd4f8c65b5b0ee0 Gleb Smirnoff 2025-09-29 23:23:28

tests/netinet: add a few missing atf_checks in multicast.sh

Fixes:  https://cgit.freebsd.org/src/commit/?id=d0c8a0b3e6fc5372428eb4fddcd4f8c65b5b0ee0
a733ea831a00d4c0ee4b67824c9ac4e5ba82be08 Gleb Smirnoff 2025-10-02 13:22:43
netinet6 tests: accept an RA on an interface without /64 address
Excercise the code introduced in 9e792f7ef729
("sys/netinet6: Fix SLAAC for interfaces with no /64 LL address").

Sponsored by:   Rubicon Communications, LLC ("Netgate")
c23b64fba9fb9715397a9e6ecbae670ee791dce9 Kristof Provost 2025-10-02 11:47:33
bitstring_test: fix bit_nclear/bit_nset tests for last iteration
Also convert nearby ATF_REQUIRE_MSG to ATF_REQUIRE_INTEQ_MSG.

Reported by:    GCC -Wint-in-bool-context
Reviewed by:    asomers, des
Differential Revision:  https://reviews.freebsd.org/D45893
54b24b9da8be70192b7baaeae8fc26fda6581222 Ryan Libby 2025-10-02 16:40:16
tests/ipfw: Update regression tests to match new 32-bit size rule numbers
Commit 4a77657cbc01 increased the size of several opcodes to ipfw_insn_u32.

Approved by:    ae
Sponsored by:   Netflix
Differential Revision:  https://reviews.freebsd.org/D52876
01d5a6f30ce8f5006bd9d5528a487ef4d79c48c3 Olivier Cochard 2025-10-03 10:56:27
fcntlflags_test: Port to atf-c(3)
Reviewed by:  kib
Differential Revision:  https://reviews.freebsd.org/D52720
5c331f449e9ca549d03ae1a3f50ac0e5306b488e John Baldwin 2025-10-03 16:43:18
stress2: Add syzkaller reproducers
257a750c60f14f83dff7bf5d2189089b1e74870b Peter Holm 2025-10-04 08:20:37
stress2: Do not try to open a fifo
c16f53782c8b8fc8f1452f797b96743386079f1f Peter Holm 2025-10-04 08:21:02

Style, typos, and comments

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

libucl: Fix bugs in C-style comment parser
When an asterisk is encountered inside a C-style comment, we first check
if there is at least one more character left in the buffer, and if that
character is a slash, which would terminate the comment.  If that is not
the case, the next two characters are consumed without being inspected.
If one of those is a double quote, or the initial asterisk of an
asterisk-slash pair, we end up misparsing the comment.

MFC after:      3 days
Reviewed by:    kevans, bofh
Differential Revision:  https://reviews.freebsd.org/D52808
b5e2bd5ef38181ce4a445ec19f1fa5cb6c8ea692 Dag-Erling Smørgrav 2025-10-01 09:28:30
nss_tacplus: Fix typo in Makefile
Reported by:  ivy@
MFC after:      3 days
e98d3416916cdb6285d4d1807582baf6faa3ddcc Dag-Erling Smørgrav 2025-10-02 07:24:52
bsd.cpu.mk: Fix whitespace appending to MACHINE_ABI
No functional change.

Effort:         CHERI upstreaming
Reviewed by:    imp
Fixes:          https://cgit.freebsd.org/src/commit/?id=426fc376afaf ("bsd.cpu.mk: Introduce MACHINE_ABI")
Sponsored by:   Innovate UK
Differential Revision:  https://reviews.freebsd.org/D52833
90d2aedbb964bb39ecc23e736dc26ff45603562f Brooks Davis 2025-10-02 09:23:38
release: packages: Fix typos
Reviewed by:  cperciva
Approved by:    emaste (mentor)
MFC after:      1 day
Differential Revision:  https://reviews.freebsd.org/D52917
9e6cea12abdadb9f81dc13c2d3eb4ff8f0a19e99 Jose Luis Duran 2025-10-05 20:16:15

Contrib code

MFV: expat 2.7.3.
MFC after:    3 days
8d485a8490fe1cd60e7b6a00d3c8a8cc116a56fb Xin LI 2025-09-29 04:28:11
tzcode: Tweak open flags.
Upstream uses a set of flags that reduces to O_RDONLY | O_CLOEXEC when
you ignore flags that either don't exist in FreeBSD or have no effect.
We were using O_RDONLY | O_BINARY, which reduces to O_RDONLY.  Add
O_CLOEXEC.  Also replace O_RDONLY with the more accurate O_SEARCH when
opening TZDIR.

MFC after:      3 days
Fixes:          https://cgit.freebsd.org/src/commit/?id=967a49a21a27 ("Update tzcode to 2025b")
d28e4ce6cb61916b4f6bedcf4205a4da1ae121e1 Dag-Erling Smørgrav 2025-09-29 11:48:02
libcxgb4: Get userspace RDMA tools to recognize T7 based RNICs
MFC after:    3 days
Sponsored by:   Chelsio Communications
e5ce2d39368f702cc910e3baf103df0a6e1f9266 Navdeep Parhar 2025-09-29 13:50:34
mandoc: Vendor import of upstream at 2025-09-26
Interesting changes:
+ mandoc db: Improve case sorting, found by our very own markj
+ history: Add macros for version 8 and 10 AT&T Unix
+ linter: Warn on blank lines in man(7) like mdoc(7)
+ manuals: Improve precision, man(7) syntax table, and roff(7) specifics
+ manuals: Fix PDF/PS footer regression detailed in our PR: 289786

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=289786
MFC after:      3 days
59fc2b0166f71c791113379d16b8cef7039f289d Alexander Ziaee 2025-09-29 17:31:38
Fix multiple security issues in OpenSSL.
Out-of-bounds read & write in RFC 3211 KEK Unwrap (CVE-2025-9230)
Timing side-channel in SM2 algorithm on 64 bit ARM (CVE-2025-9231)
Out-of-bounds read in HTTP client no_proxy handling (CVE-2025-9232)

Obtained from:  OpenSSL
Approved by:    so
Security:       FreeBSD-SA-25:08.openssl
Security:       CVE-2025-9230
Security:       CVE-2025-9231
Security:       CVE-2025-9232
aa1afb69dcedfc68859815987c46997500f834c3 Gordon Tetlow 2025-09-30 15:23:01
zfs: retire zfs_zstd_compress_wrap
The function is unused, already disappeared upstream and results in
compilation warnings.

Sponsored by:   Rubicon Communications, LLC ("Netgate")
4e0997d1d492eb955bb20a970a7fce189269498c Mateusz Guzik 2025-10-01 07:09:10
zfs: annotate arc_buf_is_shared with __maybe_unused
To avoid a compilation warning. The routine turned out to be rather
stubborn when it comes to trying to ifdef it out.

Sponsored by:   Rubicon Communications, LLC ("Netgate")
1bbc898dbf72638ac0dfbc666f62d39dbd68258a Mateusz Guzik 2025-10-01 10:17:14
crypto/openssl: update to 3.5.4
This change includes all necessary changes required to update to OpenSSL
3.5.4.

More information about the 3.5.4 release can be found in the relevant
release notes (see 8e12a5c4eb3507846b5 for more details).

Merge commit '8e12a5c4eb3507846b507d0afe87d115af41df40'
046c625e9382e17da953767b881aaa782fa73af8 Enji Cooper 2025-10-04 03:26:18
zfs: merge openzfs/zfs@5605a6d79
Notable upstream pull request merges:
 #16025 26b0f561b dnode_next_offset: backtrack if lower level does not match
 #17758 c722bf881 Add interface to interface spa_get_worst_case_min_alloc()
                  function
 #17765 8d4c3ee9e zvol: Fix blk-mq sync
 #17787 8869caae5 zinject: Introduce ready delay fault injection
 #17780 b2196fbed Fix 'zpool add' safety check corner cases
 #17783 5c38029f4 zdb: add ZFS_KEYFORMAT_RAW support for -K option
 #17786 f0a95e897 zpool iostat: refresh pool list every interval
 #17807 -multiple zpool iostat: fix regressions in "all pools" mode
                  after #17786
 #17793 -multiple ddt prune: Add SCL_ZIO deadlock workaround
 #17799 ac2d8c80b Make mount/share errors non-fatal for zfs create/clone

Obtained from:  OpenZFS
OpenZFS commit: 5605a6d79b3582296208ac391f93a5faf729fa92
36c970ed985ff3dd5443db4bf2aa58799028512c Martin Matuska 2025-10-05 06:51:00

Reverted commits

Commit & revert pair: IfAPI: Added missing accessor for if_home_vnet
IfAPI: Added missing accessor for if_home_vnet

Reviewed by:    kp
Signed-off-by:  Kevin Irabor <kevin.irabor04@gmail.com>
4e7a375804e5ad4b244ce9a035fa971cbf2f0944 ItzBlinkzy 2025-09-28 17:21:41

Revert "IfAPI: Added missing accessor for if_home_vnet"

This reverts commit 4e7a375804e5ad4b244ce9a035fa971cbf2f0944.

We do not want out-of-tree consumers to access the home_vnet variable.

As discussed with the author and Gleb Smirnoff.
ebb60d47a5350e5d752b97cba8b3b0c3be8aa1eb Kristof Provost 2025-10-01 16:13:54
Reapply "LinuxKPI: pci: allocate entire pci_dev hiereachy up to root port on attach"
In linux_pci_attach_device() allocate a LinuxKPI pci_dev for each device in
the hierarchy up to the root port[1] as we cannot do that later on demand
as we may be in a context where we may not sleep.

Take special care of DRM as there is a non-PCI device in the chain which
needs to be skipped.

iwlwifi(4) can hit this case called from a callout.

While here leave a comment sa the cleanup order of
linux_pci_attach_device() needs correction seperately.

This reverts commit 3860afe99ec39b9942967941181f28f27f3fc548.

Sponsored by:   The FreeBSD Foundation (initially)
PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=283027
PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=289647
Suggested by:   jhb [1]
MFC after:      3 days
Reviewed by:    dumbbell
Differential Revision:  https://reviews.freebsd.org/D52069
123c2dc6e15a62ceba3469caf0f1a6801214a7d3 Bjoern A. Zeeb 2025-09-29 21:29:17
Revert "acpi_powerres: Fix turning off power resources on first D-state switch"
This reverts commit a13f28d57ecfd136ce73493659c28a47fa1a4b9f.

Reported by:    phk
Tested by:      phk
Sponsored by:   The FreeBSD Foundation
7bc6ec1a255da6678a72330d65a1f320de538727 Aymeric Wibo 2025-10-01 09:13:56
Commit & revert pair: flua: support our flua modules in the bootstrap flua
flua: support our flua modules in the bootstrap flua

This version builds every module into the flua binary itself, since all
of the bootstrap tools are built -DNO_SHARED.  As a result, we also
cannot dlsym(), so we can't really discover the names of our newly
builtin modules.  Instead, just build out a linker set with all of our
luaopen_*() functions to register everything up-front.

Building in all of the modules isn't strictly necessary, but it means
that we have an example of how to add a bootstrap module everywhere you
go and one doesn't need to consider whether bootstrap flua can use a
module when writing scripts.  On my build machine, the consequence on
our binary size is an increase from around 1.6M -> 1.9M, which isn't
really that bad.

.lua modules can install into their usual path below $WORLDTMP/legacy
and we'll pick them up automagically by way of the ctor that sets up
LUA_PATH early on.

Reviewed by:    bapt, emaste
Differential Revision:  https://reviews.freebsd.org/D51890
1953a12ee2cde1afacb3e3f7612d89695c96e04f Kyle Evans 2025-10-03 18:09:03

Revert "flua: support our flua modules in the bootstrap flua"

This reverts commit 1953a12ee2cde1afacb3e3f7612d89695c96e04f, because it
cannot work at all on macOS without more work, at a minimum.  We use
linker sets for module discovery, but we don't have a version of this
that works for mach-o at the moment.
bbef1c72b4873b657fdb0466b48b15d1d4f0a731 Kyle Evans 2025-10-04 00:52:36
Commit & revert pair: flua: kick out the remaining builtin modules
flua: kick out the remaining builtin modules

Bootstrap flua has some magic now to handle modules by building them in
and discovering them via linker sets.  This is slightly cleaner than
always building them in and baking them into loadedlibs for both
bootstrap and system flua.

Adjust the stand build now that these three libs have their own new
homes.

Reviewed by:    bapt, emaste
Differential Revision:  https://reviews.freebsd.org/D51891
80ada959004c4386880e47b11618f8abfc2d80e1 Kyle Evans 2025-10-03 18:09:04

Revert "flua: kick out the remaining builtin modules"

This reverts commit 80ada959004c4386880e47b11618f8abfc2d80e1, because
bootstrap flua is about to get backed out.
d4c973fa148544a0b949ceb1efb6c68096f02baf Kyle Evans 2025-10-04 00:52:28
Commit & revert pair: flua: don't build libjail into the bootstrap flua
flua: don't build libjail into the bootstrap flua

Other systems don't have jail support, and we won't be using it anyways.
31320402472394af57eb3a36bee7f944117ca0ed Kyle Evans 2025-10-03 20:16:30

Revert "flua: don't build libjail into the bootstrap flua"

This reverts commit 31320402472394af57eb3a36bee7f944117ca0ed, because
bootstrap flua is about to get backed out.
981cf36d64c48ebfa22d44ac83b6d448c2974f23 Kyle Evans 2025-10-04 00:52: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.18 at 2025-11-03 03:26:53+00:00.

This work is supported by Tarsnap Backup Inc.

Alternate version: 2025-09-29 (debug) (contains info about the classification)