FreeBSD/src f01b594sys/dev/sound/usb uaudio.c

snd_uaudio: recognize hardware sidetone as a monitor

The Logitech H390, for instance, has the following interface layout:

~~
7 INPUT              34 INPUT            10 INPUT
  Mic (0x201)          Mic (0x201)         USB Stream (0x101)
   |                    |                     |
   v                    v                     |
 19 FEATURE           35 FEATURE              |
   |                    |                     |
   v                    v                     |
 25 EXTENSION           +------> 36 MIXER <---+
   |                              |
   v                              v
 13 OUTPUT                     22 FEATURE
 USB Stream (0x101)               |
                                  v
                               16 OUTPUT

    [29 lines not shown]
DeltaFile
+20-2sys/dev/sound/usb/uaudio.c
+20-21 files

FreeBSD/src ea7c339sys/net route.c

routing: Use fib-aware ifa lookup in ifa_ifwithroute()

Use ifa_ifwithaddr_fib() to fix fib-specific ifa lookups with route.

Differential Revision: https://reviews.freebsd.org/D59128
DeltaFile
+1-1sys/net/route.c
+1-11 files

FreeBSD/src 57775b3sys/arm64/iommu smmu.c

arm64/smmu: Fix undefined behaviour in Q_OVF

"1 << 31" is a signed int left shift 31 which is undefined as the shift
is too large. Use an unsigned int to make the value defined.

Sponsored by:   Arm Ltd
DeltaFile
+1-1sys/arm64/iommu/smmu.c
+1-11 files

FreeBSD/src 1ecf7d5sys/arm64/vmm/io vgic_internal.h vgic.c

arm64: vmm: Split out VGIC register handling to a common file

Reviewed by:    Sarah Walker <sarah.walker2 at arm.com>
Sponsored by:   Arm Ltd
DeltaFile
+9-128sys/arm64/vmm/io/vgic_v3.c
+78-1sys/arm64/vmm/io/vgic.c
+49-0sys/arm64/vmm/io/vgic_internal.h
+136-1293 files

FreeBSD/src 7823d30sys/arm64/vmm/io vgic_v3.c vgic_internal.h

arm64: vmm: Move vgic_v3 structures to header file

Move vgic_v3 structures in preparation for vgic interface rework for GICv5
support.

Reviewed by:    Sarah Walker <sarah.walker2 at arm.com>
Sponsored by:   Arm Ltd
DeltaFile
+83-0sys/arm64/vmm/io/vgic_internal.h
+4-49sys/arm64/vmm/io/vgic_v3.c
+87-492 files

FreeBSD/src 8a4fcb6sys/amd64/vmm x86.h x86.c

vmm: Emulate CPUID leaf 1Fh for guests

On an Intel N150 host a guest started with sockets=1, cores=4,
threads=1 reports "1 package(s) x 2 core(s) x 2 hardware threads"
instead of four cores with one thread each, while the host itself
detects its topology correctly.

A FreeBSD guest picks the topology leaf in topo_probe_intel_0xb(),
sys/x86/x86/mp_x86.c, and since 6badb512a94d it prefers leaf 1Fh over
leaf 0Bh whenever cpu_high is 1Fh or higher.  bhyve passes leaf 0
through unmodified, so the guest sees the maximum basic leaf of the
host, which is 1Fh or above on Alder Lake and newer, and takes that
path.  x86_emulate_cpuid(), sys/amd64/vmm/x86.c, derives the topology
from vm_get_topology() for leaves 1, 4 and 0Bh, but has no case for
1Fh, so the request ends up in default_leaf and the host values are
returned verbatim.  The guest therefore enumerates the topology of the
host: with an SMT shift of 1 in the host's leaf 1Fh and four vCPUs this
gives core_id_shift = 1 and pkg_id_shift = 2, which is exactly the
reported 2 cores x 2 threads.  Hosts whose maximum basic leaf is below

    [15 lines not shown]
DeltaFile
+4-1sys/amd64/vmm/x86.c
+1-0sys/amd64/vmm/x86.h
+5-12 files

FreeBSD/src ec58dbausr.bin/mkimg mkimg.c

mkimg: Const correctness for C23

On some platforms, e.g. Linux Clang 22.1.8 / glibc 2.43, strchr()
now implements the C23 behaviour where passing a const pointer to
strchr() also returns a const pointer.  This breaks mkimg during
the bootstrap build, since it assumes the return value is always
a mutable pointer.

Make the existing 'sep' pointer const to fix the first case, and
for the second, introduce a new non-const pointer for strchr,
since we do modify the result in that case.

MFC after:      1 week
Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D58493

(cherry picked from commit 9fd8f5e761ba663c8e99eeff64c5a7fd7bcf1e05)
DeltaFile
+7-7usr.bin/mkimg/mkimg.c
+7-71 files

FreeBSD/src 3dababdusr.bin/rpcgen rpc_main.c rpc_svcout.c

rpcgen: Const correctness for C23

On some platforms, e.g. Linux Clang 22.1.8 / glibc 2.43, strchr()
now implements the C23 behaviour where passing a const pointer to
strchr() also returns a const pointer.  This breaks rpcgen during
the bootstrap build, since it assumes the return value is always
a mutable pointer.

For mkfile_output(), the pointed-to value is never modified, so
fix this by making the pointer const as well.

For open_log_file(), the current code modifies the supposedly const
value in-place to remove the filename suffix, which happens to work
but is wrong even in older versions of C.  Change the code to use a
printf "%.*s" format specifier to strip the suffix instead.

MFC after:      1 week
Reviewed by:    brooks
Sponsored by:   The FreeBSD Foundation

    [3 lines not shown]
DeltaFile
+13-6usr.bin/rpcgen/rpc_svcout.c
+2-1usr.bin/rpcgen/rpc_main.c
+15-72 files

FreeBSD/src 5b466d3usr.bin/xinstall xinstall.c

xinstall: Const correctness for C23

On some platforms, e.g. Linux Clang 22.1.8 / glibc 2.43, strchr()
now implements the C23 behaviour where passing a const pointer to
strchr() also returns a const pointer.  This breaks xinstall during
the bootstrap build, since it assumes the return value is always
a mutable pointer.

As the returned pointer is never used to modify the value, fix this
by making the temporary variable const.

MFC after:      1 week
Reviewed by:    ray, markj, emaste
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D58492

(cherry picked from commit 2296c39a9ebc4f081d90b6554d8839e8cde8490a)
DeltaFile
+2-1usr.bin/xinstall/xinstall.c
+2-11 files

FreeBSD/src 4f5673busr.bin/m4 misc.c

m4: Const correctness for C23

On some platforms, e.g. Linux Clang 22.1.8 / glibc 2.43, strchr()
now implements the C23 behaviour where passing a const pointer to
strchr() also returns a const pointer.  This breaks m4 during the
bootstrap build, since it assumes the return value is always a
mutable pointer.

Since the returned value is never modified, simply make the
temporary const.

MFC after:      1 week
Reviewed by:    bapt, dim
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D58494

(cherry picked from commit 1d94e2e0f2ee21d5a4596efc0570d06e3dea0a6e)
DeltaFile
+1-1usr.bin/m4/misc.c
+1-11 files

FreeBSD/src 9c860aacontrib/elftoolchain/libelftc libelftc_dem_arm.c libelftc_dem_gnu2.c

libelftc: Const correctness for C23

On some platforms, e.g. Linux Clang 22.1.8 / glibc 2.43, strchr()
now implements the C23 behaviour where passing a const pointer to
strchr() also returns a const pointer.  This breaks libelftc during
the bootstrap build, since it assumes the return value is always
a mutable pointer.

Since the returned pointer is never modified in either case, make
it const.

MFC after:      1 week
Reviewed by:    jkoshy, markj, dim, emaste
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D58497

(cherry picked from commit 85b07e977b04fceec84783facdb308492f17b155)
DeltaFile
+2-3contrib/elftoolchain/libelftc/libelftc_dem_gnu2.c
+1-2contrib/elftoolchain/libelftc/libelftc_dem_arm.c
+3-52 files

FreeBSD/src d15778blib/libc/stdlib getopt_long.c getopt.c

libc: getopt{,_long}: Const correctness for C23

On some platforms, e.g. Linux Clang 22.1.8 / glibc 2.43, strchr()
now implements the C23 behaviour where passing a const pointer to
strchr() also returns a const pointer.  This breaks getopt during
the bootstrap build, since it assumes the return value is always
a mutable pointer.

Since the pointed-to value is never modified, fix this by making
the pointer const.

MFC after:      1 week
Reviewed by:    emaste
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D58488

(cherry picked from commit f1d98862044f7748c6f930e9d4339abc166a5b16)
DeltaFile
+1-1lib/libc/stdlib/getopt_long.c
+1-1lib/libc/stdlib/getopt.c
+2-22 files

FreeBSD/src 8c71eb5contrib/libucl/src ucl_util.c

libucl: Const correctness for C23

On some platforms, e.g. Linux Clang 22.1.8 / glibc 2.43, strchr()
now implements the C23 behaviour where passing a const pointer to
strchr() also returns a const pointer.  This breaks libucl during
the bootstrap build, since it assumes the return value is always
a mutable pointer.

Instead of assigning directly to params->prefix (which is const),
use a non-const temporary variable and assign the result after
we've done the modification.

MFC after:      1 week
Reviewed by:    bofh, bapt
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D58490

(cherry picked from commit bcee560d390eb8aa8fd0f08a7a0bffb6e77fffc6)
DeltaFile
+4-3contrib/libucl/src/ucl_util.c
+4-31 files

FreeBSD/src 198ab9econtrib/mandoc mdoc.c out.c

mandoc: Const correctness for C23

On some platforms, e.g. Linux Clang 22.1.8 / glibc 2.43, strchr()
now implements the C23 behaviour where passing a const pointer to
strchr() also returns a const pointer.  This breaks mandoc during
the bootstrap build, since it assumes the return value is always
a mutable pointer.

In read.c, make the existing temporary pointer const, and for the
mandoc_asprintf() call, add a new mutable local.

In mdoc.c and out.c, since the data is mutable and is mutated here,
remove const from the temporary pointers.

MFC after:      1 week
Reviewed by:    fuz
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D58495

(cherry picked from commit 9f18614d5353ce513511ccbf59d09e76c93f7bc9)
DeltaFile
+6-4contrib/mandoc/read.c
+2-2contrib/mandoc/out.c
+1-2contrib/mandoc/mdoc.c
+9-83 files

FreeBSD/src 876f29dusr.bin/sort sort.c

sort: Const correctness for C23

On some platforms, e.g. Linux Clang 22.1.8 / glibc 2.43, strchr()
now implements the C23 behaviour where passing a const pointer to
strchr() also returns a const pointer.  This breaks sort during
the bootstrap build, since it assumes the return value is always
a mutable pointer.

As the returned pointer is never used to modify the value, fix this
by making the temporary variable const.

MFC after:      1 week
Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D58491

(cherry picked from commit 78f842dda35b7280e8682f90506ff05b591c6b3a)
DeltaFile
+1-1usr.bin/sort/sort.c
+1-11 files

FreeBSD/src 3180d4d. Makefile.in configdata.pm, crypto/aes aes_x86core.c

openssl: import 3.0.22

This change adds OpenSSL 3.0.22 from upstream [1].

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

This is a security patch release. The highest severity issue is medium.

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

Updated via [5] with `update_openssl.sh 3.0.22`.

1. https://github.com/openssl/openssl/releases/download/openssl-3.0.22/openssl-3.0.22.tar.gz
2. https://github.com/openssl/openssl/releases/download/openssl-3.0.22/openssl-3.0.22.tar.gz.asc
3. https://github.com/openssl/openssl/releases/download/openssl-3.0.22/openssl-3.0.22.tar.gz.sha256
4. https://github.com/openssl/openssl/blob/openssl-3.0.22/NEWS.md
5. https://codeberg.org/ngie/freebsd-powertools:shell/update_openssl.sh@c2f51140
DeltaFile
+0-34,159Makefile
+0-32,703configdata.pm
+0-11,231Makefile.in
+0-870crypto/aes/aes_x86core.c
+622-3test/evp_extra_test.c
+396-1test/endecode_test.c
+1,018-78,967125 files not shown
+3,685-79,452131 files

FreeBSD/src 185f1a1crypto/aes aes_x86core.c, doc/man3 X509_verify_cert.pod

openssl: import 3.5.8

This change adds OpenSSL 3.5.8 from upstream [1].

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

This is a security patch release. The highest severity issue is medium.

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

Updated via [5] with `update_openssl.sh 3.5.8`.

1. https://github.com/openssl/openssl/releases/download/openssl-3.5.8/openssl-3.5.8.tar.gz
2. https://github.com/openssl/openssl/releases/download/openssl-3.5.8/openssl-3.5.8.tar.gz.asc
3. https://github.com/openssl/openssl/releases/download/openssl-3.5.8/openssl-3.5.8.tar.gz.sha256
4. https://github.com/openssl/openssl/blob/openssl-3.5.8/NEWS.md
5. https://codeberg.org/ngie/freebsd-powertools:shell/update_openssl.sh@c2f51140
DeltaFile
+0-867crypto/aes/aes_x86core.c
+851-3test/evp_extra_test.c
+394-125test/evp_extra_test2.c
+476-32test/endecode_test.c
+439-61doc/man3/X509_verify_cert.pod
+337-5test/radix/quic_tests.c
+2,497-1,093256 files not shown
+8,213-2,267262 files

FreeBSD/src 132e609sys/dev/igc if_igc.h

igc: Restore the watchdog event counter

The MFC of the fatal memory-error recovery dropped watchdog_events from
the softc.  The driver still increments it, includes it in
IFCOUNTER_OERRORS, and exports it as the watchdog_timeouts sysctl.

Fixes: ee9bbfca423f ("igc: Recover from fatal internal memory errors")
DeltaFile
+1-0sys/dev/igc/if_igc.h
+1-01 files

FreeBSD/src 87b9783sys/net iflib.c ifdi_if.m

iflib: Allow conditional LED device support

A driver class may implement LED control even though the capability is
not available on every device or firmware version it supports.  Add an
optional capability method and consult it before creating the led(4)
device.  Default to supported so existing providers are unchanged.

This will be used by bnxt which blends PF and VF in the same driver.

(cherry picked from commit 2519e19f05e0c3e5925bf81b729b4c28f2ad1af6)
DeltaFile
+10-0sys/net/ifdi_if.m
+1-1sys/net/iflib.c
+11-12 files

FreeBSD/src b730642sys/dev/igc if_igc.h if_igc.c

igc: Report corrected internal ECC errors

I225 and I226 do not interrupt for corrected internal ECC errors.
Instead, the DMA packet buffer and PCIe memories expose sticky status
bits in PBECCSTS and PCIEECCSTS.

Sample these bits with the regular hardware statistics update, preserve
the PBECCSTS ECC enable state while clearing its RW1C indication, and
expose separate counters for the DMA packet buffer, PCIe transmit-data
memory, and PCIe retry buffer.

These counters represent observed indications rather than an exact error
count because multiple corrections between samples collapse into one
sticky status bit.

Hardware validation used an I225-IT (rev 3) and a debug kernel that
wrote only the documented self-clearing injection bits.  Each test
armed the injector, exercised the owning RAM with traffic, and compared
the corresponding counter before and after.

    [15 lines not shown]
DeltaFile
+40-0sys/dev/igc/if_igc.c
+3-0sys/dev/igc/if_igc.h
+43-02 files

FreeBSD/src 7b48d8dsys/dev/igc igc_regs.h if_igc.h

igc: Recover from fatal internal memory errors

I225 and I226 report uncorrectable internal memory errors through
ICR.FER and identify the affected region in PEIND.  Depending on the
region, hardware stops transmit or all PCIe and DMA traffic until the
port is reset and reinitialized.

Enable the fatal error interrupt and capture its read clear status in
the interrupt filter.  Mask the cause while an iflib reset is pending,
report the affected memory regions, and expose per region indication
counters.

PCIe region parity failures require a different recovery order from a
normal reset: assert DEV_RST, wait at least 3 ms, disable PCIe master
requests, clear PCIEERRSTS, and then reinitialize the port.  Follow that
sequence before entering the normal reset path and clear the remaining
LAN status afterward.

The I225/I226 PBECCSTS layout is unrelated to the PCH layout previously

    [21 lines not shown]
DeltaFile
+221-5sys/dev/igc/if_igc.c
+20-5sys/dev/igc/igc_defines.h
+10-0sys/dev/igc/if_igc.h
+7-2sys/dev/igc/igc_regs.h
+258-124 files

FreeBSD/src 7ac83b9sys/dev/ixgbe ixgbe.h if_ix.c

ixgbe: Defer E610 thermal shutdown to iflib

The E610 firmware event handler invoked ixgbe_if_stop() directly from
IFDI_UPDATE_ADMIN_STATUS().  This reset the device without the iflib
queue lifecycle and left the interface marked running after its hardware
was stopped.

Request an iflib reset instead.  Fail the automatic initialization once
so the reset transaction stops the interface and publishes that state.
A later operator-requested initialization remains possible, matching the
previous recovery policy without bypassing iflib.

(cherry picked from commit 3aac283613bd3fd0228a06d6c854ca0bf190ecfb)
DeltaFile
+14-5sys/dev/ixgbe/if_ix.c
+1-0sys/dev/ixgbe/ixgbe.h
+15-52 files

FreeBSD/src f89ea9esys/dev/ixgbe if_ix.c

ixgbe: Defer firmware recovery transitions to iflib

The firmware-mode callout invoked ixgbe_if_stop() directly.  This
performed a full device reset without the iflib context lock or the
iflib queue lifecycle.  It could also poll the E610 firmware command
interface from callout context while identification was active.

Request an iflib reset from the callout instead.  Reject initialization
while firmware recovery remains active.  This leaves the interface
stopped and lets iflib publish that state.  Request initialization when
firmware exits recovery so an administratively-up interface can recover
without operator intervention.

(cherry picked from commit 43aa553ef45a4345bdfabadae40d811730151144)
DeltaFile
+12-4sys/dev/ixgbe/if_ix.c
+12-41 files

FreeBSD/src 16b31a1sys/dev/ixgbe ixgbe_type.h ixgbe.h

ixgbe: Defer ECC recovery to iflib

The link interrupt filter performed a full hardware reset in interrupt
context.  This bypassed iflib stop and initialization, including queue
quiescence and restoration of temporary LED state.

Record the ECC event in the administrative request mask and ask iflib
to perform the reset from its taskqueue.  Keep the ECC cause masked
until reset so the intermediate admin pass cannot re-enable a sticky
condition.  Handle ECC independently of Flow Director and in legacy
interrupt mode.

Remove the redundant EICR write; the filter has already cleared the
reported causes.  Also remove the accompanying complement-mask update
of mac.flags.  It set every flag except DOUBLE_RESET_REQUIRED and had
no place in ECC recovery.

(cherry picked from commit c28f2c551daf07345ac78b74459efe1014c49464)
DeltaFile
+40-14sys/dev/ixgbe/if_ix.c
+1-0sys/dev/ixgbe/ixgbe_type.h
+1-0sys/dev/ixgbe/ixgbe.h
+42-143 files

FreeBSD/src 553667cshare/man/man4 ixl.4, sys/dev/ixl ixl_pf_iflib.c ixl_pf.h

ixl: Add led(4) identification support

Expose each physical port identification LED through /dev/led/ixl*.
Use the existing GPIO LED helpers for most devices and the PHY
provisioning interface for X710 10GBASE-T adapters.

Preserve and restore the original GPIO or PHY indication mode,
including before the interface is stopped.

(cherry picked from commit 8b2e75970c0328e7397290417cc06e9d9c763d2a)
DeltaFile
+77-1sys/dev/ixl/if_ixl.c
+6-1share/man/man4/ixl.4
+5-0sys/dev/ixl/ixl_pf.h
+2-0sys/dev/ixl/ixl_pf_iflib.c
+90-24 files

FreeBSD/src d7bed48share/man/man4 ix.4, sys/dev/ixgbe ixgbe.h if_ix.c

ixgbe: Add led(4) identification support

Expose the physical port identification LED through /dev/led/ix*.
Save and restore the NVM-selected LEDCTL value around each request.
The X550 operations also clear their PHY manual override before the
register is restored.

Use the dedicated firmware port-identification command on E610.  Its
interface selects between firmware blinking and the original mode
rather than directly controlling LEDCTL.

Restore the normal indication before a device stop or reset.

(cherry picked from commit fb7e249ce4fd03fe53e4407efe661f9e94852bb6)
DeltaFile
+54-0sys/dev/ixgbe/if_ix.c
+6-1share/man/man4/ix.4
+2-0sys/dev/ixgbe/ixgbe.h
+62-13 files

FreeBSD/src 9fbf429sys/dev/igc if_igc.c

igc: Remove invalid debug ring pointer iteration

The debug routine reads queue registers by queue index.  It also
advanced unused pointers to rings embedded in queue structures.  Those
pointers had the wrong stride and could proceed beyond the ring object.

Remove the unused pointer arithmetic.

(cherry picked from commit 423927d6c3dc87628fc2a19f25b5b5c07b3b73e2)
DeltaFile
+2-4sys/dev/igc/if_igc.c
+2-41 files

FreeBSD/src b06e426sys/dev/e1000 if_em.c

e1000: Fix the multiqueue debug register dump

The debug routine advanced ring pointers as if rings were contiguous.
They are embedded in queue structures, so rings beyond queue zero had
the wrong stride.  The bogus queue index could cause an invalid MMIO
read and panic the machine.

Index the queue arrays first and then select the embedded ring.

(cherry picked from commit 7dd826171b69a01c234ba6e9117917398ba2705e)
DeltaFile
+6-4sys/dev/e1000/if_em.c
+6-41 files

FreeBSD/src 9d5a148sys/dev/e1000 if_em.c

e1000: Identify SerDes adapters with LED blink

The generic LED on and off operations do not handle internal SerDes
media, leaving the led(4) device ineffective on my I210 fiber port.

Use the hardware blink operation for the on phase on internal SerDes.
The off phase restores the saved OEM LED configuration as before.

(cherry picked from commit 28f96cc3748fc46408cc6ab6172f09bc2182cad7)
DeltaFile
+4-1sys/dev/e1000/if_em.c
+4-11 files

FreeBSD/src 34817fashare/man/man4 igc.4, sys/dev/igc if_igc.h igc_defines.h

igc: Add led(4) identification support

I225 and I226 expose three programmable LED outputs.  Use LED1 for
adapter identification, following the convention in DPDK.  Preserve the
OEM configuration across identification requests.

Restore the OEM configuration before a device reset so an active led(4)
pattern cannot leave the output overridden across stop or detach.

The LED mode values follow the Intel I225 Software User Manual.

(cherry picked from commit 19f75b38199b9d30e85fab83e61ff36b0b9ed015)
DeltaFile
+45-0sys/dev/igc/if_igc.c
+9-1share/man/man4/igc.4
+5-2sys/dev/igc/igc_defines.h
+2-2sys/dev/igc/if_igc.h
+61-54 files