FreeBSD/src 29449b3 — sys/dev/sound/pci/hda hdaa.c

snd_hda: use the pin ELD to select DisplayPort audio framing

hdaa_audio_setup() reads the converter widget's ELD when choosing
between HDMI and DisplayPort audio infoframes. ELD is stored on the
output pin, so the converter has no ELD and the driver selects HDMI
framing even when the connected display uses DisplayPort.

Read the ELD from the output pin to select the correct audio framing.

The equivalent change was tested on DragonFly BSD with an Intel Kaby
Lake display-audio codec and an LG HDR 4K monitor connected over
DisplayPort. Before the change, converter node 2 had no ELD, while
output pin 5 had an 83-byte ELD identifying DisplayPort. Captured driver
commands programmed HDMI audio infoframe bytes (84 01 0a 70 01 00 00
00). After applying the change and rebooting, the commands used the
existing DisplayPort form (84 1b 44 01 00 00 00), and console tones and
desktop audio were audible.

PR:             299094

    [4 lines not shown]
DeltaFile
+2-2sys/dev/sound/pci/hda/hdaa.c
+2-21 files

FreeBSD/src fa4f5cc — share/man/man4 pcm.4, sys/dev/sound/pcm channel.c

pcm.4: Remove DIAGNOSTICS section

These diagnostics do not exist anymore.

MFC after:      1 week

(cherry picked from commit 25faf861089ca119528ea4da39fe594b1c5ca55a)
DeltaFile
+1-9share/man/man4/pcm.4
+1-1sys/dev/sound/pcm/channel.c
+2-102 files

FreeBSD/src 680957e — libexec/rc/rc.d mountd

rc.d/mountd: Do not require /etc/exports

mountd exits if it cannot read any exports files. Requiring
/etc/exports, however, unconditionally stops mountd from starting on a
server that exports ZFS datasets only (/etc/zfs/exports).

Let sbin/mountd handle requirements itself, instead of hardcoding
/etc/exports, which is also wrong, because different files can be
specified in mountd_flags.

This patch also works with nfsv4_server_enable="YES", by preserving the
behavior of failing to start if there is no "V4:" line in the exports
file, which is missing by default on ZFS-only exports.

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

(cherry picked from commit 26203cca52621c215f60640bf59128dcd9780be7)
DeltaFile
+0-1libexec/rc/rc.d/mountd
+0-11 files

FreeBSD/src 4b3c29b — sys/kern vfs_vnops.c

kern/coredump_vnode.c: avoid dumping to the mount point we suspended

PR:     299095

(cherry picked from commit bea382f25b16fec0e9a1c2be130935e739075287)
DeltaFile
+45-1sys/kern/vfs_vnops.c
+45-11 files

FreeBSD/src d123138 — sys/kern vfs_vnops.c coredump_vnode.c, sys/sys vnode.h

vn_open_cred(): rename VN_OPEN_NAMECACHE flag to VN_OPEN_COREDUMP

(cherry picked from commit ccd44c5e4881ece004fa23d3b479d4ee57b2a58e)
DeltaFile
+2-2sys/kern/coredump_vnode.c
+1-1sys/sys/vnode.h
+1-1sys/kern/vfs_vnops.c
+4-43 files

FreeBSD/src c556f4e — sys/fs/nfs nfs_var.h, sys/fs/nfsclient nfs_clrpcops.c nfs_clcomsubs.c

nfscl: Fix oddball cases for session slot release

We have identified some cases where silent slot loss can occur
when operations on NFS mounts are aborted. We experience this
when using NFSv4.2, but it likely also occurs with NFSv4.1.

A slot is acquired for compound operations by nfsv4_setsequence()
and freed by newnfs_request(). Any call path that abandons the
compound before reaching newnfs_request() loses the slot permanently.

We identified four call sites where this happens, one of
which where it actually does happen for us in a semi-reproducible
way, which allowed us to develop a candidate patch, attached.

The patch adds one function, nfsv4_freeunsentslot(), to
nfs_clcomsubs.c. It is called from each of the four call
sites: nfsrpc_writerpc(), nfsrpc_writeds(), and two in
nfsrpc_setextattr().


    [11 lines not shown]
DeltaFile
+18-0sys/fs/nfsclient/nfs_clcomsubs.c
+4-0sys/fs/nfsclient/nfs_clrpcops.c
+2-0sys/fs/nfs/nfs_var.h
+24-03 files

FreeBSD/src cfd0d2c — sys/fs/nfs nfs_var.h, sys/fs/nfsclient nfs_clrpcops.c nfs_clcomsubs.c

nfscl: Fix oddball cases for session slot release

We have identified some cases where silent slot loss can occur
when operations on NFS mounts are aborted. We experience this
when using NFSv4.2, but it likely also occurs with NFSv4.1.

A slot is acquired for compound operations by nfsv4_setsequence()
and freed by newnfs_request(). Any call path that abandons the
compound before reaching newnfs_request() loses the slot permanently.

We identified four call sites where this happens, one of
which where it actually does happen for us in a semi-reproducible
way, which allowed us to develop a candidate patch, attached.

The patch adds one function, nfsv4_freeunsentslot(), to
nfs_clcomsubs.c. It is called from each of the four call
sites: nfsrpc_writerpc(), nfsrpc_writeds(), and two in
nfsrpc_setextattr().


    [11 lines not shown]
DeltaFile
+18-0sys/fs/nfsclient/nfs_clcomsubs.c
+4-0sys/fs/nfsclient/nfs_clrpcops.c
+2-0sys/fs/nfs/nfs_var.h
+24-03 files

FreeBSD/src fe90f18 — sys/kern subr_epoch.c

epoch: Queue drain callbacks from each CPU's callback task

epoch_drain_callbacks() bound the calling thread to each CPU in turn
to queue a callback on that CPU's record.  Callers are often user
threads, such as kldunload or ifconfig destroy, and ULE does not
preempt a CPU-bound thread for a migrating thread of no better
priority, so each bind could wait out a time slice.  On an 8-CPU VM
with six busy loops running, destroying an epair interface took 1.5 s
and kldunload pflow 0.8 s.

Instead, set a request flag on each record and enqueue that CPU's
callback task, which queues the callback before it polls the record.
The task runs on the CPU's softirq gtaskqueue thread at PI_SOFT, which
preempts a busy user thread, so the request is served at once; the
caller no longer migrates.  Both operations now take under 10 ms, idle
or under load.

Reviewed by:            markj
Sponsored by:           Rubicon Communications, LLC ("Netgate")
Differential Revision:  https://reviews.freebsd.org/D60646
DeltaFile
+19-42sys/kern/subr_epoch.c
+19-421 files

FreeBSD/src 34e92fb — libexec/rc hooks.sh

hooks.sh allow running DebugO{n,ff} from hooks_run

We need to watch out for _debugO{n,ff}_hooks.

Also add add_list (hook lists are just lists).

Fix bug in hooks_has() - should look for $2 in list.
DeltaFile
+32-3libexec/rc/hooks.sh
+32-31 files

FreeBSD/src 4a65e12 — share/dict web2

dict: Add "macho"

Macho is a perfectly cromulent word, in both Merriam-Webster and OED.

Reviewed by:    imp
Differential Revision: https://reviews.freebsd.org/D60713
DeltaFile
+1-0share/dict/web2
+1-01 files

FreeBSD/src 9fd9039 — tests/sys/netinet6 ra.py ndp.sh

tests: Add SLAAC interface identifier cases to ndp.sh

Cover the interface identifier selection in in6_ifadd(): a /64
link-local address provides the identifier, while a /128 link-local
address or no link-local address at all yields the EUI-64 identifier
derived from the MAC address.  Each case asserts the exact
autoconfigured address.  ndp_prefix_len_mismatch reaches the same
fallback with a /127 link-local address, but only checks that some
address was configured.

Stable addresses (RFC 7217) are the default and bypass both paths, so
the host disables them.  The advertisement goes to all nodes, and an
interface only joins that group with its first address, so the case
without a link-local address gives the host a static address from
another prefix.

ra.py now takes the Ethernet source address from --sendif rather than
from a route lookup; for ff02::1 that lookup fails in scapy 2.7.0.


    [4 lines not shown]
DeltaFile
+159-0tests/sys/netinet6/ndp.sh
+1-1tests/sys/netinet6/ra.py
+160-12 files

FreeBSD/src 064edc2 — libexec/rc debug.sh

debug.sh avoid trouble from set -e

The setting of _TTY ran afoul of set -e.

Also the handling of Myname blew up if debug.sh included by
a login sheel (eg in .profile).

For non-posix shell, leave false alone if it is a builtin.
DeltaFile
+17-7libexec/rc/debug.sh
+17-71 files

FreeBSD/src 5efc40d — libexec/rc safe_eval.sh

safe_eval.sh: safe_set_var add allow list for values

Complete the controls with -v "values":

sh ./safe_eval.sh set_var -a "knob" -v "no yes" knob=yes knob=no knob=ok ok=yes
knob=yes
knob=no
denied value 'ok' for 'knob'
denied variable 'ok'
DeltaFile
+22-6libexec/rc/safe_eval.sh
+22-61 files

FreeBSD/src cd96657 — sys/dev/amdsmu amdsmu.c

amdsmu: Print how long system spent in S0i3

It's practical to have this printed out proactively, at least while this
is still very experimental.

Sponsored by:   The FreeBSD Foundation
DeltaFile
+5-1sys/dev/amdsmu/amdsmu.c
+5-11 files

FreeBSD/src 84f790e — sys/dev/wg if_wg.c, sys/net if_gif.c if_ovpn.c

ip_encap: Recompute flowid for packets received over tunnel

Packets decapsulated by a tunnel interface carry the NIC's flowid
computed over the outer tunnel tuple, which is the same for every
flow a peer carries. Therefore mpath nhop selection places all
traffic on one path.

Add encap_set_flowid() to ip_encap.c, which rehashes a decapsulated
IP packet on its inner addresses.

The feature is off by default and is enabled with the per-vnet
net.route.hash_inbound sysctl.

Reviewed by:    gallatin
Differential Revision:  https://reviews.freebsd.org/D60552
DeltaFile
+52-0sys/netinet/ip_encap.c
+7-0sys/netinet/ip_encap.h
+3-0sys/net/if_ovpn.c
+3-0sys/net/if_geneve.c
+3-0sys/dev/wg/if_wg.c
+2-0sys/net/if_gif.c
+70-01 files not shown
+72-07 files

FreeBSD/src 90c8c8e — sys/netinet in.h

netinet: garbage collect __IPPROTO_DIVERT
DeltaFile
+0-2sys/netinet/in.h
+0-21 files

FreeBSD/src a20bbab — sys/netpfil/ipfw ip_fw_private.h

ipfw: re-arrange declarations so that they match comments

No functional change.
DeltaFile
+9-8sys/netpfil/ipfw/ip_fw_private.h
+9-81 files

FreeBSD/src 0571d8a — sys/powerpc/powerpc swtch64.S swtch32.S

powerpc: Avoid deadlock when CPUs exchange threads

The PowerPC context switch waited for the incoming thread to leave
blocked_lock before releasing the outgoing thread.  If two CPUs selected
each other's running threads concurrently, both CPUs waited for the
other to perform the release and neither could progress.  This appeared
as intermittent boot hangs under QEMU MTTCG when taskqueue threads were
bound to opposite CPUs.

8df2e5421468 ("powerpc: put the isync inside the TD_LOCK()...")
attempted to fix the same hang by moving isync into the polling loop.
That did not address the circular wait: isync cannot cause either CPU to
execute the release store after the loop.  It only added context
synchronization to failed iterations and changed timing. Move isync back
to the successful exit, which preserves acquire ordering for subsequent
context loads.

Match the ordering used by other architectures: publish the outgoing
thread's new lock before waiting for the incoming thread.  Apply the

    [20 lines not shown]
DeltaFile
+11-7sys/powerpc/powerpc/swtch64.S
+11-7sys/powerpc/powerpc/swtch32.S
+22-142 files

FreeBSD/src b6a34e8 — share/misc committers-ports.dot

committers-ports.dot: Restore ahze from alumni

Move back to the current committers section and record acm and dtxdf
as mentors.

Approved by:    dtxdf (mentor)
Differential Revision:  https://reviews.freebsd.org/D60683
DeltaFile
+4-1share/misc/committers-ports.dot
+4-11 files

FreeBSD/src 5fb07bb — lib/libthr libthr.3, lib/libthr/thread thr_init.c

libthr: Fix LIBPTHREAD_QUEUE_FIFO range

LIBPTHREAD_QUEUE_FIFO is used in bitwise offset, we set the limit to
0~31 so that it won't cause undefined behavior. Also, create a new
helper function to do getenv++strtol directly and check the boundary of
the valid value.

Reviewed by:    kib
MFC after:      2 weeks
Differential Revision: https://reviews.freebsd.org/D60487
DeltaFile
+24-9lib/libthr/thread/thr_init.c
+2-2lib/libthr/libthr.3
+26-112 files

FreeBSD/src 23626eb — sys/compat/linprocfs linprocfs.c

linux: cap mount id to INT_MAX

linux stores mount id as a int32_t, using xor would make it becomes
negative in some cases. As a result, we cap the value to INT_MAX to
prevent getting a negative value from userspace.

MFC after:      2 weeks
Differential Revision: https://reviews.freebsd.org/D59202
DeltaFile
+2-1sys/compat/linprocfs/linprocfs.c
+2-11 files

FreeBSD/src 68831d2 — sys/netpfil/pf pf_ioctl.c

pf: Register the netlink family only while the vnets are set up

pf_modevent() registers the generic netlink family at MOD_LOAD, before
vnet_pf_init() has set up the state hashes and locks the handlers use,
and pf_unload() unregisters it after vnet_pf_uninit() has torn them
down.  Sending PFNL_CMD_GETSTATES while pf loads or unloads panics in
pf_handle_getstates() on a NULL or freed V_pf_idhash.

Register the family from a SYSINIT ordered after vnet_pf_init(), and
unregister it from the matching SYSUNINIT, before vnet_pf_uninit().

Reviewed by:            kp
Fixes:                  2cef62886dc7 ("pf: convert state retrieval to netlink")
MFC after:              1 week
Sponsored by:           Rubicon Communications, LLC ("Netgate")
Differential Revision:  https://reviews.freebsd.org/D60651
DeltaFile
+20-3sys/netpfil/pf/pf_ioctl.c
+20-31 files

FreeBSD/src da4b59f — contrib/wpa/src/ap ieee802_11.c, contrib/wpa/src/common proximity_ranging.c qca-vendor.h

wpa: Update to 2.12

Fixes and new features include:

hostapd:
* support RSN overriding (e.g., WPA3-Personal Compatibility Mode)
* EHT/IEEE 802.11be/Wi-Fi 7
  - more complete support
  - fix message validation issues that could enable DoS attacks
  - fix group key rekeying
* enable SAE group 20 by default if SAE-EXT-KEY is enabled
* reject unexpected SAE password identifier to avoid DoS attack against
  a specific STA
* mandate use of SAE H2E when using password identifiers
* assign VLAN when using SAE with PMKSA caching
* support SPP A-MSDU negotiation
* support IEEE 802.11bi functionality
  - changing SAE password identifiers
  - EPPKE

    [52 lines not shown]
DeltaFile
+6,124-33contrib/wpa/src/common/qca-vendor.h
+5,003-0contrib/wpa/wpa_supplicant/nan_supplicant.c
+3,381-671contrib/wpa/src/drivers/driver_nl80211.c
+3,106-664contrib/wpa/src/ap/ieee802_11.c
+3,677-0contrib/wpa/src/nan/nan.c
+2,707-0contrib/wpa/src/common/proximity_ranging.c
+23,998-1,368330 files not shown
+89,793-24,630336 files

FreeBSD/src 8d1a813 — contrib/wpa/src/utils os_unix.c

wpa: Diff reduction with upstream

I inadvertantly added gratuitous changes to upstream. Revert the
gratuitous parts of 676041c41ba5

Suggested by: cy
Fixes: 676041c41ba5
Sponsored by: Netflix
(cherry picked from commit cab9ccf3ff8c5722dace61a814d791aeba2751c6)
DeltaFile
+2-2contrib/wpa/src/utils/os_unix.c
+2-21 files

FreeBSD/src 1efafdc — contrib/wpa/src/utils os_unix.c

WPA: Allow CLOCK_BOOTTIME and CLOCK_MONOTONIC to #define the same

Historically, these have been differnet values, and only one was defined
or they were defined as different values. Now that they are about to be
the same value, add #ifdef to cope.

Sponsored by:           Netflix
Reviewed by:            olce, val_packett.cool, adrian
Differential Revision:  https://reviews.freebsd.org/D45418

(cherry picked from commit 676041c41ba587285bb934aa2fca290ea7208038)
DeltaFile
+8-3contrib/wpa/src/utils/os_unix.c
+8-31 files

FreeBSD/src 3e4c62b — contrib/wpa/src/ap ieee802_11.c, contrib/wpa/src/common proximity_ranging.c qca-vendor.h

wpa: Update to 2.12

Fixes and new features include:

hostapd:
* support RSN overriding (e.g., WPA3-Personal Compatibility Mode)
* EHT/IEEE 802.11be/Wi-Fi 7
  - more complete support
  - fix message validation issues that could enable DoS attacks
  - fix group key rekeying
* enable SAE group 20 by default if SAE-EXT-KEY is enabled
* reject unexpected SAE password identifier to avoid DoS attack against
  a specific STA
* mandate use of SAE H2E when using password identifiers
* assign VLAN when using SAE with PMKSA caching
* support SPP A-MSDU negotiation
* support IEEE 802.11bi functionality
  - changing SAE password identifiers
  - EPPKE

    [50 lines not shown]
DeltaFile
+6,124-33contrib/wpa/src/common/qca-vendor.h
+5,003-0contrib/wpa/wpa_supplicant/nan_supplicant.c
+3,381-671contrib/wpa/src/drivers/driver_nl80211.c
+3,106-664contrib/wpa/src/ap/ieee802_11.c
+3,677-0contrib/wpa/src/nan/nan.c
+2,707-0contrib/wpa/src/common/proximity_ranging.c
+23,998-1,368330 files not shown
+89,793-24,630336 files

FreeBSD/src e6dc001 — sys/netpfil/pf pf_ioctl.c, tests/sys/netpfil/pf rules_counter.sh

pf: Do not hash pool address pointers into rule hashes

pf_hash_pool() hashes the first address of a pool as a whole struct
pf_addr_wrap, including the union that holds the kernel's pfi_dynaddr
or pfr_ktable pointer.

An interface pool such as "-> ($ext_if)" gets a new pfi_dynaddr on
every load, so with "set keepcounters" the rule never matches its
predecessor and loses its counters on every reload.  The pointers also
differ between hosts: once a filter rule in the main ruleset has an
interface or table pool, pfsync peers disagree on the ruleset checksum
and bind every synced state to the default rule.

Hash the address with that union cleared.  The rest of the address,
including the prefix length of an interface address, is hashed as
before, and the hash of a rule with a plain address pool does not
change.

Reviewed by:            kp

    [4 lines not shown]
DeltaFile
+53-0tests/sys/netpfil/pf/rules_counter.sh
+5-1sys/netpfil/pf/pf_ioctl.c
+58-12 files

FreeBSD/src a72d8b2 — tests/aslts/src/runtime/collections/complex/operand/tests/oconst oconst.asl, tests/aslts/src/runtime/collections/complex/operand/tests/olocal olocal.asl

Import ACPICA 20260930
DeltaFile
+47,291-0tests/aslts/src/runtime/collections/functional/region/regionfield.asl
+35,132-0tests/aslts/src/runtime/collections/complex/operand/tests/oconst/oconst.asl
+24,685-0tests/aslts/src/runtime/collections/complex/operand/tests/oreftopackageel/oreftopackageel.asl
+23,068-0tests/aslts/src/runtime/collections/complex/operand/tests/oreturn/oreturn.asl
+23,066-0tests/aslts/src/runtime/collections/complex/operand/tests/opackageel/opackageel.asl
+22,245-0tests/aslts/src/runtime/collections/complex/operand/tests/olocal/olocal.asl
+175,487-01,940 files not shown
+749,706-78,6211,946 files

FreeBSD/src 030e556 — sys/dev/acpica acpi_lid.c acpivar.h

acpi_lid: add an in-kernel lid state eventhandler

Lid state changes are only published to userland, via devd and evdev.
Drivers that need to react to the lid in the kernel have no hook, so
they end up installing a second ACPI_DEVICE_NOTIFY handler on the same
lid object and reimplementing the _LID evaluation.

Add acpi_lid_event, invoked from acpi_lid_status_update() alongside the
existing devd notification, carrying the new state (1 open, 0 closed).

Reviewed by:    adrian
Differential Revision:  https://reviews.freebsd.org/D60704
DeltaFile
+5-0sys/dev/acpica/acpivar.h
+3-0sys/dev/acpica/acpi_lid.c
+8-02 files

FreeBSD/src 3943973 — sys/dev/mgb if_mgb.h

mgb: increase timeout

Increase wait timeout as needed for slower systems.

It takes ~120ms on the Codasip Prime for the MGB_PHY_READY bit
to set after phy reset command issued.

Reviewed by:    emaste
Sponsored by:   EPSRC ("UKRI3001: CHERI Research Centre")
Differential Revision:  https://reviews.freebsd.org/D60706
DeltaFile
+1-1sys/dev/mgb/if_mgb.h
+1-11 files