FreeBSD git weekly: 2025-11-10 to 2025-11-16

Introduction

This is a display of mostly-automatically-classified git commits from 2025-11-10 to 2025-11-16.

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:

(3) Highlighted commits (these are copies, not in stats)
4 2.2% Userland programs
18 9.9% Documentation
79 43.6% Hardware support
6 3.3% Networking
15 8.3% System administration
1 0.6% Libraries
3 1.7% Filesystems
17 9.4% Kernel
21 11.6% Build system
2 1.1% Internal organizational stuff
5 2.8% Testing
2 1.1% Style, typos, and comments
6 3.3% Contrib code
2 1.1% Reverted commits
0 0.0% Unclassified commits
181 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.

libpam: Move to a new "pam" package
OpenPAM is a discrete, largely self-contained system component.
Users may not need PAM for many use-cases (e.g. jails, containers),
so move it to its own package.

Use LIB_PACKAGE to create a separate pam-lib package for libpam,
so that applications that support PAM don't need to bring in all
the PAM modules if PAM isn't actually in use.

Add pam to the minimal sets, since this is a core system component that
people expect to be installed.  This means all supported installation
methods will install the PAM modules by default, so don't add explicit
dependencies on the PAM modules from things that use PAM (e.g. runtime),
allowing custom/embedded systems to omit these easily.

This change adds a new package to the system so, until we have a proper
policy on how to handle this in release/stable branches, it should not
be MFC'd.

MFC after:      never
Reviewed by:    des, bapt
Sponsored by:   https://www.patreon.com/bsdivy
Differential Revision:  https://reviews.freebsd.org/D53602
560af6b43e2a86e591e94bea99777630cd5f84fd Lexi Winter 2025-11-10 10:20:33
lib/libc: implement C23 memalignment()
This new function computes the alignment of a pointer.
It is part of ISO/IEC 9899:2024, the new C standard.
If the pointer is a null pointer, null is returned.
I have tried to write an implementation that can cope
with traditional address-based architectures, even if
size_t and uintptr_t are of different length.  Adjustments
may be needed for CHERI though.

A man page is provided, too.  No unit test for now.

Reviewed by:    kib, imp, ziaee (manpages), pauamma@gundo.com
Approved by:    markj (mentor)
MFC after:      1 month
Relnotes:       yes
Differential Revision:  https://reviews.freebsd.org/D53673
6c57e368eb1777f6097158eeca2fcc175d068dba Robert Clausecker 2025-11-10 17:54:41
RELNOTES: Document FreeBSD-base pkg .conf shuffle
Reminded by:  yasu
87025ccb8c802b6074f1651bfaaca5c6b4ffcc17 Colin Percival 2025-11-16 16:57:31

Userland programs

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

date: Improve nanosecond support
Add support for a field width, which defaults to 9 if unspecified or
zero.  If the width is not exactly 9, we have to either cut off digits
or append zeroes to make up the difference.  If the width is a dash,
we pick a width based on the clock's reported resolution.  This brings
us in line with GNU coreutils.

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=287080
MFC after:      1 week
Reviewed by:    0mp
Differential Revision:  https://reviews.freebsd.org/D53667
38839c872e7af6a1424009bf07d6b4450e9ca61d Dag-Erling Smørgrav 2025-11-11 14:58:23
ministat: Clean up usage message, manual page, and chameleon
In the manual page:
- Fix synopsis and use better argument names
- Improve description of flags.
- In EXAMPLES, list the contents of iguana and chameleon files.
- Use Rs to reference The Cartoon Guide to Statistics
- Fix misc indentation and style issues
- Tag SPDX

MFC after:      1 week
Reviewed by:    bcr, ziaee
Differential Revision:  https://reviews.freebsd.org/D53710
9d17b61b2fd254b418f3dd6b7a64afbc861a57f8 Mateusz Piotrowski 2025-11-12 15:06:06
lam: fix using stdin more than once
Historically, lam(1) closes stdin once we've hit EOF the first time,
which would stop it from doing anything else on subsequent gatherline()
calls with another openfile.  However, this doesn't seem to be strictly
necessary- the EOF flag on FILEs is quite sticky, so we can assume that
a subsequent fgetc(stdin) will flag EOF properly.

This 'fixes' the below-referenced commit in the sense that it surfaced
this problem as a fatal error, but the issue was pre-existing.  If we
do `lam - -`, then one gatherline() will fclose(stdin) and set `ip->eof`
for *that* openfile, while the next one will then observe that
STDIN_FILENO has been closed and turn it into an EBADF.

Add a few tests that were easy to snipe while I'm here, but I haven't
aimed for anything close to exhaustive because I think re@ would prefer
this fix go in sooner rather than later to land in 15.0.

Minor style adjustment for the previous commit while we're here.

Reported by:    cperciva
Discussed with: jrtc27
Reviewed by:    des, jlduran
Fixes:  https://cgit.freebsd.org/src/commit/?id=4472fd66d006 ("lam: fail on I/O errors")
MFC after:      3 days (tentative)
Sponsored by:   Klara, Inc.
Differential Revision:  https://reviews.freebsd.org/D53750
6a9452c8378a1aa767708ad2d235f847c880a21c Kyle Evans 2025-11-14 14:36:20
freebsd-tips: Add a shell function for laptops
MFC after:            3 days
Reviewed by:            pauamma_gundo.com
Differential Revision:  https://reviews.freebsd.org/D53748
42d9ae4945f281d12f3ef96cdbd7356e067f8b18 Alexander Ziaee 2025-11-14 14:40:44

Documentation

Man pages, release notes, etc.

ix.4: Add E610 to HARDWARE section
MFC after:            3 days
Reviewed by:            ziaee
Fixes:                  https://cgit.freebsd.org/src/commit/?id=dea5f973d0c8 (new Intel Ethernet E610 family)
Differential Revision:  https://reviews.freebsd.org/D52990
abd53b16c03f77c12bb8b77d9e2e4cf392745361 Yogesh Bhosale 2025-11-10 19:23:46
nuageinit.7: fix cloud-config header line
This updates the nuageinit man page by aligning mentions of the
cloud-config header line with the cloud-init documentation[0], removing
an unwanted "!" character.

[0] https://docs.cloud-init.io/en/latest/explanation/about-cloud-config.html#how-do-i-create-a-cloud-config-file

Signed-off-by: Jonathan Matthews <freebsd@hello.jonathanmatthews.com>
Differential Revision:  https://reviews.freebsd.org/D53706
4ab2d625e1462e9a78cb8086906c1a3da3aa6713 Jonathan Matthews 2025-11-12 09:24:24
ix.4: Document E610 debug dump
Explain how to collect E610 device debug dump data with sysctl for
troubleshooting with Intel Customer Support.

Fixes:                  https://cgit.freebsd.org/src/commit/?id=2170400142b9 (Add support for debug dump)
Reviewed by:            bcr, erj (previous version), ziaee
Signed-off-by:          Yogesh Bhosale <yogesh.bhosale@intel.com>
Differential Revision:  https://reviews.freebsd.org/D52990
8225ed665eea69b3df3ea57009cf8fe61863c1fc Yogesh Bhosale 2025-11-10 18:03:54
sbp.4: Add a hardware section, fix markup nits
+ tag SPDX
+ add sysctl to apropos database
+ fix markup of examples and reflow a overly long line
+ add a hardware section for hw relnotes

MFC after:      3 days
dee8e38f52266d9b2fa837607ff3a78f240a806d Alexander Ziaee 2025-11-11 18:38:04
mx25l.4: Describe better and tag spdx
MFC after:    3 days
6f73950475ce6b56974b7cd08cdf0ea771165c50 Alexander Ziaee 2025-11-11 18:56:40
mx25l.4: Add n25q64 to hardware list
MFC after:    3 days
Fixes:          https://cgit.freebsd.org/src/commit/?id=76735c74398923a (flash: Add "n25q64" to mx25l driver)
595fcd71a89e8c2d9039528d58b073f5ca712b68 Alexander Ziaee 2025-11-11 18:58:19
hgame.4: Polish
Explain driver loading and application access in the body of the manual.
Crossreference other game controller driver manuals, and devfs.rules to
hint about how to configure application access. Add a common dongle to
supported hardware. Add evdev a few places to make it really clear how
it works.

MFC after:              immediately for inclusion in 15.0R
Reviewed by:            wulf
Differential Revision:  https://reviews.freebsd.org/D53290
c0c8d812b560a3e89656c026022a44631f88e233 Alexander Ziaee 2025-11-13 21:13:45
jail.8: Add creating a jail from package base
MFC after:            immediately for inclusion in 15.0R
Reported by:            ivy
Differential Revision:  https://reviews.freebsd.org/D53745
477799750abd5702a02f7f8065e6235d7db75188 Alexander Ziaee 2025-11-13 21:25:06
quot: Improve manual page
* Rewrite the first paragraph to clarify that quot(8) only supports FFS.

* Document which options can or cannot be combined with each other.

MFC after:      1 week
Reviewed by:    ziaee
Differential Revision:  https://reviews.freebsd.org/D53727
2f3adab9d512faec3e1891e505d1888db5d0240e Dag-Erling Smørgrav 2025-11-14 14:28:52
loader manuals: Clarify console and boot_serial
console=comconsole is for the loader and boot_serial is for the kernel.

I think we should centralize documentation on the loader settings in one
manual, such a loader.8. The current proliferation is not obvious where
to find the documentation. To the user, these are all set in loader.conf
or at the loader prompt.

MFC after:              3 days
Differential Revision:  https://reviews.freebsd.org/D53695
09ffaa4e07d749c83cc1db13829505f21b025f29 Alexander Ziaee 2025-11-14 14:41:57
loader.8: Document module commands
Begin documenting module loader commands in loader(8), where the reader
would look for them. Segregate them by their availability in individual
loader implementations, like build(7) targets.
These details were graciously donated by kevans.

MFC after:              3 days
Reviewed by:            kevans
Co-authored-by:         Kyle Evans <kevans@freebsd.org>
Differential Revision:  https://reviews.freebsd.org/D50727
6fb0d67819f730e8def56e139f780eff3c0cab0f Alexander Ziaee 2025-11-14 14:59:09
Commit group #0: iwx.4: Fix SYNOPSIS
iwx.4: Fix SYNOPSIS

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=290812
MFC after:      3 days
Fixes:          https://cgit.freebsd.org/src/commit/?id=27c41b28b1d7 (iwx.4: Initial manual page)
Reported by:    Dimitry Lukhtionov <dimitryluhtionov@gmail.com>
b0c1ead2b9be0f6aa5a715d849b9ca7af093b513 Alexander Ziaee 2025-11-14 15:04:45

iwx.4: Follow the established style

Fixes:          https://cgit.freebsd.org/src/commit/?id=b0c1ead2b9be ("iwx.4: Fix SYNOPSIS")
Reviewed by:    ziaee
Differential Revision:  https://reviews.freebsd.org/D53760
ebb0b4822699eb614d5e9418c0a1bf6b30718699 Dag-Erling Smørgrav 2025-11-16 19:10:36
boot.config.5: Clarify that this controls legacy boot blocks
Reviewed by;  ziaee
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D52460
e96359d111aaffa6bf0ea72a6f183eb3b91e6c72 Ed Maste 2025-09-09 16:06:03
UPDATING: Document FreeBSD-base pkg .conf shuffle
Reminded by:  yasu
MFC after:      3 days
6ccdd2fc2328dd81b9c645fba025d01052a3c1a1 Colin Percival 2025-11-16 16:56:12
RELNOTES: Document FreeBSD-base pkg .conf shuffle
Reminded by:  yasu
87025ccb8c802b6074f1651bfaaca5c6b4ffcc17 Colin Percival 2025-11-16 16:57:31
fdc.4: Correct igor-reported warnings
Sponsored by: The FreeBSD Foundation
e1b027b276dfba017d12b8a112af3251e79effc5 Ed Maste 2025-11-16 22:43:40
Deprecate fdc(4) and floppy utilities
Floppies have been obsolete for over a decade.  Add a deprecation note
now and plan to remove fdc(4) support in 16.

Reviewed by:    ziaee
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D41549
4c736cfc69a7ef81c48c8431b31c7e31746fe816 Ed Maste 2023-08-22 14:45:14

Hardware support

Hardware drivers and architecture-specific code.

vtnet: don't provide VIRTIO_NET_HDR_F_DATA_VALID
According to section 5.1.6.2.1 of version 1.3 of the virtio
specification, the driver MUST NOT set VIRTIO_NET_HDR_F_DATA_VALID in
the flags. So don't do that.

Reviewed by:            Timo Völker
MFC after:              3 days
Differential Revision:  https://reviews.freebsd.org/D53650
836b3cd9d7910aff5225e9e58189067ca03fae30 Michael Tuexen 2025-11-10 15:28:04
vtnet: fix enabling/disabling tso
Transmit segment offloading depends on transmit checksum offloading.
Enforce that constraint. This also fixes a bug, since if_hwassist bits
are from the CSUM_ space, not from the IFCAP_ space.

PR:                     https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=290773
Reviewed by:            Timo Völker
Tested by:              lg@efficientip.com
MFC after:              3 days
Differential Revision:  https://reviews.freebsd.org/D53629
4c50ac68166caf7e08c5a9984d63fa91490fa50d Michael Tuexen 2025-11-10 15:34:53
Commit group #1: nvmf
nvmf: Add a transport hook to limit the size of host data transfers

Smart NIC offload transports may have a cap on the size of the largest
data PDU that can be received.  Allow these transports to enforce a
cap on the size of an I/O request submitted by the nvmf(4) host.

NB: The controller is able to advertise a maximum-supported PDU size
during TCP negotiation, but there is no way in the protocol to
advertise a maximum size that the host can receive.

Sponsored by:   Chelsio Communications
01dd6a83b5ffce7a99ab8a7c2c9dcb82088357cd John Baldwin 2025-11-10 15:50:47

nvmf: Honor any data transfer limit imposed by the transport

If the transport has a data transfer limit, restrict I/O transfers to
the largest multiple of MPS that fits within the limit.

Sponsored by:   Chelsio Communications
62caae230859423ae045b5d754f30d193ca628c0 John Baldwin 2025-11-10 15:50:47

nvmf: Add a transport hook to limit the maximum command capsule size

NVMe controllers advertise the largest supported size of a command
capsule in the controller data (IOCCSZ).  Smart NIC offload transports
may have a cap on the size of the largest data PDU that can be
received.  These transports can implement this hook to limit the
advertised IOCCSZ to limit the in-capsule-data payload sent by remote
hosts.

Sponsored by:   Chelsio Communications
c1b3c5f5f3fab895df3d2e75ac3edee4e9aa6432 John Baldwin 2025-11-10 15:50:47
nvmft: Honor any IOCCSZ limit imposed by the transport
Sponsored by: Chelsio Communications
8ced50767933f3e2949456367d4d9a64797daec3 John Baldwin 2025-11-10 15:50:47
cxgbe: Extend support for NVMe capabilities
- Default to enabling all NVMe capabilities.  Currently, NVMe/TCP PDU
  offload is supported by T7 adapters.

- Fetch relevant parameters from the firmware if NVMe support is
  enabled.  A few parameters are shared with RDMA support, so the RDMA
  parameters section is now split into handling for parameters used by
  both vs parameters used only by RDMA.

Sponsored by:   Chelso Communications
adaa1470777b7b392960661e317577bf23fe029a John Baldwin 2025-11-10 15:50:47
cxgbe: Add ULD_NVME for NVMe/TCP offload
NVMe/TCP offload depends on TOE similar to iSCSI and iWARP offloads.

Sponsored by:   Chelsio Communications
a4cd88b604def2b59b0871e612bd6ad04b22520e John Baldwin 2025-11-10 15:50:47
cxgbe tom: Add support for sending NVMe/TCP PDUs
These work requests are largely similar to the same work requests for
iSCSI offload but use a newer tx_data work request structure.

This includes initial support for ISO where a large C2H_DATA or
H2C_DATA PDU is split into multiple PDUs on the wire.

Sponsored by:   Chelsio Communications
fd3581e4ddde4166d6ba6ce264a63833ded35483 John Baldwin 2025-11-10 15:50:48
cxgbe: Add support to the base driver for NVMe/TCP PDU offload
- Adds various per-queue counters similar to iSCSI PDU offload as well
  as a hook in the adapter softc for a reference to the NVMe/TCP softc.

- Instruct the firmware to include a DDP indicator in the status field
  for NVMe/TCP PDU completion messages.  This flag indicates if the
  payload data for a PDU has been received in the free list or if it
  was placed directly into a kernel I/O data buffer via DDP.

Sponsored by:   Chelsio Communications
71d82199a111af67cba73e32a27a900d74c1a1cc John Baldwin 2025-11-10 15:50:48
cxgbe tom: Don't require exact match for TCP seqno for FIN for NVMe offload
Similar to iSCSI on T6+, additional DDP data might have been received
without a completion posted if a connection was closed in the middle
of a transfer.

Sponsored by:   Chelsio Communications
fca740e2d21008faec0d81426259470b452704e6 John Baldwin 2025-11-10 15:50:48
Commit group #2: nvmf_che: NVMe-TCP offload support for Chelsio T7 adapters
nvmf_che: NVMe-TCP offload support for Chelsio T7 adapters

This provides an alternative NVMe over TCP transport which uses PDU
offload for TOE connections on a T7.

Similar to iSCSI offload via cxgbei.ko, nvmf_che uses DDP when
possible to enable the NIC to DMA received data directly into I/O data
buffers (pages from a struct bio on the host side, pages from a CTL
I/O requests on the controller side) to avoid copying data on the host
CPU.  nvmf_che is also able to receive a stream of C2H or H2C PDUs for
a single data transfer when using DDP without processing the header of
each PDU.

Unlike cxgbei, nvmf_che aims to be mostly transparent to end users.
Notably, neither nvmecontrol or ctld have to be explicitly asked to
use an offload.  Instead, TCP queue pairs are claimed by this driver
whenever they are eligible (e.g., using TOE).

The main restriction of nvmf_che compared to the software TCP
transport is that Chelsio adapters have a restriction on the largest
PDU that can be sent and received.  When sending data, nvmf_che is
able to split large C2H or H2C data requests across multiple PDUs
without affecting nvmf(4) or nvmft(4).

To avoid overly large PDUs when using nvmf(4), nvmf_che reports a data
transfer limit that is honored by nvmf(4).  This ensures that the
remote controller's PDUs will never be too large (since the command
transfer size is limited to one PDU) and also ensures that nvmf(4)
will never to try to send a command PDU with ICD that is too large.

For nvmft(4), overly large command PDUs due to ICD are avoided by
clamping the size of the reported IOCCSZ in the controller data.
However, to ensure that H2C PDUs are sufficiently small, nvmf_che will
only claim queue pairs which advertised a suitable MAXH2CDATA
parameter during queue negotiation.  For ctld(8), this can be achieved
by setting the MAXH2CDATA option in a transport-group, e.g. for T7:

transport-group tg0 {
        discovery-auth-group no-authentication
        listen tcp 0.0.0.0
        listen tcp [::]
        listen discovery-tcp 0.0.0.0
        listen discovery-tcp [::]
        option MAXH2CDATA 32488
}

Sponsored by:   Chelsio Communications
ec0cd287f55f7ea93ff4ccfa4de0f70eca5fef75 John Baldwin 2025-11-10 15:50:48

nvmf_che: Fix amd64 LINT-NOVIMAGE build

Fixes:  https://cgit.freebsd.org/src/commit/?id=ec0cd287f55f nvmf_che: NVMe-TCP offload support for Chelsio T7 adapters
Sponsored by:   Chelsio Communications
e353cb88d4581303a4d9af090974ec88463802e6 Navdeep Parhar 2025-11-12 20:04:48

cxgbe(4): fix nvmf_che module build

Fixes: https://cgit.freebsd.org/src/commit/?id=ec0cd28
564cad5638d219d5712a8ac61dafa6f804518cab David E. O'Brien 2025-11-13 01:28:57
sound: Clarify userland/vchan relationship in sndstat feeder chain
When vchans are enabled, the primary channels do not interact with
userland, but with the vchans.

With vchans enabled:

$ sndctl feederchain
dsp0.play.0.feederchain=[vchans -> [...] -> hardware]
dsp0.record.0.feederchain=[hardware -> [...] -> vchans]

With vchans disabled:

$ sndctl feederchain
dsp0.play.0.feederchain=[userland ->  [...] -> hardware]
dsp0.record.0.feederchain=[hardware -> [...] -> userland]

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D53504
59d7865d3c20e86b3c42096f4a8c06a5e2eebd29 Christos Margiolis 2025-11-10 16:15:36
sound: Add kqueue support
Co-authored by:       meka@tilda.center
Sponsored by:   The FreeBSD Foundation
MFC after:      2 weeks
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D53029
4181bf9d18166c4061bfa137b8a46972a5a55f67 Christos Margiolis 2025-11-11 12:04:45
Commit group #3: sound
sound: Retire unused snd_dbuf->dir

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D53518
3ba4e3d352e5fbc550645a76064ca16460616d86 Christos Margiolis 2025-11-11 12:04:58

sound: Retire snd_dbuf->dev

Redundant, and if we at some point really need this, we can fetch it
from snd_dbuf->channel->dev.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D53519
55540ebc33ad9a52bc4de121cb598243153981a8 Christos Margiolis 2025-11-11 12:05:03

sound: Re-arrange sndbuf_create() arguments

Since we always use the channel name as the "drv" argument, we can just
get rid of it and fetch it in sndbuf_create(). Also, put the "channel"
argument first, as it is more intuitive.

No functional change intended.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D53520
482d0d97885506a5eb2b1f2501f65e7e4fca6fdc Christos Margiolis 2025-11-11 12:05:07

sound: Define SNDBUF_F_MANAGED as 0x00000001

It's the only flag anyway.

No functional change intended.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    markj, emaste
Differential Revision:  https://reviews.freebsd.org/D53521
d159b023de52570800d5a5292318de4bce3c9978 Christos Margiolis 2025-11-11 12:05:12

sound: Retire unused sndbuf_dump()

Fixes:          https://cgit.freebsd.org/src/commit/?id=e4e61333ffa4e90360de2dd1e4e0146f7cbf0afb
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    markj, emaste
Differential Revision:  https://reviews.freebsd.org/D53522
6d6eb25d0b19443089749e288f091bf26fc58f70 Christos Margiolis 2025-11-11 12:05:16

sound: Retire unused sndbuf_getflags() and sndbuf_setflags()

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D53525
06eb65e11d7a66caec358966dcf892c9f4c2e411 Christos Margiolis 2025-11-11 12:05:20

sound: Simplify sndbuf_clear() loop

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D53526
c0e96595a4da90d890be88881a5dc3381da59dd7 Christos Margiolis 2025-11-11 12:05:24

sound: Remove redundant sndbuf_free() in chn_kill()

If b exists, it will get destroyed by sndbuf_destroy() (which calls
sndbuf_free()) a few lines below, so the additional sndbuf_free() here
is redundant.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D53527
ad28c6a13a45746f32cbc832b3fe58748fae0d19 Christos Margiolis 2025-11-11 12:05:30

sound: Get rid of useless sndbuf getters and setters

No functional change intended.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D53528
78c5026ae13b2d30b479f9bc892ecdb6f5a5bc0b Christos Margiolis 2025-11-11 12:05:34

sound: Add to pcm/buffer.* copyright

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
4e2bf54d9f2e9a2a51dbdcebf079089615102f1c Christos Margiolis 2025-11-11 12:05:37

sound: Retire unused {pcm_feederdesc,feedertab_entry}->idx

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D53547
f1157508b37d66c0e038b2a3346858999bcd5984 Christos Margiolis 2025-11-11 12:05:42

sound: Retire MAXFEEDERS and feedercnt

Apart from the fact that it's unrealistic to reach MAXFEEDERS (256),
since sound(4) comes with maximum 7 feeders (including feeder_root),
there is also no reason to cap it.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D53549
84282785cc497c3fb798502899f880e15d063233 Christos Margiolis 2025-11-11 12:05:47

sound: Remove unnecessary pcm/vchan.h include from pcm/feeder.c

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D53550
6049209f35c39823f6f9a756953b361d52658812 Christos Margiolis 2025-11-11 12:05:51

sound: Simplify pcm_feederdesc initialization

Currently we initialize a pcm_feederdesc array for every feeder, which
is then used by FEEDER_DECLARE(). However, there is no reason for this
to be an array, as each feeder has only one description. Additionally,
since the only thing we define in that array is the feeder type, remove
the pcm_feederdesc definitions altogether, and instead pass their type
to FEEDER_DECLARE() directly, which will then initialize the
pcm_feederdesc.

This also simplifies feeder_register().

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D53551
7d33c3d651901c97a683689916c810cf4e26a057 Christos Margiolis 2025-11-11 12:06:01

sound: Retire unused pcm_feederdesc->flags

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D53552
0e9e222518dc543e34f891c00d2a6a1dd93c3fc2 Christos Margiolis 2025-11-11 12:06:05

sound: Simplify feeder_getclass()

With the parameters we provide feeder_getclass(), the only thing we
really care about is the feeder's class type. We can simplify (and make
the code more readable) that by simply passing the type to
feeder_getclass(). Apart from being simpler, we can now also retire
feedertab_entry->desc and cmpdesc().

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D53553
441a411853e48719d4aa6a36bba0a4c4cbca3a4f Christos Margiolis 2025-11-11 12:06:09

sound: Retire feedertab_entry

Have an SLIST of feeder_class directly. This way we simplify the code,
and also avoid the additional malloc()/free() for each entry.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D53554
c24ca02c4c85d0b691a6100fd3006b1f23061858 Christos Margiolis 2025-11-11 12:06:14

sound: Retire feeder_class->data

It's always NULL. No functional change intended.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D53555
762f8e6f515a33274503872cf597e0895ff706bc Christos Margiolis 2025-11-11 12:06:18

sound: Retire feeder_class->desc

The only field we care about is pcm_feederdesc->type, so keep that one
only and do not embed the whole pcm_feederdesc.

While here, make the feeder type enum into a named one and use it as
feeder_class->type's type.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D53556
91fcc0132d0b192f07f9b67626c9af2ad8759857 Christos Margiolis 2025-11-11 12:06:24

sound: Retire pcm_feederdesc->type

This is always accessed from pcm_feeder->desc->type. Instead of
duplicating this field, we can remove it from pcm_feederdesc, and access
it through pcm_feeder->class->type.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D53557
92dcd20222a2674ba31ae09865da19d948992994 Christos Margiolis 2025-11-11 12:06:28

sound: Remove unnecessary initializations in feeder_create()

We do not need to zero out fields since the struct is allocated with
M_ZERO. Also we no longer need to have a special case for the root
feeder.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D53558
699fd108c50ccbd576476a2c95fa03e16492f2f9 Christos Margiolis 2025-11-11 12:06:32

sound: Retire unused feeder_printchain()

We can print it with "sndctl feederchain".

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D53559
f4819a1b6c441f804d66d710678bf5558ee29eee Christos Margiolis 2025-11-11 12:06:37

sound: Retire feeder_register_root()

We can now use feeder_register().

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D53560
2ba68208390a2c091039eb6731cdc2ebe280f89a Christos Margiolis 2025-11-11 12:06:41

sound: Retire DSP_DEFAULT_SPEED

Only a few drivers use this, but this is not really our "default" speed.
And even those drivers most likely override that value at some point
once CHANNEL_SETSPEED() has been called.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D53562
16ae4c2398c89dcc5c03f1aac72a2fce2a60e724 Christos Margiolis 2025-11-11 12:06:47

sound: Retire unused SCF_SYNTH

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
7dc58828f494ae8fc06ef014b01b2dbea855091b Christos Margiolis 2025-11-11 12:06:55
iwx: migrate to using net80211 crypto key methods
In preparation for further MFP key work, migrate iwx away from using
IEEE80211_KEY_GROUP and pointer arithmetic.  This is a hold over from
ye olde days.

Locally tested:

* (STA mode, CCMP/CCMP network)
* iwx0: <Wi-Fi 6 AX210> mem 0x84c00000-0x84c03fff at device 0.0 on pci4

Differential Revision:  https://reviews.freebsd.org/D52523
c5f7cb19f527eb845660c98feb4e5e3cbf05dce5 Adrian Chadd 2025-09-12 23:11:36
acpi: add counters for cumulative time spent in each sleep state.
Add this so it can be consumed/graphed.

Differential Revision:  https://reviews.freebsd.org/D53633
Reviewed by:    gallatin, imp
53880f09fb1b485cf5c4af2b81081112e0c7cea3 Adrian Chadd 2025-11-07 03:45:24
vmm: Initialize AMD IOMMU command buffers
The driver communicates with the AMD IOMMU by writing to the tail of a
fixed length command ring buffer. After issuing cmd_max commands, the
tail pointer wraps back to the beginning of the ring buffer. Now, each
command buffer entry will contain content from previous commands which
may set bits in fields marked as Reserved for the current command. In
some cases, the hardware will return an ILLEGAL_COMMAND_ERROR event when
this occurs.

Fix is to memset the command buffer prior to use.

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=270966
Reviewed by:    corvink, kib, markj
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D53692
6e68cd8666e14db265f00e9ee59b670ca2964e0d Chuck Tuffli 2025-11-12 15:39:29
arm64/vmm: Don't set MDSCR_EL1.KDE when enabling single-stepping
When VHE mode is enabled, this results in a hang on the host.  In
particular, when MDSCR_EL2.KDE is set to 1 and the CPU is executing at
EL_D, i.e., EL2, debug exceptions are enabled. In non-VHE mode, we call
into the guest by trapping to EL2, which implicitly masks debug
exceptions by setting PSTATE.D. However, in VHE mode, PSTATE.D remains
clear, so when the guest's MDSCR_EL1 value is loaded, we immediately
begin single-stepping.

In non-VHE mode there is no need to set KDE either, so just stop setting
it.

Reviewed by:    andrew
MFC after:      3 days
Sponsored by:   CHERI Research Centre (EPSRC grant UKRI3001)
Differential Revision:  https://reviews.freebsd.org/D48965
ac0032344ca256f758a5eeb0fd6089dd647b0496 Mark Johnston 2025-11-05 20:54:30
arm64/vmm: Fix handling of MDCR_EL2.TDE
TDE (make EL2 the target EL for debug exceptions) is set both when
setting guest breakpoints and when single-stepping the guest.  In some
cases we may configure both capabilities, and when subsequently
disabling one of them we need to take care to avoid clearing TDE if the
other is still configured.

MFC after:      3 days
Fixes:          https://cgit.freebsd.org/src/commit/?id=75cb949228bb ("arm64/vmm: Add breakpoint and single-stepping support")
Sponsored by:   CHERI Research Centre (EPSRC grant UKRI3001)
b6f25aca11c98acc49f111f2899ecd4e96c7debd Mark Johnston 2025-11-12 15:19:07
Commit group #4: Retire pccard(4)
Retire pccard(4)

pccard has been declared obsolete for a long time and also the
support has been removed but the man page still exists. It mentions
being scheduled to be removed before 13.0 but it still exists in the
tree.

[Extracted from review D53434]

Reviewed by: emaste
Fixes: https://cgit.freebsd.org/src/commit/?id=31b35400c ("pccard: Remove more of the PC Card infrastructure")
5b9fba1cb0d84ee297908ec4d575c33cf1f68ad5 Muhammad Moinur Rahman 2025-11-12 17:01:18

pccard.4: Really remove

Fixes:          https://cgit.freebsd.org/src/commit/?id=5b9fba1cb (Retire pccard(4))
Fixes:          https://cgit.freebsd.org/src/commit/?id=31b35400c (Remove more of the PC Card infrastructure)
Discussed with: emaste, jhb
8a8c58f71e80e186da3679266eef54f4180e4d11 Alexander Ziaee 2025-11-12 18:22:12
arm64: Add the PMBSR_MSS_BSC_BUFFER_FILLED define
This will be used by the SPE driver.

(commit message by andrew@)

Reviewed by:    andrew
Sponsored by:   Arm Ltd
736b7ec362a3db58007361ecbbb62dfb4bb3031e Sarah Walker 2025-11-12 16:55:28
arm64: Add a define for MDCR_EL2_E2PB_EL1_0_NO_TRAP
This will be used by the SPE driver.

(commit message by andrew@)

Reviewed by:    andrew
Sponsored by:   Arm Ltd
be0ded8d64e3e8c7bf6bf59b236a086f6a98e7b6 Sarah Walker 2025-11-12 16:57:29
Commit group #5: arm64: Add Arm SPE support
arm64: Add Arm SPE support

Add support for the Arm Statistical Profiling Extension (SPE). This
is an optional extension added in Armv8.1 to provide profiling of
software using randomised instruction sampling.

This adds the initial driver, and attached it to the hardware tracing
framework, hwt(4), in CPU mode to allow tracing of all threads on
a given CPU.

(commit message by andrew@)

Co-authored-by: Sarah Walker <sarah.walker2@arm.com>
Co-authored-by: Andrew Turner <andrew@FreeBSD.org>
Reviewed by:    andrew
Sponsored by:   Arm Ltd
Sponsored by:   The FreeBSD Foundation (early driver)
Differential Revision:  https://reviews.freebsd.org/D46241
68f185ccc9f8f9498d536f4737d888b37cf11882 Zachary Leaf 2025-11-12 16:35:05

arm64/spe: Fix the GENERIC-NODEBUG build

Fixes:  https://cgit.freebsd.org/src/commit/?id=68f185ccc9f8 ("arm64: Add Arm SPE support")
a1b9b97d9679c9c4d31d86c924f1d6f06f972579 Mark Johnston 2025-11-13 13:54:53
cxgbe KTLS tx: Distribute FW6_PLD replies across rx queues
If the connection flowid is available then the replies are requested on
the rx queue that is receiving wire traffic for the connection.  This
reduces contention for the txq lock.

Reviewed by:    jhb
MFC after:      3 days
Sponsored by:   Chelsio Communications
Differential Revision:  https://reviews.freebsd.org/D53385
a6ae6090bb3dc14eda750aa53650fccf4c0bf818 Navdeep Parhar 2025-10-21 17:29:28
sound examples: Extend and clean up
- Simplify directory and file structure.
- Clean up and improve code. Add more comments.
- Add polling examples.

MFC after:      1 week
Reviewed by:    christos
Differential Revision:  https://reviews.freebsd.org/D53353
6a569666868b36f5f436eea9d66789b6df191b8a Goran Mekić 2025-11-12 20:15:59
sound: Remove KOBJMETHOD_END re-definitions
No functional change intended.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    markj, emaste
Differential Revision:  https://reviews.freebsd.org/D53696
4c05ff1d5ad206d6074151f747a1dd272487555c Christos Margiolis 2025-11-12 20:30:58
cxgbe(4): Add support for QSFP-DD connector and 400G transceivers
Tested with SR8 and DR4 transceivers.

MFC after:      1 week
Sponsored by:   Chelsio Communications
4b17bb0edea0341d81eba3d369bd7739e5683d4b Navdeep Parhar 2025-10-16 18:23:49
cxgbe(4): T7 related updates to shared code
- Avoid some more registers with read side-effects during regdump.
- mps_tcam_size is 3x the size of T6/T5.
- Update rss_rd_row to work with T7.

Obtained from:  Chelsio Communications
MFC after:      1 week
Sponsored by:   Chelsio Communications
17b4a0acfaf5e58a04232c756a79d73649ead231 Navdeep Parhar 2025-10-15 19:29:06
apm(8): Drop MLINK to apmconf(8)
apmconf(8) was merged into apm(8) back in 2000 and this note and MLINK
were added as a transition aid, but that aid is no longer needed.
daa1f9b415f3bca82cc7a6e555c9c56e1b1c44f5 John Baldwin 2025-11-13 02:36:14
sound: Remove dead midi code
Sponsored by: The FreeBSD Foundation
MFC after:      1 week
e4b31985b54b626b2bbf486a82dd789f3dd381db Christos Margiolis 2025-11-13 12:10:04
Commit group #6: sound
sound: Retire unused mixer functions

No functional change intended.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
b55adf9b261b91ddd3c7293720bbbbfb4ffe7066 Christos Margiolis 2025-11-13 12:53:18

sound: Move mixer->modify_counter to more appropriate place

No functional change intended.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
15d77c1fdcb1c7f022a21892dcb78990986f1a3c Christos Margiolis 2025-11-13 13:33:24

sound: Retire OLDPCM_IOCTL

It is defined by default, and there is no reason to have a switch for
it. While here, also get rid of some unnecessary comments and ioctl
definitions.

No functional change intended.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
1fe7bfd6c70160c064237eac104e7d9c71390c4f Christos Margiolis 2025-11-13 13:33:28
Commit group #7: sound
sound: Remove unnecessary uio checks in dsp_io_ops()

uiomove_faultflag() takes care of that already.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    kib
Differential Revision:  https://reviews.freebsd.org/D53733
6b5431941c10b6fdf164ad9d3dfa4b4f1b2edc22 Christos Margiolis 2025-11-13 14:35:48

sound: Do not use double pointer in dsp_io_ops()

No reason to do so.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    kib
Differential Revision:  https://reviews.freebsd.org/D53734
fa7bc983076661e85107970e39de66a1e54d87d1 Christos Margiolis 2025-11-13 14:35:53

sound: Retire SND_DIAGNOSTIC PCM locking macros

Disabled by default, but also redundant, since most of the errors they
catch will be caught anyway by WITNESS and the locking subsystem.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    kib
Differential Revision:  https://reviews.freebsd.org/D53735
b19e61f223a1982cce103b9716568391a071892a Christos Margiolis 2025-11-13 14:35:58
arm64: Fix calculating kernel size for preload metadata
Cast &end to vm_offset_t before subtracting VM_MIN_KERNEL_ADDRESS to
ensure the resulting size is correct for PRELOAD_PUSH_VALUE.
Previously the correct size was effectively divided by sizeof(void *).

Reviewed by:    andrew
Obtained from:  CheriBSD
Differential Revision:  https://reviews.freebsd.org/D53699
587490dabc649b58f0c7966e749aa80a0f16796b Hesham Almatary 2025-11-13 14:57:54
Commit group #8: cxgbe(4): Expanded interrupt handling for T7
cxgbe(4): Expanded interrupt handling for T7

- Catch up with the new cause/perr registers.  The high level approach
  is the same but the T7 has an extra top level INT_CAUSE concentrator
  and a PERR_CAUSE concentrator with a changed layout.

- Add various flags to control the interrupt handlers' behavior.

- Implement a t4_intr_clear that internally use the slow handler as an
  iterator over known cause/perr registers.  This lets the driver clear
  all of the interrupt sources that it knows about.  The firmware sets
  up the interrupt enables and clears the causes normally so this call
  should be redundant.

MFC after:      1 week
Sponsored by:   Chelsio Communications
7b80c8b7d8d9a4a634c5fd5334a9fe40f9ca0b3b Navdeep Parhar 2025-11-12 01:27:40

cxgbe(4): Skip non-existent blocks in the interrupt handler

Fixes:  https://cgit.freebsd.org/src/commit/?id=7b80c8b7d8d9 cxgbe(4): Expanded interrupt handling for T7
MFC after:      1 week
Sponsored by:   Chelsio Communications
b676b5e5e07fde53e6dafd0fa6c360ca56ac7154 Navdeep Parhar 2025-11-13 21:14:01
drm2: update gone_in to 16 from 13
3a572775bfc3b1dc127e2db1a7c95ca776ff5245 David E. O'Brien 2025-11-13 20:37:19
mlx5: Fix compilation error when not building with KERN_TLS
Reported by: np
Fixes: https://cgit.freebsd.org/src/commit/?id=9349214a2815 mlx5: Preallocate ktls tags asynchronously
Sponsored by: Netflix
c56a266434678faf961d737714d47291b88a3f9e Andrew Gallatin 2025-11-13 21:55:17
rtwn: migrate to new ieee80211 key data accessors
Migrate to the ieee80211_crypto_key_*() routines.
Should be no functional change.

Locally tested:

* RTL8821AU, STA mode

Differential Revision:  https://reviews.freebsd.org/D52712
333eb58deeda6cc5a5a908b92301f833ba8750fa Adrian Chadd 2025-09-24 15:36:46
mtw: convert to new net80211 crypto key API
* constify mtw_write_region_1()'s data field
* convert to use ieee80211_crypto_get_*()
* .. note that rx/tx mic data routines are explicitly being called,
  as this NIC is doing TKIP + MIC offload

Differential Revision:  https://reviews.freebsd.org/D53704
Reviewed by:    bz
5431dafdb9659fb578fa2b9944005e15f50d4038 Adrian Chadd 2025-09-25 18:29:00
Commit group #9: iwx
iwx: clean up debugging around key add/set; comments on delete

* Add IWN_DEBUG_KEYMGMT as a debug flag
* Convert DPRINTF(()) in key add/set to IWN_DPRINTF()
* printf() -> net80211_vap_printf()
* add braces around return value

Differential Revision:  https://reviews.freebsd.org/D53703
Reviewed by:    thj
7d88ac0eb2d2e81ac121dd4a32229494594ec44c Adrian Chadd 2025-11-12 02:49:10

iwx: fix and clean up suspend/resume path

I noticed a couple of things were happening:

* during suspend, I'd get a timeout in the NIC lock path (which
  sets a bit on the NIC to say that the host wants to talk to it);
* resume wouldn't come back - scan commands would fail, and you'd have
  to reinit the NIC again for it to work.

The thing is:

* the suspend path should already shut down the NIC by shutting down all
  the VAPs (and the last VAP should call ic_parent to bring it down), and
* the resume path should already bring up the NIC by bringing up each VAP,
  and the first VAP to be brought up calls ic_parent to bring it up.

So instead, I've shuffled around the code to just double check the
hardware state is consistent /before/ ieee80211_suspend_all() and
ieee80211_resume_all() is called.

This both fixes the errant hardware timeout during suspend, and it
fixes resume to work.

Locally tested:

* AX210, STA mode, both hardware ACPI suspend/resume and devctl suspend
  and devctl resume

Differential Revision:  https://reviews.freebsd.org/D53721
Reviewed by:    thj
b4c35d4622d522c92bb080ee51e4a351e9d71897 Adrian Chadd 2025-11-12 21:01:40

iwx: clean up TX AMPDU session establishment and checking

* Send a TX A-MPDU exchange successfully; we were allocating the
  A-MPDU TX queue but returning 0 to net80211 was telling it
  to not establish the TX A-MPDU session and none of the BA session
  tracking stuff would work.

* Clean up the TX A-MPDU queue lookup in the transmit path - only
  QoS data frames are allowed, not qos null-data, cf/ack/etc frames;
  only send them if the A-MPDU session is established.

* Tell net80211 that we've established the TX A-MPDU session once
  the firmware queue has been created.

* Check to make sure we're not double (or more) creating TX AMDPU
  sessions - only allocate a qid if we're not doing A-MPDU yet.

* Delete IWX_FLAG_A-MPDUTX - it's now being properly tracked!

Locally tested:

* AX210, STA mode - gets 50/50mbit on 2GHz HT20, and 100/100mbit on
  5GHz VHT/40.

Differential Revision:  https://reviews.freebsd.org/D53725
Reviewed by:    thj
00b4d712e2be54b8c87a7fd7f215ad5ef7845d5b Adrian Chadd 2025-11-13 04:33:52
cxgbe(4): Avoid racy access to requested_fec in sysctl_requested_fec
PR:           https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=289121
Reported by:    Qiu-ji Chen
MFC after:      1 week
Sponsored by:   Chelsio Communications
Differential Revision:  https://reviews.freebsd.org/D52199
b0cfa27c91c400dcf3e8441cc04f9e5300c7c3af Navdeep Parhar 2025-11-14 07:45:59
tpm: crb: factor out idle/ready state transitions
Some TPM implementations have a different start method that requires
an additional notification for some state changes; for instance, the
"Pluton" start method.  Just factor these transitions out for now, and
the coming commits will introduce points that the start method can hook
in at.

Reviewed by:    obrien
Differential Revision:  https://reviews.freebsd.org/D53682
cca34aa1d005ffc859704331a3221b8c506d2f06 Kyle Evans 2025-11-15 02:22:10
NOTES: Add iwm and iwx
Reviewed by:  imp, jhb
Differential Revision:  https://reviews.freebsd.org/D53759
b1039bbe185bbadea24207b600f4bea065a2dbee Dag-Erling Smørgrav 2025-11-15 03:18:51
efi: Move edk2 compat defines to sys/efi-edk2.h
Create efi-freebsd.h, which is safe to include from the FreeBSD context
(all of userland, except the small bits we share with edk2 and the
kernel). This defines anything that we need. At the moment, it just
includes NULL definitions.

Create efi-edk2.h, which is approximately ProcessorBind.h from edk2 that
we can include in FreeBSD compontents that are re-using edk2 components
(bits of the boot laoder, and libefi*). Update the efi_gid definitions
to match edk2 better. Add this file to badfiles.inc, since we can't
write it in a way that's compatible. This is copied from the old
efi-osdep.h.

This has to be done in one commit that's bigger than I like since we
can't easily move things piecemeal around they are so inter-related.

Sponsored by:           Netflix
Differential Revision:  https://reviews.freebsd.org/D53651
ce1342883e03e6a021f03a49d13539a145d320e2 Warner Losh 2025-11-16 17:32:26

Networking

Network-related commands, library, and kernel.

net80211: create accessors for accessing the ieee80211_key key/mic data
Add some accessors to the key data, key length and MIC data.
Document exactly what these mean.

There's at least a couple of drivers that access the key data field
directly and assume that the TX/RX MIC is available directly after the
data pointer, which bakes in the "key size is 128 bits" in subtle ways.

The goal here is to migrate the drivers and net80211 code to use
these methods rather than accessing wk_key directly and making assumptions
about wk_key and the copied key length (which the ioctl path definitely
does.)

Once that's done, it should be a lot easier to change the key API for
larger keys.

Differential Revision:  https://reviews.freebsd.org/D52711
Reviewed by:    thj
77b1e4f32f31b219c238c81b726d079a003b465c Adrian Chadd 2025-09-24 15:30:47
iflib: remove transmit prefetching
Remove prefetching from the transmit path of iflib in the interest of
increased performance and reduced complexity. Details regarding the
performance penalties of prefetching can be found in the differential
review.

Note this prefetching was only done on link speeds of 10Gb/s and
above, so the change is a no-op (or perhaps slight performance
improvement simply due to the code simplification) for slower
interfaces.

Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D53674
Reviewed by: kbowling, markj, mjg
c9e4643da132c50f082a474c540108d7afee2d18 Andrew Gallatin 2025-11-11 16:46:28
Commit group #10: if_media.h: Add 400GBase-SR8 and 400GBase-CR8
if_media.h: Add 400GBase-SR8 and 400GBase-CR8

Reviewed by:    bz (network)
MFC after:      1 week
Sponsored by:   Chelsio Communications
Differential Revision:  https://reviews.freebsd.org/D53387
2d608a4cebbd5b9e648f86e52f115c02fac52d88 Navdeep Parhar 2025-11-12 22:10:04

Fix typo in recently added 400G media

Reported by:    glebius
Fixes:  https://cgit.freebsd.org/src/commit/?id=2d608a4cebbd if_media.h: Add 400GBase-SR8 and 400GBase-CR8
MFC after:      1 week
Sponsored by:   Chelsio Communications
4d2d65cad49765a084819195d81a7c0043f1938c Navdeep Parhar 2025-11-14 06:02:28
pf: handle divert packets
In a divert setup pf_test_state() may return PF_PASS, but not set the state
pointer. We didn't handle that, and as a result crashed immediately afterwards
trying to dereference that NULL state pointer.

Add a test case to provoke the problem.

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=260867
MFC after:      2 weeks
Submitted by:   Phil Budne <phil.budne@gmail.com>
Sponsored by:   Rubicon Communications, LLC ("Netgate")
66f2f1c83247f05a3a599d7e88c7e7efbedd16b5 Kristof Provost 2025-11-15 13:44:54
sys/net/sff8436.h: Fix the register address of link length of copper or active cable
The register address of link length of copper or active cable is 146 as
per the SFF-8436 specification [1].

[1] 7.6.2 Upper Memory Map Page 00h SFF-8436 Specification (pdf): https://members.snia.org/document/dl/25896

Reviewed by:    imp, zlei
MFC after:      1 week
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1885
Closes:         https://github.com/freebsd/freebsd-src/pull/1885
a537694b49f719d84e3a69a2b8a3098f603da7d7 Kirill Kochnev 2025-11-06 18:22:30

System administration

Stuff in man section 8 (other than networking).

newfs_msdos: Improve error messages
- Report overly long OEM string as too long, not just "bad".

- Use warn instead of warnx for open or ftruncate failure to report the
error string.

Reviewed by:    se
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D53649
dbb34d496708a37763d3d8bf6782991dee10d17e Ed Maste 2025-11-09 19:43:50
stand: Try to parse vdisk correctly
PR:                   https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=289306
Sponsored by:           Netflix
Reviewed by:            dab
MFC After:              5 days
Differential Revision:  https://reviews.freebsd.org/D52500
d18ed8e19c3cb264340987bdc191615108d8413a Warner Losh 2025-11-11 00:41:52
rc: virtual_oss: Use required_modules instead of load_kld
Sponsored by: The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    imp, markj, emaste
Differential Revision:  https://reviews.freebsd.org/D53616
ac2aa9e869a16b28095364b2e14683df9885ac34 Christos Margiolis 2025-11-11 12:07:36
virtual_oss(8): Use kldload(2) instead of system(3)
Sponsored by: The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    imp, markj, emaste
Differential Revision:  https://reviews.freebsd.org/D53617
7bedc4634d893174b9cef06c7c13e5f1cb24808b Christos Margiolis 2025-11-11 12:07:40
virtual_oss(8): Improve hw.snd.basename_clone handling
If we request a /dev/dsp virtual_oss(8) device, we have to replace the
sound(4) one by first disabling hw.snd.basename_clone. This sysctl tells
sound(4) to not create the /dev/dsp alias for the default device. There
are currently two issues with the way this is handled by virtual_oss(8),
however:

1. It uses system(3) instead of sysctlbyname(3).
2. It does not restore hw.snd.basename_clone to its original value, so
   if prior to virtual_oss(8) running, hw.snd.basename_clone was enabled
   (which is the case by default), and it is closed at some point,
   hw.snd.basename_clone stays disabled, which is annoying, because
   users have to manually restore it, otherwise applications that open
   the default device (i.e., most) will not work.

Fix both issues.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D53621
e5c0d7020f3d040b28dc7ca0cda9926e07e5aaf4 Christos Margiolis 2025-11-11 12:07:44
bsdinstall: Use fat32 EFI system partition for ZFS
This is consistent with other operating systems and with bsdinstall's
UFS config and with bsdinstall's ZFS config prior to commit
0b7472b3d8d2.

Fixes: https://cgit.freebsd.org/src/commit/?id=0b7472b3d8d2 ("Mount the EFI system partition (ESP) on newly-installed systems.")
Reviewed by:    imp
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D53642
4109cdf0f817162cf3032aa589dd180dfa910025 Ed Maste 2025-11-07 22:48:30
quot: Rewrite -n mode input parser
The existing parser was needlessly complicated and wildly inconsistent
in how it handled invalid input.  Rewrite using getline() and treat
invalid input consistently: silently ignore lines that don't begin with
a number, and print a warning if the inode number is out of range.

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=290992
MFC after:      1 week
Reviewed by:    obrien
Differential Revision:  https://reviews.freebsd.org/D53726
fa272a5276865a97b01823fe6546940eaaf1b164 Dag-Erling Smørgrav 2025-11-14 14:28:40
bsdinstall: Copy in all keys
The keys used for pkgbase signing are going to be placed in
/usr/share/keys/pkgbase-N where N is the FreeBSD major version
number; as such it's not sufficient to copy /usr/share/keys/pkg
into the install chroot, but instead we need /usr/share/keys/*.

With hat:       re
MFC after:      8 hours (needed in 15.0-RC1)
Differential Revision:  https://reviews.freebsd.org/D53753
6b0909f94099f92992fbd58eee7ce0f9289cb05e Colin Percival 2025-11-14 05:28:23
bsdinstall: Use pkgbase.f.o for BETA/RC/RELEASE
For BETA/RC/RELEASE builds, fetch files from the appropriate repository
on pkgbase.freebsd.org, using the appropriate signing keys.  Note that
there is a separate repository for each BETA and RC; this ensures that
someone installing from e.g. a 15.0-RC1 ISO will get 15.0-RC1 bits and
not whatever happens to be the most recent build from releng/15.0.

With hat:       re
MFC after:      8 hours (needed in 15.0-RC1)
51184e38c932b7acedfc26fef3a0aad4c04f8959 Colin Percival 2025-11-15 03:04:51
bsdinstall: Don't install FreeBSD-base.conf
When installing e.g. 15.0-RC1, we want to get files from the 15.0-RC1
pkgbase repository; but running 'pkg upgrade' after installation should
get the latest bits build from releng/15.0.

With hat:       re
MFC after:      8 hours (needed in 15.0-RC1)
bdfc223c7a64369ed133a179c40067435a9f2cb3 Colin Percival 2025-11-15 03:18:52
pkg: Add FreeBSD-base to /etc/pkg/FreeBSD.conf
On -CURRENT and -STABLE this gets bits from pkg.freebsd.org; but we get
base system bits from pkgbase.freebsd.org for BETA/RC/RELEASE.

Note that this repository is disabled by default, but can still be used
by explicitly specifying it, e.g. "pkg upgrade -r FreeBSD-base".

With hat:       re
MFC after:      8 hours (needed in 15.0-RC1)
8e0b1a1c03a35a5db13e370cb3e62585d3db68e3 Colin Percival 2025-11-15 03:26:07
bsdinstall: Enable FreeBSD-base repo when pkgbase
When performing a pkgbase install, create a configuration file in
/usr/local/etc/pkg/repos/FreeBSD.conf which enables the FreeBSD-base
repository.  (This repository is defined in /etc/pkg/FreeBSD.conf as
being disabled by default.)

Reported by:    Mark Millard
Reviewed by:    markj
MFC after:      immediately (needed for 15.0-RC1)
Differential Revision:  https://reviews.freebsd.org/D53777
a96230e0329b32cbee0999813787a86eab521da4 Colin Percival 2025-11-15 21:56:35
stand: Rename EFI_ERROR_CODE to DECODE_ERROR to avoid Edk2 Clash
This follows what Illumos has done.

Sponsored by:           Netflix
Reviewed by:            tsoome
Differential Revision:  https://reviews.freebsd.org/D53656
87795c6e95b01cd20df103109cdb7077eb46bc46 Warner Losh 2025-11-16 17:32:18
stand: switch the loader over to using efi-edk2.h
Sponsored by:         Netflix
Differential Revision:  https://reviews.freebsd.org/D53652
84dc74b8274c77ea878837cb0e2dbd4c93b93052 Warner Losh 2025-11-16 17:34:49
stand: Cut over to using the EDK2 files
Remove the old EFI SDK files that we've been nursing along for too many
years. Replace them with files from EDK2 edk2-stable202502 and tweak the
interfaces we need to tweak. Mostly include different things or change
the names of the protocols that no longer have old-school compat names.

I gave up in the middle of env.c, too damn tedious to find all those new
GUIDs. Also, many of the guids were mystery meat, most likely from the
EDK2 sources, but just not the Include subdirectory. Need to investigate
those. And the memory info? Is it just an oboslete thing, or embedded
knowledge of EDK2.

Delete the now-redundant copies of things in Guid and Protocol. I
debated keeping ZeroGuid.h, but EDK2 has moved on from when I snagged it
years ago (or maybe I just invented it out of whole cloth: edk2 does
radically different things today and I didn't do the git deep-dive to
find out).

Sponsored by:           Netflix
Differential Revision:  https://reviews.freebsd.org/D53655
43b8edb320519c9887a5d953c4cf8a91f0ca8d14 Warner Losh 2025-11-16 17:36:36

Libraries

lib/libc: implement C23 memalignment()
This new function computes the alignment of a pointer.
It is part of ISO/IEC 9899:2024, the new C standard.
If the pointer is a null pointer, null is returned.
I have tried to write an implementation that can cope
with traditional address-based architectures, even if
size_t and uintptr_t are of different length.  Adjustments
may be needed for CHERI though.

A man page is provided, too.  No unit test for now.

Reviewed by:    kib, imp, ziaee (manpages), pauamma@gundo.com
Approved by:    markj (mentor)
MFC after:      1 month
Relnotes:       yes
Differential Revision:  https://reviews.freebsd.org/D53673
6c57e368eb1777f6097158eeca2fcc175d068dba Robert Clausecker 2025-11-10 17:54:41

Filesystems

cd9660: Unbreak symbolic links
Since the introduction of permission masks, cd9660_getattr() returns a
size of zero for all symbolic links, because the code to retrieve the
length of the link target (as required by POSIX) is dead, since we strip
away the type bits before we try to use them to identify the file as a
link.  Address this by checking the vnode type instead.

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=290556
MFC after:      3 days
Fixes:          https://cgit.freebsd.org/src/commit/?id=82f2275b73e5 ("https://cgit.freebsd.org/src/commit/?id=cd9660: Add support for mask,dirmask,uid,gid options")
Reviewed by:    olce
Differential Revision:  https://reviews.freebsd.org/D53598
978aaa72f3196f5489630052762cac5a7863e774 Dag-Erling Smørgrav 2025-11-10 13:58:11
tarfs: Fix support for large files
* When fast-forwarding through a zstd frame, we incorrectly used the
  min() inline function instead of the MIN() macro.  The function
  truncates the result to unsigned int, resulting in a decompression
  error when trying to seek more than 4 GB into the frame.

* POSIX states that a size extended header record overrides the size
  field in the header if present, and that one must be included if the
  size of the file exceeds 8 GB (the size field maxes out at 64 GB).

* Reduce repetition in the exthdr parser by deduplicating the syntax
  error handler.

MFC after:      1 week
Sponsored by:   Klara, Inc.
Fixes:          https://cgit.freebsd.org/src/commit/?id=69d94f4c7608 ("Add tarfs, a filesystem backed by tarballs.")
Reviewed by:    allanjude
Differential Revision:  https://reviews.freebsd.org/D53718
a34a57d4b4eba88dfa5541d7d77b63b01c1a1a9a Dag-Erling Smørgrav 2025-11-12 21:23:49
cuse: Fix cdevpriv bugs in cuse_client_open()
If devfs_set_cdevpriv() fails, we will panic when we enter the
cuse_client_free() callback, for a number of reasons:

- pcc->server is not yet assigned, so we'll use a NULL pointer.
- pcc has not yet been added to the pcs->hcli TAILQ, but we'll try to
  remove it.
- pccmd->sx and pccmd->cv are not yet initializated, but we'll try to
  destroy them.

Even if we'd get past all these somehow, we'd still get two errors in
the devfs_set_cdevpriv() failure block:

- We'll unref the server twice, once in cuse_client_free(), and again in
  cuse_client_open().
- A double-free panic, since we'd be trying to free(pcc), which has
  already been freed in cuse_client_free().

Fix all those issues. While here, also get rid of some unnecessary
devfs_clear_cdevpriv().

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    kib
Differential Revision:  https://reviews.freebsd.org/D53708
634e578ac7b0a03ae25427c723c0da27e894a340 Christos Margiolis 2025-11-13 12:11:06

Kernel

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

LinuxKPI: 802.11: clear CONF_IDLE earlier
When starting to scan and ending a scan we clear/set the hardware to
idle.  Similarly we set the hw to idle when we remove the channel
context but when starting we only set it to non-idle when we went from
assoc to run.  This apparently was not a problem most of the time
as the switch from a failed hardware scan to a software scan was
racing against net80211.  ad4ddc83ebf8 fixed that specifically for
rtw88 and while we were more consistently scanning, this broke
authentication as the setting of idle at the end of the scan was
now happening reliably.  Move the unsetting of idle from assoc_to_run
to scan_to_auth for when we  create the chanctx to keep it
symmetrical.  This makes authentication work again for rtw88.

This likely also fixes the problems in the listed PRs.

iwlwifi(4) mvm and mld driver parts do not use this information at
all and were never affected.

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
Reported by:    Oleg Nauman (oleg.nauman gmail.com)
PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=290850, https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=288186, https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=281979
PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=272145 (the non skb-mem-limit parts)
b568711f8ef1afd7c86ea2d8bd2f94f399f54dc1 Bjoern A. Zeeb 2025-11-10 19:41:08
Commit group #11: random: TPM_HARVEST should have been named RANDOM_ENABLE_TPM
random: TPM_HARVEST should have been named RANDOM_ENABLE_TPM

* Enable RANDOM_ENABLE_TPM by default

* The commit of TPM_HARVEST failed to add it to NOTES
  so that the LINT kernel would build the code.

Fixes: https://cgit.freebsd.org/src/commit/?id=4ee7d3b0118c82e651712bb65da53d08e78cd7b1
Reviewed by:    imp
Differential Revision:  https://reviews.freebsd.org/D53460
3deb21f1afd5c4abfd9cb93ca120097a841536c5 David E. O'Brien 2025-10-28 03:53:43

random: git'o in RANDOM_ENABLE_TPM

Fixes:  https://cgit.freebsd.org/src/commit/?id=3deb21f1a
f1b9c1aafd8496c5bfdbc2be57bcfecfe58f12a8 David E. O'Brien 2025-11-11 02:37:28
random: allow disabling of entropy harvesting from keyboard & mice
Reviewed by:  jmg
Sponsored by:   Juniper Networks
Differential Revision:  https://reviews.freebsd.org/D53390
d6f10a5d013fdcc92847644ffbaf65cbf491bb39 David E. O'Brien 2025-10-28 02:57:21
kern_thread: thread_suspend_check(1) must never suspend
Reported by:  bdrewery
Reviewed by:    bdrewery, markj
Tested by:      bdrewery, pho
PR:     https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=290843
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D53624
e1c6f4cb9bd29358c2b2fe249af9a2f9626b0670 Konstantin Belousov 2025-11-06 19:25:23
geom/zero: Add support for unmapped I/O
This patch adds support for unmapped I/O to gzero(4).

Let's consider the following script to illustrate the change in
gzero(4)'s behavior:

```
dd="dd if=/dev/gzero of=/dev/null bs=512 count=100000"
dtrace -q -c "$dd" -n '
    fbt::pmap_qenter:entry,
    fbt::uiomove_fromphys:entry,
    fbt::memset:entry
    /execname == "dd"/
    {
        @[probefunc] = count();
    }
'
```

Let's run that script 4 times:

```
==> 1: unmapped I/O not supported (fallback to mapped I/O), kern.geom.zero.clear=1
51200000 bytes transferred in 1.795809 secs (28510829 bytes/sec)
  pmap_qenter                                                  100000
  memset                                                       400011

==> 2: unmapped I/O not supported (fallback to mapped I/O), kern.geom.zero.clear=0
51200000 bytes transferred in 0.701079 secs (73030337 bytes/sec)
  memset                                                       300011

==> 3: unmapped I/O supported, kern.geom.zero.clear=1
51200000 bytes transferred in 0.771680 secs (66348750 bytes/sec)
  uiomove_fromphys                                             100000
  memset                                                       300011

==> 4: unmapped I/O supported, kern.geom.zero.clear=0
51200000 bytes transferred in 0.621303 secs (82407407 bytes/sec)
  memset                                                       300011
```

If kern.geom.zero.clear=0, then nothing really changes as no copying takes
place. Otherwise, we see by adding unmapped I/O support we avoid calls to
pmap_qenter(), which was called by GEOM to turn unmapped I/O requests into
mapped ones before passing them for processing to gzero(4).

Reviewed by:    bnovkov, markj
Approved by:    bnovkov (mentor), markj (mentor)
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D52998
d01183fddf37b15da7ab3d69039e7759ae144451 Mateusz Piotrowski 2025-09-26 07:08:30
kmod.mk: Remove a trailing reference to pccarddevs.h
Fixes:                https://cgit.freebsd.org/src/commit/?id=31b35400cf77 ("pccard: Remove more of the PC Card infrastructure")
6bf611ada21216aefcd830ba71fbf0b5d776ea47 John Baldwin 2025-11-12 14:29:04
unix: Fix handling of listening sockets during garbage collection
socantrcvmore() and unp_dispose() assume that the socket's socket
buffers are initialized, which isn't the case for listening sockets.

Reported by:    syzbot+a62883292a5c257703be@syzkaller.appspotmail.com
MFC after:      1 week
Reviewed by:    glebius
Differential Revision:  https://reviews.freebsd.org/D53743
9d9fa9a2c22f67d5f8afec18106c9f0072d6b3d4 Mark Johnston 2025-11-13 22:56:15
unix: Remove an always-false null pointer check
No functional change intended.

MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D53453
ce5692bf009ed5607d3b880eec4055697479c13d Mark Johnston 2025-11-13 22:57:35
aio: fix alignment of struct (o)aiocb32 on non-amd64
Only i386 has a four-byte alignment for uint64_t, others have
eight-byte alignment.  This causes the structure to mismatch
on armv7 binaries running under aarch64, breaking the aio interface.

Fixes:          https://cgit.freebsd.org/src/commit/?id=3858a1f4f501d00000447309aae14029f8133946
Approved by:    markj (mentor)
Reported by:    Mark Millard <marklmi26-fbsd@yahoo.com>
Discussed with: jrtc27
PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=290962
MFC after:      immediately (for 15.0)
f0af21824331648a41b4e5d3323bea9216bcb7e2 Robert Clausecker 2025-11-14 00:55:59
Commit group #12: unix/stream: fix a race with MSG_PEEK on SOCK_SEQPACKET with MSG_EOR
unix/stream: fix a race with MSG_PEEK on SOCK_SEQPACKET with MSG_EOR

The pr_soreceive method first scans the buffer holding the both I/O sx(9)
and socket buffer mutex(9) and after figuring out how much needs to be
copied out drops the mutex.  Since the other side may only append to the
buffer, it is safe to continue the operation holding the sx(9) only.
However, the code had a bug that it used pointer in the very last mbuf as
marker of the place where to stop.  This worked both in a case when we
drain a buffer completely (marker points at NULL) and in a case when we
wanted to stop at MSG_EOR (marker points at next mbuf after MSG_EOR).
However, this pointer is not consistent after we dropped the socket buffer
mutex.

Rewrite the logic to use the data length as bounds for the copyout cycle.

Provide a test case that reproduces the race.  Note that the race is very
hard to hit, thus test will pass on unmodified kernel as well.  In a
virtual machine I needed to add tsleep(9) for 10 nanoseconds into the
middle of function to be able to reproduce.

PR:                     https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=290658
Reviewed by:            markj
Differential Revision:  https://reviews.freebsd.org/D53632
Fixes:                  https://cgit.freebsd.org/src/commit/?id=d15792780760ef94647af9b377b5f0a80e1826bc
69f61cee2efb1eec0640ca7de9b2d51599569a5d Gleb Smirnoff 2025-11-14 02:39:48

unix/stream: fix instant panic w/o INVARIANTS

A stupid microoptimization I made leaving empty STAILQ inconsistent
is a brainfart that is related to much earlier version of this code,
where it was safe to do so.

Pointy hat to:  glebius
Fixes:          https://cgit.freebsd.org/src/commit/?id=69f61cee2efb1eec0640ca7de9b2d51599569a5d
82d8a5029a80a77166dca098b8fedb10d84e4e38 Gleb Smirnoff 2025-11-14 16:01:47
sys/conf/files: Add iwx driver
PR:           https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=290812
Fixes:          https://cgit.freebsd.org/src/commit/?id=2ad0f7e91582 ("Import iwx as ported from OpenBSD by Future Crew.")
Reviewed by:    emaste
Differential Revision:  https://reviews.freebsd.org/D53758
a615ded5bf2dd7f563eed6766d32fc063ae36f92 Dag-Erling Smørgrav 2025-11-15 03:18:45
arm64: Add support to vchiq and bcm2835_audio (plus some fixes)
Add 64 bit support to vchiq:

 * update fields to the appropriate fixed bit-size variants (everywhere [cf. e.g., ref:sizes and ref:sizes2])
 * refer to event semaphores (that go into the very 32 bit VC) by offset instead of pointers [ref:sems]
 * dsb() is dsb(sy) in arm64 (vchiq_{core.c,core.h,kmod.c}) [ref:dsb]
 * comment out some unneeded code in parse_rx_slots around VCHIQ_MSG_BULK_RX (cf. [ref:deadcode])
 * adapt remote_event_signal to arm64 caching behaviours (vchiq_kmod.c)
 * refactor synchronization around remote_event_signal, forcing a wmb to be on the safe side; thereby make it look more like what linux does [ref:sync] (vchiq_{core,kmod}.c); and make a comment in vchiq_core.c true (wasn't before)
 * add a few more syncs to be on the safe side (vchiq_2835_arm.c)
 * use arm64 dcache invalidation mechanisms (vchiq_2835_arm.c)
 * explicitly invalidate pages on arm64 post bulk-read (vchiq_2835_arm.c)
 * support bulk transfers on rpi-4 (aka "long address space" transfers), by hard-coding their vc offset (0) and different bit-shift [ref:longbulk] (vchiq_2835_arm.c)
 * refactor a loop-of-constant-test (vchiq_2835_arm.c)
 * use the correct (hard-coded) cache-line size on arm64
 * rework the handling of chipset "features" to account for the extra behaviours with 64 bit chipsets. (vchiq_kmod.c)
 * add sysctl-s (log, arm_log) to control debug (vchiq_kmod.c)
 * add example kernel config (GENERIC-VCHIQ)

Fixes:

 * Rework error handling in create_pagelist, avoiding a potential panic when
   freeing memory that had been dmamem_alloc, a potential null dereference,
   and a leak when having problems pinning pages (vchiq_2835_arm.c)
 * fix a confusion about the behaviour cv_wait_sig that lead to
   uninterruptible looping (vchiq_bsd.c)
 * implement detection of fatal signals (vchiq_bsd.c)
 * fix a confusion with the name of a variable introduced by #a0b8746
   that could lead to a panic when closing the cdev file (vchiq_arm.c)
 * release user connection when destructing cdevpriv and avoid user processes
   sharing connection data, which lead to stalls and data corruption. (vchiq_arm.c)

Update bcm2835_audio to work on 64bit systems:

 * update VC audio fields (vc_vchi_audioserv_defs.h, bcm2835_audio.c)
 * repurpose the hitherto unused callback field to help push a 64 bit pointer in (bcm2835_audio.c)
 * increase (hopefully) the robustness of the code that shifts data to VC (bcm2835_audio.c)
 * add a sysctl to control the amount of debugging info output by bcm2835_audio.c

Tested on zero, zero2 and 4+ with ping, functional, bulk and control vchiq_test-s, and omxplayer

  [ref:dsb]: https://github.com/raspberrypi/linux/commit/35b7ebda57affcfd3616d39d5a727a4495b31123
  [ref:sems]: https://github.com/raspberrypi/linux/commit/24a4262afb10907fce3cdbc3ae336fcf4cdaece5
  [ref:sizes]: https://github.com/raspberrypi/linux/commit/e64568b8ea6c04e747e432c17ce2452652075216
  [ref:sizes2]: https://github.com/raspberrypi/linux/commit/f9bee6dd24addfa00c2c8d50c25b73efbfbb28ba
  [ref:deadcode]: https://github.com/raspberrypi/linux/commit/14f4d72fb799a9b3170a45ab80d4a3ddad541960
  [ref:sync]: https://github.com/raspberrypi/linux/commit/51c071265079319583e4c6e8c61e09660300d0bf
  [ref:longbulk]: https://github.com/raspberrypi/linux/commit/37f6f19a83722c9b866cecb5e455b2e16e5bbc6b

Differential Revision:  https://reviews.freebsd.org/D37878
Submitted by: Marco Devesas Campos <devesas.campos@gmail.com>
aa6b871ea77e5b52cf4683c5f304a82d2e351ba0 Marco Devesas Campos 2025-10-20 02:50:19
setcred(): Fix 32-bit compatibility copy-in
For 32-bit processes on 64-bit architectures, a difference of 'int'
pointers was wrongly used as a number of bytes to copy in a memcpy()
used to internally construct a 64-bit 'struct setcred' from the 32-bit
variant, leading to copying only part of the 32-bit structure, and thus
to requesting credentials with garbage IDs except for the real and
effective user IDs.

This bug was spotted by jhb@, who produced a slightly more invasive fix
in D53757 (a switch to using CP() on all fields).  In the interest of
minimizing the diff for possible inclusion in 15.0, the commit here just
limits itself to fixing the number of bytes to copy.

Tested successfully on a VM with 32-bit mdo(1) (and in passing also
tested that the same executable on a kernel without this change exhibits
the bug in practice, in the form of setcred() failing with EINVAL).

Reported by:    jhb
Reviewed by:    jhb
Fixes:          https://cgit.freebsd.org/src/commit/?id=ddb3eb4efe55 ("New setcred() system call and associated MAC hooks")
MFC after:      3 days
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D53767
4872b48b175cc637ee38f645d68b8207d9335474 Olivier Certner 2025-11-14 20:20:12
inotify: Work around the vput() bug directly
For 15.0, apply a minimal fix which at least ensures that inotify can't
trigger the latent race described in commit 99cb3dca4773 ("vnode: Rework
vput() to avoid holding the vnode lock after decrementing").

Reviewed by:    olce, kib
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D53774
ebc17879f0885ca87644980f6275b9759b311eb3 Mark Johnston 2025-11-15 18:00:44
file: Add a fdclose method
Consider a program that creates a unix socket pair, transmits both
sockets from one to the other using an SCM_RIGHTS message, and then
closes both sockets without externalizing the message.  unp_gc() is
supposed to handle cleanup, but it is only triggered by uipc_detach(),
which runs when a unix socket is destroyed.  Because the two sockets are
internalized, their refcounts are positive, so uipc_detach() isn't
called.

As a result, a userspace program can create an unbounded amount of
garbage without triggering reclaim.  Let's trigger garbage collection
whenever a unix socket is close()d.  To implement this, add new a
fdclose file op and protocol op, and implement them accordingly.  Since
mqueuefs has a hack to hook into the file close path, convert it to use
the new op as well.

Now, userspace can't create garbage without triggering reclamation.

Reviewed by:    glebius, kib
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D53744
1390bba42caf53a00fa370f3844cd7b3725ed4ec Mark Johnston 2025-11-16 15:49:39

Build system

libpam: Don't put man8 in the dev package
These are user-facing manpages, but were installed in the runtime-dev
package since the PAM modules use bsd.lib.mk.  Use MANNODEV instead of
MAN to put them in the base runtime package instead.

Fixes:  https://cgit.freebsd.org/src/commit/?id=031e711647c3 ("packages: Install development manpages in the -dev package")
MFC after:      3 days
Reviewed by:    bapt
Sponsored by:   https://www.patreon.com/bsdivy
Differential Revision:  https://reviews.freebsd.org/D53601
9cf02c38e492dd16b70bfd8203b3f1bc6436e574 Lexi Winter 2025-11-10 10:14:42
libpam: Move to a new "pam" package
OpenPAM is a discrete, largely self-contained system component.
Users may not need PAM for many use-cases (e.g. jails, containers),
so move it to its own package.

Use LIB_PACKAGE to create a separate pam-lib package for libpam,
so that applications that support PAM don't need to bring in all
the PAM modules if PAM isn't actually in use.

Add pam to the minimal sets, since this is a core system component that
people expect to be installed.  This means all supported installation
methods will install the PAM modules by default, so don't add explicit
dependencies on the PAM modules from things that use PAM (e.g. runtime),
allowing custom/embedded systems to omit these easily.

This change adds a new package to the system so, until we have a proper
policy on how to handle this in release/stable branches, it should not
be MFC'd.

MFC after:      never
Reviewed by:    des, bapt
Sponsored by:   https://www.patreon.com/bsdivy
Differential Revision:  https://reviews.freebsd.org/D53602
560af6b43e2a86e591e94bea99777630cd5f84fd Lexi Winter 2025-11-10 10:20:33
Azure: Fix image names
We need to specify the correct image names -- *.vhdf, not *.vhd -- in
order for them to upload.

15.0 candidate

Reviewed by:    lwhsu
MFC after:      2 days
Differential Revision:  https://reviews.freebsd.org/D53684
df84867e8af49437bdc76a0df41d78f5a362cd24 Colin Percival 2025-11-11 02:33:54
dtrace_priv.4: Document the DTrace priv provider
Fixes:        https://cgit.freebsd.org/src/commit/?id=6efcc2f26ab0 Add static tracing for privilege checking
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D53630
7bcd3a04c8695d797665289ed48ff2d84afb8ac4 Mateusz Piotrowski 2025-11-06 23:43:19
Commit group #13: pcic.4: Remove stale manual
pcic.4: Remove stale manual

MFC after:      2 days
Reviewed by:    ziaee
Fixes:          https://cgit.freebsd.org/src/commit/?id=31b35400c (pccard: Remove more of the PC Card)
Discussed with: bsdimp, emaste, jhb
Extracted from: https://reviews.freebsd.org/D53434
1d9f2db7c0b981bf5d45e3ef17dda13b953e1c97 Muhammad Moinur Rahman 2025-11-12 17:33:05

pcic.4: Really remove

MFC after:      2 days
Fixes:          https://cgit.freebsd.org/src/commit/?id=1d9f2db7c (pcic.4: Remove stale manual)
Fixes:          https://cgit.freebsd.org/src/commit/?id=31b35400c (pccard: Remove more of the PC Card)
Reported by:    emaste
6aaf184dc4e294779db7133629b7ae953b4da285 Alexander Ziaee 2025-11-12 18:38:10
queue.3: Add MLINKs for *_EMPTY_ATOMIC
MFC after:    1 week
Fixes:          https://cgit.freebsd.org/src/commit/?id=d2870b8666f2 ("queue: Add atomic variants for *_EMPTY")
1563da200d4d3d56799267f1bbc58933a6c21331 Mark Johnston 2025-11-10 15:30:50
exterror.9 man page
With help from:       mckusick
Reviewed by:    emaste, pauamma_gundo.com
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D53589
0eca7fa1c96f779039dd70eeeb0585ac12d153da Konstantin Belousov 2025-11-04 21:45:55
GitHub: Enclose list of commit hashes in parens
Rather than superscript <sup>, for a nicer looking list.

Reviewed by:    vexeduxr
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D53000
73a4459f6fc76482ea55c5aacb66136c49fb0892 Ed Maste 2025-07-16 14:55:28
tpm: fix the conditional for the arm64 build
The intention was clearly that these ACPI bits would be included for
arm64, but MACHINE_ARCH there is aarch64 -- correct the minor typo to
build everything that should be there.

Fixes:  https://cgit.freebsd.org/src/commit/?id=c2e9c5bbf0229 ("tpm: Refactor TIS and add a SPI attachment")
c490bc73eb68556bc44da9893af9be48a360de8c Kyle Evans 2025-11-15 02:22:11
Use install instead of cp to copy bootstrap tools
We need to preserve modification times on bootstrap tools, but `cp -p`
also tries to preserve flags, which fails if OBJROOT is on NFS.  A -N
option was added to cp for this purpose, but trying to use that would
break cross-building on hosts that don't have that option.  The best
remaining option is `install -p`, which we already assume is present.

PR:             https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=275030
Reviewed by:    imp, emaste
Differential Revision:  https://reviews.freebsd.org/D53751
f3cf4c0af5af6ce95065a615f998117ec1cd63aa Dag-Erling Smørgrav 2025-11-15 03:18:35
GCE: Add TARGET and FS to image family
GCE image family is meant to be unique per set of image characteristics
so that a user can create instances using the image family instead of the
image name to reliably get a similar image with updated software, but no
other changes.

Without this change, the instances create API would select the most recent
non-deprecated image matching the name, regardless of architecture or
filesystem.
fc83e6c5e1f20087314dc52b63e485db87a98b86 Andrew Jorgensen 2025-11-14 18:06:16
Commit group #14: GCE: Specify the architecture of images
GCE: Specify the architecture of images

Without a specified architecture, a user can attempt to create an
arm64 instance with an amd64 image or vice versa. With the change
the API will prevent that mismatch.
0a8ecca4e3156bcd4ebbfcb24d968e67a3a09434 Andrew Jorgensen 2025-11-14 18:06:52

GCE: Don't .error on unsupported targets

We ingest Makefile.gce even when we're not trying to create GCE images
so we don't want to .error here.  Instead, set GCE_ARCH to a dummy
value which should make the problem clear to anyone who attempts to
create GCE images on an unsupported architecture.

Reported by:    Jenkins
Fixes:          https://cgit.freebsd.org/src/commit/?id=0a8ecca4e315 ("GCE: Specify the architecture of images")
787d09753f70bb382a7cbfba742a612fa54069e6 Colin Percival 2025-11-15 15:02:27
vmimage.subr: Log pkg/local.sqlite if pkgbase
We were doing this in vm_extra_install_packages but VM images without
any extra packages installed would not get this installed.  This
results in a pkgbase system which thinks it doesn't have any packages
installed (even though all the files are right there).

Add a "metalog_add_data ./var/db/pkg/local.sqlite" call to the pkgbase
install code path, and make the call from vm_extra_install_packages
conditional on !PKGBASE.

Reported by:    Michael Dexter
MFC after:      immediately (needed for 15.0-RC1)
10a4f2d016dccb5cfa03800bebc09a9b421c4df7 Colin Percival 2025-11-15 21:29:25
Commit group #15: vmimage.subr
vmimage.subr: Enable FreeBSD-base repo if pkgbase

When creating a VM image using pkgbase, create a configuration file in
/usr/local/etc/pkg/repos/FreeBSD.conf which enables the FreeBSD-base
repository.  (This repository is defined in /etc/pkg/FreeBSD.conf as
being disabled by default.)

Reported by:    Mark Millard
MFC after:      immediately (needed for 15.0-RC1)
e0c41af9256b5c5a6c97c85d468ff734e29f1bd5 Colin Percival 2025-11-15 22:00:16

vmimage.subr: autoremove -y

Running 'pkg autoremove' without -y results in VM image builds failing
when (bogusly installed) packages are removed.

Fixes:  https://cgit.freebsd.org/src/commit/?id=6a13aeac3c1f ("vmimage.subr: pkg autoremove after pkg install")
MFC after:      immediately (needed for 15.0-RC1)
509dfd369046ee45b724d119c9eed43228fbb894 Colin Percival 2025-11-16 00:39:58

vmimage.subr: Don't log missing files from pkgs

When installing "extra" packages (aka those built from the ports tree),
we record everything being installed in METALOG.pkg; the contents of
that file is appended to METALOG before we generate the filesystem.

There are two cases when files recorded in METALOG.pkg will no longer
exist by the time we create the final disk image:
1. If a pkg bug results in false dependencies being installed which
are later removed by "pkg autoremove", and
2. If the pkg we build and install from /usr/ports is older than the
pkg on pkg.freebsd.org, and pkg gets upgraded automatically as part of
installing extra packages.

The ultimate issue in both cases is that there's no mechanism for
removing entries from METALOG when we run 'pkg delete'.

Address this build breakage by checking, line by line, if filesystem
objects mentioned in METALOG.pkg exist before appending them to METALOG.

Fixes:  https://cgit.freebsd.org/src/commit/?id=6a13aeac3c1f ("vmimage.subr: pkg autoremove after pkg install")
MFC after:      immediately (needed for 15.0-RC1)
78fa6965e91ec52c24f602250a9d7ec465b9a6ba Colin Percival 2025-11-16 01:19:50

vmimage.subr: Log correct paths into METALOG

Paths all need to start with "./" because that's what newfs wants.

Fixes:  https://cgit.freebsd.org/src/commit/?id=e0c41af9256b ("vmimage.subr: Enable FreeBSD-base repo if pkgbase")
MFC after:      immediately
aa33b6b820e6889a9eb11aa8aec498cb890c589a Colin Percival 2025-11-16 17:12:00
depend-cleanup.sh: Remove everything before the last build epoch.
We were deleting the .a files for llvm when it was build in bootstrap,
but this caused us to rebuild all the bootstrap things since the
bootstrap compiler changed, making the build time 25 minutes instead of
77 seconds on one of my systems. Items before the last rebuild from
scratch epoch are no longer relevant because you have to rebuild
entirely, so the incremental conditions that lead up to them being
needed are no longer true.

Sponsored by:           Netflix
Reviewed by:            jrtc27, emaste
Differential Revision:  https://reviews.freebsd.org/D53693
07e6bfeae5a1cf3266d3859e7a10f426b5d301aa Warner Losh 2025-11-16 04:10:07
depend-cleanup.sh: Add commented example and remove one more entry
Although the epoch is 20250805, the push for that wasn't until 20250814,
so we can remove the 20250813 entry for tcopy, per jrtc27. Also, include
an example of changing a shell script to a binary, since that's
deceptively tricky, though the code looks simple, per emaste.

There should be no functional changes here.

Sponsored by:           Netflix
474d4707e607eedb966685a6e8a2471342c0f23c Warner Losh 2025-11-16 17:28:06

Internal organizational stuff

hifn.4: Really remove
3cf85a69ae7dd909de30ca2b6c95bd2434dc3ce6 Alexander Ziaee 2025-11-12 18:16:25
Add pkgbase signing keys for FreeBSD 15
These keys were generated by cperciva@ using the AWS Key Management
Service.  They will not be used for signing anything other than
FreeBSD 15.x pkgbase repositories.

Keys will be generated for FreeBSD 16 at a later date, and likely in
a different way.

With hat:       re
MFC after:      8 hours (needed in 15.0-RC1)
Differential Revision:  https://reviews.freebsd.org/D53768
b05f38262b58c1e82ad5f076f2b0b9fe08ddc98b Colin Percival 2025-11-15 00:54:17

Testing

Commit group #16: sound tests: Test polling
sound tests: Test polling

Co-authored by: meka@tilda.center
Sponsored by:   The FreeBSD Foundation
MFC after:      2 weeks
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D53188
dd81b19ef23622d03d7c75935e11c2b2af3f4cb8 Christos Margiolis 2025-11-11 12:04:54

sound tests: Fix select(2) arguments

Fixes:          https://cgit.freebsd.org/src/commit/?id=dd81b19ef236 ("sound tests: Test polling")
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
41f2ec3be93a2981e5afcc2569e6abcc64414437 Christos Margiolis 2025-11-11 12:22:13

sound tests: Fix format specified for kevent.data

Reported by:    CI
Fixes:          https://cgit.freebsd.org/src/commit/?id=dd81b19ef236 ("sound tests: Test polling")
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
eb95b990f8ebfb85ce6e4d7d16305746b5eddcde Christos Margiolis 2025-11-11 13:21:22

sound tests: Actually fix format strings

Fixes:          https://cgit.freebsd.org/src/commit/?id=eb95b990f8eb ("sound tests: Fix format specified for kevent.data")
fb99c0ba60dc464aab2102c4395791e151d438c6 Dag-Erling Smørgrav 2025-11-11 15:25:41
stress2: Added a syzkaller reproducer
539726e86d69efdb3003128ff1e0e739aba5f36e Peter Holm 2025-11-12 08:33:15

Style, typos, and comments

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

geom_zero.4: typo
80ca573fc4e65db6f17cb476b6e857fe06b2e3d8 Maxim Konovalov 2025-11-10 01:35:20
hgame.4: typo
8cd9c39195b5fa35ef126a0153d23fbfd60729cf Maxim Konovalov 2025-11-14 04:13:27

Contrib code

MFV: less v685.
MFC after:    3 days
d5cb458b4b58b0f0b3c058a32439f232fd5455ca Xin LI 2025-11-10 08:55:06
vchiq: add compat_freebsd32 ioctls and respective datatypes
Submitted by: Marco Devesas Campos <devesas.campos@gmail.com>
Differential Revision:  https://reviews.freebsd.org/D37879
70e73c43a472e260e8f4b27b65a760643dee85dc Marco Devesas Campos 2025-10-20 02:53:37
edk2: Move ProcessorBind.h to contrib/edk2
Have our own ProcessorBind.h. It just includes sys/efi-edk2.h, but
undefines TRUE, FALSE and MAC. The first two are from acpica and are
redefined to something almost the same. MAC is a global option that,
well, interferes with using EDK2, dangit. I suppose I should redefine it
after, but I don't think you can save the value of a pre-processor
variable.

This breaks a little with the tradition of having this in a seprate
directory and using build magic. However, the build is already magical
enough and having this here makes things less magical. Also, EDK2 puts
this in a processor specific directory, so we won't have conflicts (they
need it there since they run on more processors than we do: we can just
include sys/efi-edk2.h which covers the smallar variance we have in
processors).

Sponsored by:           Netflix
67c7e94315ffeaa55e3dcf2f6066cb8fe483b5c2 Warner Losh 2025-11-16 17:34:33
edk2: Tweak the tests for UEFI Specification Data Type requirements
On x86 these trigger for 32-bit builds. We only ever (will) do that for
the 32-bit loader that starts a 64 bit kernel for ia32. For the moment,
take the training wheels off, though most likely some compile flags need
to be used to change the i386 ABI to force *int64_t alignment to 64
bits or some other horror as yet ill-concieved. Despite this assertion,
the ia32 to boot 64-bit kernels loaders seem to work.

Sponsored by:           Netflix
Differential Revision:  https://reviews.freebsd.org/D53653
473786a131b0546e60fc8330f79e270e145e1bfd Warner Losh 2025-11-16 17:34:58
edk2: Pull in more headers from edk2
Pull in more headers from edk2-stable202502 that will be needed as we
transition the building to using only EDK2 headers in the boot loader,
finally ditching our home-grown ones from a super-obsolete SDK from the
early days of EFI.

Note to future importers: My apologies if this not being a mege commit
causes problems. Except for ProcessorBind.h, all files should be exactly
as we got them from EDK2, and if that breaks the build on future
imports, we should adjust our code.

Sponsored by:           Netflix
Differential Revision:  https://reviews.freebsd.org/D53654
f439973d6726c3be929c8fb3b1545b8b1744abc3 Warner Losh 2025-11-16 17:35:16
tpm20: Bring in the edk2 includes for TPM 2.0 support
Bring these in from edk2-stable202502. They will be used in a
forthcoming TPM 2.0 support code.

Sponsored by:           Netflix
1aa241b4ee657b8a62a0d86b91f82cf792f08dca Warner Losh 2025-11-16 17:36:43

Reverted commits

Commit & revert pair: vnode: Rework vput() to avoid holding the vnode lock after decrementing
vnode: Rework vput() to avoid holding the vnode lock after decrementing

It is not safe to modify the vnode structure after releasing one's
reference.  Modify vput() to avoid this.  Use refcount_release_if_last()
to opportunistically call vput_final() with the vnode lock held since we
need the vnode lock in order to deactivate the vnode, and it's silly to
drop the vnode lock and immediately reacquire it in this common case.

Note that vunref() has a similar flaw.  D52628 aims to fix the problem
more holistically, but this change fixes observable panics in the
meantime.

Reported by:    syzbot+6676b3ff282d590b0fb3@syzkaller.appspotmail.com
Reported by:    syzbot+38e26cf6f959e886f110@syzkaller.appspotmail.com
Reviewed by:    kib
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D52608
99cb3dca4773fe4a16c500f9cb55fcd62cd8d7f3 Mark Johnston 2025-11-11 14:47:06

Revert "vnode: Rework vput() to avoid holding the vnode lock after decrementing"

The change can introduce a deadlock if we release the vnode lock in
order to release a reference, and then end up releasing the final
reference after all, requiring a relock of the vnode.  This relock may
violate the usual parent->child vnode lock order.

This reverts commit 99cb3dca4773fe4a16c500f9cb55fcd62cd8d7f3.

Reported by:    jhb
51931e1f0f33986296ff2860f25374cba47b860a Mark Johnston 2025-11-15 02:30:34

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-18 01:07:56+00:00.

This work is supported by Tarsnap Backup Inc.

Alternate version: 2025-11-10 (debug) (contains info about the classification)