FreeBSD/src 43bbd71 — sys/dev/sound/pci/hda hdaa.c

snd_hda: wake display audio and restore amplifier settings

An Intel display-audio codec was observed to remain in D3 after monitor
sleep on DragonFly BSD. Starting a new stream then produced no sound,
and waking the codec alone left the output pin amplifier muted and other
function configuration unrestored.

Read the audio function power state at stream start. If its requested or
actual state is not D0, use the existing power-up routine before
configuring and starting the stream, then restore the function to a
known state:

Restore selectors, pins, EAPD, GPIO/GPO and direct codec patches, then
replay the cached gain and mute values once the pins are configured.
Split widget configuration out of hdaa_audio_commit() into
hdaa_audio_widget_commit() so the wake path can reuse it without
reinitializing the cached amplifier values. Preserve the existing
volume, mute and forced-mute values.


    [35 lines not shown]
DeltaFile
+67-5sys/dev/sound/pci/hda/hdaa.c
+67-51 files

FreeBSD/src 56b4e68 — sys/sys linker_set.h, tools/build/cross-build/include/mac/sys linker_set.h

linker_set: Remove obsolete macros

Removed ABS_SET, BSS_SET, and SET_ENTRY. They were initially
introduced in v1.1 to be used with a.out file. After the migration
to ELFs they are equivalent to TEXT_SET and DATA_SET.
Furthermore, these macros are never used in the src tree.

Event: Oslo Hackathon 2026
Reviewed by:    des, jhb
Differential Revision:  https://reviews.freebsd.org/D61035
DeltaFile
+0-3tools/build/cross-build/include/mac/sys/linker_set.h
+0-3sys/sys/linker_set.h
+0-62 files

FreeBSD/src 78aab3f — lib/libarchive config_freebsd.h

libarchive: update config_freebsd.h

Fixes: use of external filter programs, tests
MFC after: together with 61c70dc16

(cherry picked from commit d48b93e5e97593b3052684abf3e043a3a1c7822f)
DeltaFile
+4-0lib/libarchive/config_freebsd.h
+4-01 files

FreeBSD/src ad4d9c1 — contrib/libarchive/libarchive archive_read_support_format_iso9660.c archive_read.c, contrib/libarchive/libarchive/test test_read_format_zip_streamable_skip.c test_archive_write_close_callback.c

libarchive: merge from vendor branch

libarchive 3.8.11

ChangeLog:
https://github.com/libarchive/libarchive/compare/v3.8.10...v3.8.11

Obtained from:  libarchive
Vendor commit:  03036ffa409a2aa1c5bbad35be2202641a040fda
MFC after:      3 days

(cherry picked from commit 322d4227521380a61850b3d4f2ebd2b42343a254)
DeltaFile
+170-0contrib/libarchive/libarchive/test/test_write_format_pax_mac_meta.c
+65-98contrib/libarchive/tar/creation_set.c
+98-48contrib/libarchive/libarchive/archive_read.c
+106-0contrib/libarchive/libarchive/test/test_archive_write_close_callback.c
+60-43contrib/libarchive/libarchive/archive_read_support_format_iso9660.c
+99-0contrib/libarchive/libarchive/test/test_read_format_zip_streamable_skip.c
+598-18988 files not shown
+2,556-46994 files

FreeBSD/src a114843 — contrib/libarchive/libarchive archive_read_support_format_rar5.c archive_read.c, contrib/libarchive/libarchive/test test_read_format_7zip.c test_read_format_7zip_deflate_arm64_large.7z.uu

libarchive: merge from vendor branch

libarchive 3.8.10

ChangeLog:
https://github.com/libarchive/libarchive/compare/v3.8.9...v3.8.10

Obtained from:  libarchive
Vendor commit:  0c48412be2d94afe1859a807ea7896a18d8900bd
MFC after:      3 days

(cherry picked from commit 61c70dc16a79efcb9db732d37706cd311f555d9a)
DeltaFile
+1,580-0contrib/libarchive/libarchive/test/test_read_format_7zip_deflate_arm64_large.7z.uu
+556-132contrib/libarchive/libarchive/archive_read_support_format_7zip.c
+521-3contrib/libarchive/libarchive/test/test_read_format_7zip.c
+186-324contrib/libarchive/libarchive/archive_read_support_filter_uu.c
+269-234contrib/libarchive/libarchive/archive_read.c
+339-150contrib/libarchive/libarchive/archive_read_support_format_rar5.c
+3,451-843284 files not shown
+14,057-2,764290 files

FreeBSD/src dbf51f8 — sys/dev/sound/pci envy24ht.c

snd_envy24ht: Fix out-of-bounds DMA buffer indexing

378e0c5c8967 reduced the number of playback channels from 5 to 1. This
introduced a regression, because the global DMA buffer indexing was not
adapted accordingly, which now results in kernel panics because of
out-of-bounds reads into the buffer. Additionally, because of wrong
indexing, recording channels ended up being serviced by the playback
part of envy24ht_intr().

Register 1 recording channel instead of 2 + sc->adcn, as the recording
DMA buffer only has room for 1 stereo stream. With 1 channel per
direction, give each channel the first index of its direction
(ENVY24HT_CHAN_PLAY_DAC1 and ENVY24HT_CHAN_REC_ADC1).

While here, fix the buffer wrap in envy24ht_r16sl(). It has to be
ch->size / ch->unit, but was copied verbatim from the 32-bit equivalent,
whose samples are twice as large, so 16-bit recording wrapped halfway
through the DMA buffer and never read the second half.


    [6 lines not shown]
DeltaFile
+11-22sys/dev/sound/pci/envy24ht.c
+11-221 files

FreeBSD/src 54001c6 — lib/libc/string memset.3

memset.3: Fix .Fn usage and too many commas

Fix wrong usage of .Fn macro in paragraph for `memset_explicit' that
caused too many commas improperly emitted into rendered manual page.

Approved by:    des
MFC after:      1 week

(cherry picked from commit 3479ee8e003b948ee3011d1a88d656add3d1284f)
DeltaFile
+3-2lib/libc/string/memset.3
+3-21 files

FreeBSD/src 2877241 — sys/netpfil/ipfw ip_fw_table_algo.c

ipfw: fix off-by-one error in bdel()

After deleting an item from a sorted array, bdel() moves the tail
following it, but the size of the data to move was calculated with
an off-by-one error, causing memmove() to read one element past the
end of the array. This can happen when the table is full for ifidx
or numarray algorithms.

Obtained from:  Yandex LLC
Sponsored by:   Yandex LLC

(cherry picked from commit c6b08de0e4c797929f4609d86395d494ac695c68)
DeltaFile
+1-1sys/netpfil/ipfw/ip_fw_table_algo.c
+1-11 files

FreeBSD/src 3bcfea6 — sys/netpfil/ipfw ip_fw_table_algo.c

ipfw: fix off-by-one error in bdel()

After deleting an item from a sorted array, bdel() moves the tail
following it, but the size of the data to move was calculated with
an off-by-one error, causing memmove() to read one element past the
end of the array. This can happen when the table is full for ifidx
or numarray algorithms.

Obtained from:  Yandex LLC
Sponsored by:   Yandex LLC

(cherry picked from commit c6b08de0e4c797929f4609d86395d494ac695c68)
DeltaFile
+1-1sys/netpfil/ipfw/ip_fw_table_algo.c
+1-11 files

FreeBSD/src cd4426a — sys/dev/e1000 e1000_defines.h if_em.c

e1000: Separate DH89xxCC memory errors

DH89xxCC shares the 82580 MAC type but reserves several of its memory
error control and status registers.  Accessing the full 82580 register
set breaks normal RX/TX operation on affected adapters.

Give DH89xxCC separate configuration, accounting, and recovery paths.
Use its transmit packet-buffer ECC counter and DMA/LAN parity status
with device-specific masks, avoiding the reserved receive-buffer ECC
and PCIe error registers.  Retain the port-reset sequence for fatal
memory-error recovery without waiting for the absent STATUS.RST_DONE.

Tested by:      chuck2k (https://github.com/opnsense/src/issues/329)
Fixes:          915c628c4f49 ("igb: Report 82580 memory ECC errors")
Sponsored by:   BBOX.io
Differential Revision:  https://reviews.freebsd.org/D61138

(cherry picked from commit 0857b57787cb2bdd2bb123b12638ea5e4c10eabd)
DeltaFile
+144-16sys/dev/e1000/if_em.c
+9-1sys/dev/e1000/e1000_defines.h
+153-172 files

FreeBSD/src 12d2217 — sys/dev/sound/pci hdsp.h hdsp.c

snd_hdsp: Use saved resource IDs on detach

Release resources with the IDs used to allocate them.
Rename irqid to rid to reflect that it stores a resource ID.

This mirrors the corresponding snd_hdspe change.

Sponsored by:   BBOX.io

(cherry picked from commit 96e2a9a40a05716a444dc217629374c387efd159)
DeltaFile
+5-5sys/dev/sound/pci/hdsp.c
+1-1sys/dev/sound/pci/hdsp.h
+6-62 files

FreeBSD/src 94d836a — sys/dev/sound/pci hdspe.h hdspe.c

snd_hdspe: Use saved resource IDs on detach

Release resources with the IDs used to allocate them.
Rename irqid to rid to reflect that it stores a resource ID.

Reviewed by:    br
Sponsored by:   BBOX.io
Differential Revision:  https://reviews.freebsd.org/D58373

(cherry picked from commit d33ab9dae2f5f5421e4cb5a141751924e35eeb2d)
DeltaFile
+5-5sys/dev/sound/pci/hdspe.c
+1-1sys/dev/sound/pci/hdspe.h
+6-62 files

FreeBSD/src 76cb1db — sys/dev/sound/pci hdsp.h hdsp-pcm.c

snd_hdsp: Use busdma for DMA buffers

Program DMA buffer registers with the bus addresses returned by busdma.
Require one full-size contiguous DMA segment per direction and validate
its alignment and 32-bit address range.

Synchronize buffer ownership around playback, capture, clearing, and
teardown.  Disable channels before clearing their DMA buffers, and unwind
partially allocated resources on failure.

This mirrors snd_hdspe's DMA handling, adapted to HDSP's single base
address per direction.

Sponsored by:   BBOX.io

(cherry picked from commit 5355c97e129a004f013570be0b7a99c8610e1757)
DeltaFile
+84-29sys/dev/sound/pci/hdsp.c
+20-4sys/dev/sound/pci/hdsp-pcm.c
+3-0sys/dev/sound/pci/hdsp.h
+107-333 files

FreeBSD/src 06ee388 — sys/dev/sound/pci hdspe.h hdspe-pcm.c

snd_hdspe: Use busdma for DMA buffers

Program DMA pages from busdma segments and synchronize buffer ownership.
Unwind partially allocated resources on failure.

Reviewed by:    br
Sponsored by:   BBOX.io
Differential Revision:  https://reviews.freebsd.org/D58372

(cherry picked from commit 46b338381400cb8106d6d2af945e7950553c16f4)
DeltaFile
+101-31sys/dev/sound/pci/hdspe.c
+20-4sys/dev/sound/pci/hdspe-pcm.c
+5-0sys/dev/sound/pci/hdspe.h
+126-353 files

FreeBSD/src 4c43db6 — sys/dev/sound/pci hdsp-pcm.c

snd_hdsp: Serialize rate and latency updates

Protect running-state checks and register updates with the softc lock.
Keep the pointer reset and the HDSP 9632 frequency rewrite in the same
critical section as the latency update.

Drop the lock around sndbuf_resize(), which may sleep, and recheck the
running state after reacquiring it.  Preserve resize error handling so
that a failed resize leaves the hardware unchanged.

This mirrors the locking in snd_hdspe.

Sponsored by:   BBOX.io

(cherry picked from commit a25ad366d51d52ef30b8bc4e2a7dd377255a409b)
DeltaFile
+16-2sys/dev/sound/pci/hdsp-pcm.c
+16-21 files

FreeBSD/src adc4792 — sys/dev/sound/pci hdspe-pcm.c

snd_hdspe: Serialize rate and latency updates

Protect running-state checks and register updates with the softc lock.

Drop the lock around sndbuf_resize(), which may sleep, and recheck the
running state after reacquiring it.  Keep the resize ahead of the latency
register update so that a failed resize leaves the hardware unchanged.

Reviewed by:    br
Sponsored by:   BBOX.io
Differential Revision:  https://reviews.freebsd.org/D58371

(cherry picked from commit d1dcb2b117a3c128c8e8eda047f93739f06d6099)
DeltaFile
+18-2sys/dev/sound/pci/hdspe-pcm.c
+18-21 files

FreeBSD/src d49c205 — . Makefile.inc1

Makefile.inc1: Make sure mandoc bootstrap tool depends on libz

It links against both libopenbsd and libz, so reflect this in the
bootstrap tool's dependencies in case of races from highly-parallel
builds.

Reported by:    jkh
MFC after:      1 week

(cherry picked from commit 1dbcc7ee92c427480802cd1a40e1a1e3395d9bac)
DeltaFile
+1-1Makefile.inc1
+1-11 files

FreeBSD/src 8f83a7a — . Makefile.inc1

Makefile.inc1: Make bootstrap mandoc's bootstrap libz dependency conditional

We bootstrap libz unconditionally on macOS and Linux, and conditionally
on FreeBSD if pre-1600029 or DISK_IMAGE_TOOLS_BOOTSTRAP is enabled, but
if building on new enough -CURRENT without DISK_IMAGE_TOOLS_BOOTSTRAP
then libz is not bootstrapped and so this libz dependency does not
exist. Add the dependency whenever we are bootstrapping libz but not
otherwise, and do so without duplicating the condition.

Fixes:          1dbcc7ee92c4 ("Makefile.inc1: Make sure mandoc bootstrap tool depends on libz")
MFC after:      1 week

(cherry picked from commit 983cb64c05fabe2b83338d4c2087a9114ed27a1c)
DeltaFile
+6-1Makefile.inc1
+6-11 files

FreeBSD/src c8119d2 — . Makefile.inc1

Makefile.inc1: Make sure mandoc bootstrap tool depends on libz

It links against both libopenbsd and libz, so reflect this in the
bootstrap tool's dependencies in case of races from highly-parallel
builds.

Reported by:    jkh
MFC after:      1 week

(cherry picked from commit 1dbcc7ee92c427480802cd1a40e1a1e3395d9bac)
DeltaFile
+1-1Makefile.inc1
+1-11 files

FreeBSD/src ded58ef — . Makefile.inc1

Makefile.inc1: Make bootstrap mandoc's bootstrap libz dependency conditional

We bootstrap libz unconditionally on macOS and Linux, and conditionally
on FreeBSD if pre-1600029 or DISK_IMAGE_TOOLS_BOOTSTRAP is enabled, but
if building on new enough -CURRENT without DISK_IMAGE_TOOLS_BOOTSTRAP
then libz is not bootstrapped and so this libz dependency does not
exist. Add the dependency whenever we are bootstrapping libz but not
otherwise, and do so without duplicating the condition.

Fixes:          1dbcc7ee92c4 ("Makefile.inc1: Make sure mandoc bootstrap tool depends on libz")
MFC after:      1 week

(cherry picked from commit 983cb64c05fabe2b83338d4c2087a9114ed27a1c)
DeltaFile
+6-1Makefile.inc1
+6-11 files

FreeBSD/src 7806832 — lib/libthr/thread thr_private.h thr_pshared.c

libthr: Cache recent pshared_key

For a pshare key, we can actually cache the last one as a fast path
instead of trapping into kernel directly. It makes sense as a lock and
unlock should be a pair on the same key and at the same time. For
example, lock(A) -> unlock(A) -> lock(B) -> unlock(B). Each unlock is
a hit and refresh later (50% hit).

For a single pshare lock, it is evne a 100% hit as the key never
changed.

For nested lock lock(A) -> lock(B) -> lock(C) -> unlock(C) ->
unlock(B) -> unlock(A). It only cache the last one. However, we should
really think about rewritting this logic as it is a pshare lock shared
by many processes and nested should be uncommon.

Reviewed by:    kib
MFC after:      2 weeks
Differential Revision: https://reviews.freebsd.org/D60957
DeltaFile
+45-4lib/libthr/thread/thr_pshared.c
+4-0lib/libthr/thread/thr_private.h
+49-42 files

FreeBSD/src 9d48e88 — sys/dev/gve gve_tx_dqo.c gve_rx_dqo.c

gve: Page-align DQO descriptor and completion rings

Currently, gve_rx_alloc_ring_dqo() and gve_tx_alloc_ring_dqo() request
CACHE_LINE_SIZE alignment when allocating DMA memory for the DQO TX/RX
descriptor and completion rings. The device requires stronger alignment
than cache line alignment, which was incidentally being met due to how
the kernel allocates memory. Explicitly meet this requirement by
requesting page aligned memory.

Signed-off-by: Tim Hostetler <thostet at google.com>

Reviewed by:    markj, Jasper Tran O'Leary <jtranoleary at google.com>
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D61211
DeltaFile
+2-2sys/dev/gve/gve_tx_dqo.c
+2-2sys/dev/gve/gve_rx_dqo.c
+4-42 files

FreeBSD/src 64ea2b9 — sys/dev/gve gve_main.c gve_adminq.c

gve: Fix AdminQ buffer DMA sync directions

In gve_verify_driver_compatibility(), the driver populates the
gve_driver_info buffer for the device to read. Sync this buffer with
BUS_DMASYNC_PREWRITE instead of BUS_DMASYNC_PREREAD before issuing
the command.

In gve_adminq_describe_device(), the device populates the
gve_device_descriptor buffer for the driver to read. Sync this buffer
with BUS_DMASYNC_PREREAD instead of BUS_DMASYNC_PREWRITE before
issuing the command.

In gve_adminq_get_ptype_map_dqo(), the device populates the
gve_ptype_map buffer for the driver to read. Add the missing
BUS_DMASYNC_PREREAD and BUS_DMASYNC_POSTREAD syncs around the
command.

In normal GCP environments this did not cause a functional failure
because the underlying platforms are DMA cache-coherent and

    [12 lines not shown]
DeltaFile
+5-1sys/dev/gve/gve_adminq.c
+1-1sys/dev/gve/gve_main.c
+6-22 files

FreeBSD/src 12b3c29 — sys/compat/linuxkpi/common/include/linux ioctl.h, sys/dev/sound/pcm mixer.c dsp.c

ioctl: Add a macro for extracting the ioctl number from a command

Sprinkle it in various drivers which hard-coded the command layout.

No functional change intended.

Reviewed by:    dumbbell, emaste
MFC after:      1 week
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D61045
DeltaFile
+6-5sys/dev/syscons/scvesactl.c
+2-2sys/dev/syscons/scvidctl.c
+1-1sys/netgraph/ng_eiface.c
+1-1sys/dev/sound/pcm/mixer.c
+1-1sys/dev/sound/pcm/dsp.c
+1-1sys/compat/linuxkpi/common/include/linux/ioctl.h
+12-111 files not shown
+13-117 files

FreeBSD/src 9ca2cfe — lib/libsecureboot vesigned.c libsecureboot-priv.h

libsecureboot: add support for more signatures

For 2027 we need to support new, stronger signatures and hashes.

Re-work Makefile.inc and local.trust.mk to define
VE_SIGN_URL_LIST or VE_SIGNATURE_LIST (can be derrived from
VE_SIGN_URL_LIST) containing tuples of sig/method/hash/flags and
for VE_SIGN_URL_LIST the same plus /url.

From VE_SIGNATURE_LIST we derrive VE_SIGNATURE_EXT_LIST used to populate
signature_ext_list which defines the order in which we look for
signatures for a manifest.

We also populate signature_info_list which maps a signature ext to the
needed hash and flags to indicate whether that hash needs to be repeated.

verify_sig will lookup signature_info_list, no match means not
supported.  For asc we just call verify_asc() otherwise we call
verify_ec() or verify_rsa() depending on the key type found in the

    [15 lines not shown]
DeltaFile
+90-25lib/libsecureboot/vets.c
+63-31lib/libsecureboot/Makefile.inc
+37-35lib/libsecureboot/local.trust.mk
+44-3lib/libsecureboot/README.rst
+18-0lib/libsecureboot/libsecureboot-priv.h
+1-5lib/libsecureboot/vesigned.c
+253-991 files not shown
+254-1007 files

FreeBSD/src ca19042 — sys/fs/nfsclient nfs_clrpcops.c

nfs_clrpcops.c: Fix typo in commit db8444c1b7e4

Reported by:    markj
MFC after:      1 month
Fixes:  884ee8d6c9b4 ("nfscl: Add some glue for client side NFS over RDMA")
DeltaFile
+1-1sys/fs/nfsclient/nfs_clrpcops.c
+1-11 files

FreeBSD/src 0ecbb75 — sys/compat/linuxkpi/common/src linux_pci.c

LinuxKPI: set pci_dev msi_cap and msix_cap

Linux drivers find their MSI and MSI-X registers through pdev->msi_cap and
pdev->msix_cap, which hold where those capabilities start in PCI config
space.  LinuxKPI never set them, so they stayed 0, and every access meant
for the MSI registers went to the start of config space instead.

Drivers using these fields, e.g. ath11k and amdgpu, are affected.

Fill in both fields from the capability offsets that the native PCI code
already records.

Reviewed by:    dumbbell
Differential Revision:  https://reviews.freebsd.org/D61125
Event: NetApp/Vendor Summit Hackathon 202611
DeltaFile
+2-0sys/compat/linuxkpi/common/src/linux_pci.c
+2-01 files

FreeBSD/src a743c95 — contrib/mandoc test-fgetln.c man-cgi.css

mandoc: Drop obsolete files

These were removed by upstream long ago. Nothing in the
tree uses them.  Remove them to reduce our diff to upstream.

Reviewed by:            carlavilla, wosch
Reported by:            Ingo Schwarze <schwarze at openbsd.org>
Differential Revision:  https://reviews.freebsd.org/D61198
DeltaFile
+0-34contrib/mandoc/manpath.h
+0-13contrib/mandoc/man-cgi.css
+0-11contrib/mandoc/test-fgetln.c
+0-583 files

FreeBSD/src c67e695 — sys/dev/virtio/pci virtio_pci_modern.c

virtio_pci_modern: enable virtqueues before completing attach

Most of our drivers setup interrupt(s) and virtqueues are enabled at
that time, but nothing will currently enable them for devices that we're
only going to poll.  This most notably affects virtio-random, and the
problem can be observed with qemu's q35 emulation and a random device
attached.  The q35 implementation ignores the ring unless it's enabled,
so vtrnd_harvest() will consistently EAGAIN rather than contribute
anything of value, but with this patch it becomes functional.

This can be reproduced with a qemu invocation like so:

qemu-system-x86_64 -machine q35,accel=tcg -cpu max -smp 2 -m 2G \
  -drive file=FreeBSD-16.0-CURRENT-amd64-ufs.qcow2,if=virtio \
  -device pcie-root-port,id=rp1,bus=pcie.0,chassis=1 \
  -object rng-random,id=rng0,filename=/dev/urandom \
  -device virtio-rng-pci,rng=rng0,bus=rp1 \
  -display curses


    [4 lines not shown]
DeltaFile
+10-0sys/dev/virtio/pci/virtio_pci_modern.c
+10-01 files

FreeBSD/src cce5228 — sys/dev/virtio/random virtio_random.c

virtio_random: stop on detach, don't poll

If the device is hung, then polling will block the detach and hang us.
Stop it and drain the queue instead.  This fixes a hang on detach in
some circumstances without the upcoming virtio_pci_modern fix.

Reviewed by:    bnovkov, kfv
Sponsored by:   Stormshield
Sponsored by:   Klara, Inc.
Differential Revision:  https://reviews.freebsd.org/D61051
DeltaFile
+9-3sys/dev/virtio/random/virtio_random.c
+9-31 files