FreeBSD/src f27c770sys/dev/sound/pcm dsp.c

sound: Fix lock order reversal in dsp_poll()

chn_poll() may hold both rdch and wrch channel locks while calling
chn_trigger(rdch).  chn_trigger() switches the lock order from
"channel -> dsp dev" to "dsp dev -> channel" by temporarily dropping
the channel lock before acquiring the dsp lock.

However, only rdch was unlocked during the transition while wrch
remained locked. Since wrch is also a channel lock and witness had
already established the lock order requirement:

    dsp dev -> channel

witness reports a lock order reversal when pcm_lock() is acquired while
wrch is still held.

Avoid holding rdch and wrch simultaneously during chn_trigger()
lock-order switching by only keeping the channel locks when needed.


    [9 lines not shown]
DeltaFile
+4-3sys/dev/sound/pcm/dsp.c
+4-31 files

FreeBSD/src 93935celib/libusb libusb10.c

libusb: fix incorrect status type when completion on cancel the events

Reviewed by:    lwhsu, markj
MFC after:      2 weeks
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D51736

(cherry picked from commit 06271366982eb6fe59502fcdf95a1a22e0671d5f)
DeltaFile
+2-2lib/libusb/libusb10.c
+2-21 files

FreeBSD/src b457adfsys/compat/linprocfs linprocfs.c

compat/linprocfs: Update /proc/partitions output

Linux /proc/partitions reports the major/minor pair, the device size in
1K blocks, and the device name.  linprocfs still printed obsolete
statistics columns and reported the size in bytes.

Update linprocfs_dopartitions() to emit the Linux-style header and
report provider sizes in 1K blocks.

Signed-off-by: Shunchao Hu <ankohuu at gmail.com>
Reviewed by:    des
MFC after:      2 weeks
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2126
Closes:         https://github.com/freebsd/freebsd-src/pull/2126
(cherry picked from commit 5f5cc3c67ae8a4d9a27e750bef98a9ce1a6b2cf5)
DeltaFile
+5-9sys/compat/linprocfs/linprocfs.c
+5-91 files

FreeBSD/src 1ea682esys/compat/linprocfs linprocfs.c

compat/linprocfs: Fix auxv sbuf leak

linprocfs_doauxv() allocates an automatic sbuf before validating
whether the requested read can be satisfied.

When the computed auxv read length exceeds IOSIZE_MAX, or when the
buffer length is too big, the function returns early without
releasing the sbuf.

Route these early exits through a shared cleanup path so the sbuf is
always deleted after sbuf_new_auto() succeeds.

Signed-off-by:  Shunchao Hu <ankohuu at gmail.com>
Reviewed by:    des, spmzt, zlei, aokblast
MFC after:      2 weeks
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2118
(cherry picked from commit 16aa49f6d1bbe70cd3e851139eb63d566de49b12)
DeltaFile
+11-8sys/compat/linprocfs/linprocfs.c
+11-81 files

FreeBSD/src 187aa51sys/amd64/vmm x86.c

vmm: Add missing AVX instructions for AVX512 in cpuid stdext

Reported by:    Tom <freebsd at fizz.buzz>
Reviewed by:    markj
Tested by:      Tom <freebsd at fizz.buzz>
MFC after:      2 weeks
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56021

(cherry picked from commit e6eba5076929d0b193c9c94b2658c7e8f5da0669)
DeltaFile
+12-3sys/amd64/vmm/x86.c
+12-31 files

FreeBSD/src 661c4b1lib/libc/tests/stdlib cxa_thread_atexit_nothr_test.cc cxa_thread_atexit_test.cc

libc: Fix cxa_thread_atexit{,nothr} test.

After patch 9d26b82, we don't provide recursive call protection anymore.
Therefore, to pass the test, we adjust the testcase by protecting on
caller and the testcase is to make sure the dtors is properly handled.

Reported by:    siva
Reviewed by:    kib
Approved by:    markj (mentor)
Fixes:  9d26b82826d9 ("libc: Fix dtor order in __cxa_thread_atexit")
MFC after:      2 weeks
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55893

(cherry picked from commit c25976f0a9a3a102ce47b45c19b2c93e8069433b)
DeltaFile
+8-3lib/libc/tests/stdlib/cxa_thread_atexit_nothr_test.cc
+8-2lib/libc/tests/stdlib/cxa_thread_atexit_test.cc
+16-52 files

FreeBSD/src 9d200dclib/libc/stdlib cxa_thread_atexit_impl.c

libc: Fix dtor order in __cxa_thread_atexit

The thread_local variable may creates another thread_local variable
inside its dtor. This new object is immediately be registered in
__cxa_thread_atexit() and need to be freed before processing another
variable.

This fixes the libcxx test thread_local_destruction_order.pass.cpp.

Reported by:    kib
Approved by:    lwhsu (mentor)
MFC after:      2 weeks
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55826

(cherry picked from commit 9d26b82826d9962d5085bc5d9df7f8a762c57602)
DeltaFile
+2-2lib/libc/stdlib/cxa_thread_atexit_impl.c
+2-21 files

FreeBSD/src 3886f1bsys/kern kern_time.c

kern_time: Honor the precise option when counting diff

When preecise option is used, the true elapsed time should also use the
precise timer.

This fixes the test case sleep_for.signals.pass.cpp in libcxx.

Reviewed by:    kib, imp
Approved by:    lwhsu (mentor)
MFC after:      2 weeks
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55824

(cherry picked from commit 728ae49a6b81edb3eec5ab70a63bb83db8f5dce5)
DeltaFile
+3-1sys/kern/kern_time.c
+3-11 files

FreeBSD/src aefac9fshare/man/man4 ichwd.4

ichwd: Add manual for i6300esb watchdog

Reviewed by:    ziaee, mhorne
Approved by:    lwhsu (mentor)
MFC after:      2 weeks
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D54466

(cherry picked from commit 546d925cb44f1da7efee76bfebb42df8fdbc83a8)
DeltaFile
+11-1share/man/man4/ichwd.4
+11-11 files

FreeBSD/src abd66d6sys/dev/pci pci.c

pci: use uint32_t for eecp

eecp holds the extended capability offset. If that offset is larger
than 0xff, storing it in uint8_t truncates it, which can make the
early EHCI/XHCI capability walk read the wrong location and loop during
boot.

Seen on AMD device 1022:151e, where HCCPARAMS1 = 0x0118ffc5 and the
first xHCI extended capability offset is 0x460. Widen eecp to uint32_t
in xhci_early_takeover(), matching xhci_pci_take_controller().

Signed-off-by: Gisle Nes <gisle at gisle.net>
Reviewed by:    zlei, aokblast
MFC after:      3 days
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2127
Closes:         https://github.com/freebsd/freebsd-src/pull/2127
(cherry picked from commit 555ffd9022de0c497881bafc413e3e1d05af10d4)
DeltaFile
+1-1sys/dev/pci/pci.c
+1-11 files

FreeBSD/src fe39b77lib/libusb libusb10.c

libusb: fix incorrect status type when completion on cancel the events

Reviewed by:    lwhsu, markj
MFC after:      2 weeks
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D51736

(cherry picked from commit 06271366982eb6fe59502fcdf95a1a22e0671d5f)
DeltaFile
+2-2lib/libusb/libusb10.c
+2-21 files

FreeBSD/src 83cddc8sys/dev/sound/pcm dsp.c

sound: Fix lock order reversal in dsp_poll()

chn_poll() may hold both rdch and wrch channel locks while calling
chn_trigger(rdch).  chn_trigger() switches the lock order from
"channel -> dsp dev" to "dsp dev -> channel" by temporarily dropping
the channel lock before acquiring the dsp lock.

However, only rdch was unlocked during the transition while wrch
remained locked. Since wrch is also a channel lock and witness had
already established the lock order requirement:

    dsp dev -> channel

witness reports a lock order reversal when pcm_lock() is acquired while
wrch is still held.

Avoid holding rdch and wrch simultaneously during chn_trigger()
lock-order switching by only keeping the channel locks when needed.


    [9 lines not shown]
DeltaFile
+4-3sys/dev/sound/pcm/dsp.c
+4-31 files

FreeBSD/src ff5d0d7sys/dev/pci pci.c

pci: use uint32_t for eecp

eecp holds the extended capability offset. If that offset is larger
than 0xff, storing it in uint8_t truncates it, which can make the
early EHCI/XHCI capability walk read the wrong location and loop during
boot.

Seen on AMD device 1022:151e, where HCCPARAMS1 = 0x0118ffc5 and the
first xHCI extended capability offset is 0x460. Widen eecp to uint32_t
in xhci_early_takeover(), matching xhci_pci_take_controller().

Signed-off-by: Gisle Nes <gisle at gisle.net>
Reviewed by:    zlei, aokblast
MFC after:      3 days
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2127
Closes:         https://github.com/freebsd/freebsd-src/pull/2127
(cherry picked from commit 555ffd9022de0c497881bafc413e3e1d05af10d4)
DeltaFile
+1-1sys/dev/pci/pci.c
+1-11 files

FreeBSD/src 2aff8c5lib/libc/tests/stdlib cxa_thread_atexit_nothr_test.cc cxa_thread_atexit_test.cc

libc: Fix cxa_thread_atexit{,nothr} test.

After patch 9d26b82, we don't provide recursive call protection anymore.
Therefore, to pass the test, we adjust the testcase by protecting on
caller and the testcase is to make sure the dtors is properly handled.

Reported by:    siva
Reviewed by:    kib
Approved by:    markj (mentor)
Fixes:  9d26b82826d9 ("libc: Fix dtor order in __cxa_thread_atexit")
MFC after:      2 weeks
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55893

(cherry picked from commit c25976f0a9a3a102ce47b45c19b2c93e8069433b)
DeltaFile
+8-3lib/libc/tests/stdlib/cxa_thread_atexit_nothr_test.cc
+8-2lib/libc/tests/stdlib/cxa_thread_atexit_test.cc
+16-52 files

FreeBSD/src 4669f57sys/compat/linprocfs linprocfs.c

compat/linprocfs: Fix auxv sbuf leak

linprocfs_doauxv() allocates an automatic sbuf before validating
whether the requested read can be satisfied.

When the computed auxv read length exceeds IOSIZE_MAX, or when the
buffer length is too big, the function returns early without
releasing the sbuf.

Route these early exits through a shared cleanup path so the sbuf is
always deleted after sbuf_new_auto() succeeds.

Signed-off-by:  Shunchao Hu <ankohuu at gmail.com>
Reviewed by:    des, spmzt, zlei, aokblast
MFC after:      2 weeks
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2118
(cherry picked from commit 16aa49f6d1bbe70cd3e851139eb63d566de49b12)
DeltaFile
+11-8sys/compat/linprocfs/linprocfs.c
+11-81 files

FreeBSD/src 560f38csys/kern kern_time.c

kern_time: Honor the precise option when counting diff

When preecise option is used, the true elapsed time should also use the
precise timer.

This fixes the test case sleep_for.signals.pass.cpp in libcxx.

Reviewed by:    kib, imp
Approved by:    lwhsu (mentor)
MFC after:      2 weeks
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55824

(cherry picked from commit 728ae49a6b81edb3eec5ab70a63bb83db8f5dce5)
DeltaFile
+3-1sys/kern/kern_time.c
+3-11 files

FreeBSD/src 117bd85sys/compat/linprocfs linprocfs.c

compat/linprocfs: Update /proc/partitions output

Linux /proc/partitions reports the major/minor pair, the device size in
1K blocks, and the device name.  linprocfs still printed obsolete
statistics columns and reported the size in bytes.

Update linprocfs_dopartitions() to emit the Linux-style header and
report provider sizes in 1K blocks.

Signed-off-by: Shunchao Hu <ankohuu at gmail.com>
Reviewed by:    des
MFC after:      2 weeks
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2126
Closes:         https://github.com/freebsd/freebsd-src/pull/2126
(cherry picked from commit 5f5cc3c67ae8a4d9a27e750bef98a9ce1a6b2cf5)
DeltaFile
+5-9sys/compat/linprocfs/linprocfs.c
+5-91 files

FreeBSD/src 4cea785sys/amd64/vmm x86.c

vmm: Add missing AVX instructions for AVX512 in cpuid stdext

Reported by:    Tom <freebsd at fizz.buzz>
Reviewed by:    markj
Tested by:      Tom <freebsd at fizz.buzz>
MFC after:      2 weeks
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56021

(cherry picked from commit e6eba5076929d0b193c9c94b2658c7e8f5da0669)
DeltaFile
+12-3sys/amd64/vmm/x86.c
+12-31 files

FreeBSD/src e9c2f7flib/libc/stdlib cxa_thread_atexit_impl.c

libc: Fix dtor order in __cxa_thread_atexit

The thread_local variable may creates another thread_local variable
inside its dtor. This new object is immediately be registered in
__cxa_thread_atexit() and need to be freed before processing another
variable.

This fixes the libcxx test thread_local_destruction_order.pass.cpp.

Reported by:    kib
Approved by:    lwhsu (mentor)
MFC after:      2 weeks
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55826

(cherry picked from commit 9d26b82826d9962d5085bc5d9df7f8a762c57602)
DeltaFile
+2-2lib/libc/stdlib/cxa_thread_atexit_impl.c
+2-21 files

FreeBSD/src 68cbf46sys/modules/ath10k Makefile, sys/modules/ath11k Makefile

ath{10,11,12}k: Add missing header in Makefile

Reviewed by:    bz
MFC after:      2 weeks
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56693

(cherry picked from commit efc0ced5c46f3332bf1847f2889659e7f5412852)
DeltaFile
+2-0sys/modules/ath10k/Makefile
+2-0sys/modules/ath11k/Makefile
+2-0sys/modules/ath12k/Makefile
+6-03 files

FreeBSD/src 8318794share/man/man4 ichwd.4

ichwd: Add manual for i6300esb watchdog

Reviewed by:    ziaee, mhorne
Approved by:    lwhsu (mentor)
MFC after:      2 weeks
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D54466

(cherry picked from commit 546d925cb44f1da7efee76bfebb42df8fdbc83a8)
DeltaFile
+11-1share/man/man4/ichwd.4
+11-11 files

FreeBSD/ports bfa8952misc/antigravity-cli Makefile distinfo

misc/antigravity-cli: update 1.0.2 → 1.0.3

Also add the target find-new-version to simplify the port update process.
DeltaFile
+22-3misc/antigravity-cli/Makefile
+5-5misc/antigravity-cli/distinfo
+27-82 files

FreeBSD/ports 89dd77csecurity/susshi distinfo Makefile

security/susshi: update 0.18.0 → 0.18.1
DeltaFile
+3-3security/susshi/distinfo
+1-1security/susshi/Makefile
+4-42 files

FreeBSD/ports 7c9d669devel/dra distinfo Makefile

devel/dra: update 0.10.1 → 0.10.2
DeltaFile
+7-7devel/dra/distinfo
+3-4devel/dra/Makefile
+10-112 files

FreeBSD/ports 28a864adevel/lefthook distinfo Makefile

devel/lefthook: update 2.1.8 → 2.1.9
DeltaFile
+5-5devel/lefthook/distinfo
+1-1devel/lefthook/Makefile
+6-62 files

FreeBSD/ports 9cab4efmath/py-ducc0 Makefile distinfo

math/py-ducc0: update 0.34.0 → 0.41.0
DeltaFile
+10-6math/py-ducc0/Makefile
+3-3math/py-ducc0/distinfo
+13-92 files

FreeBSD/ports 1a1b3e0devel/py-uv-build distinfo Makefile

devel/py-uv-build: update 0.11.16 → 0.11.17
DeltaFile
+3-3devel/py-uv-build/distinfo
+1-1devel/py-uv-build/Makefile
+4-42 files

FreeBSD/ports 9a4e480devel/py-uv distinfo Makefile, devel/uv distinfo Makefile.crates

devel/{,py-}uv: update 0.11.16 → 0.11.17
DeltaFile
+17-15devel/uv/distinfo
+7-6devel/uv/Makefile.crates
+3-3devel/py-uv/distinfo
+1-1devel/py-uv/Makefile
+1-1devel/uv/Makefile
+29-265 files

FreeBSD/ports 2f4649emisc/fabric distinfo Makefile

misc/fabric: update 1.4.452 → 1.4.453
DeltaFile
+5-5misc/fabric/distinfo
+2-3misc/fabric/Makefile
+7-82 files

FreeBSD/ports 9426734www/mod_http2 distinfo Makefile

www/mod_http2: Update to 2.0.42
DeltaFile
+3-3www/mod_http2/distinfo
+1-1www/mod_http2/Makefile
+4-42 files