generic_ehci_fdt: fix driver softc size
This subclass declares its own softc structure adding necessary members
after the embedded ehci_softc_t. The full size of the struct must be
included in the driver declaration, otherwise the allocation backing the
softc is not guaranteed to be large enough.
Reported by: KASAN
Reviewed by: jrtc27, manu
Fixes: 7a58744fd0f1 ("Split out the attachment from the generic-ehci driver")
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57951
ctfmerge.1: Import ENVIRONMENT from NetBSD
Import the ENVIRONMENT section from NetBSD, minus the variable that our
ctfmerge does not have. Alphabetize them, polish grammar and alignment,
and add the variables to the man database. While here, remove whitespace
from the end of some lines to quiet linter.
MFC after: 3 days
PR: 291186
Co-authored-by: Alexander Ziaee <ziaee at FreeBSD.org>
Obtained from: NetBSD (christos <christos at NetBSD.org>, 8a0c0d8)
Differential Revision: https://reviews.freebsd.org/D54054
libc: gen: add a test for rtld underflowing our posix_spawn thread
This is a distillation of the environment described in the PR, using
a dummy shlib and mapping it repeatedly. This takes advantage of the
guard page added in 2767a1f3686e5b16 to reliably crash if rtld tries to
scale its stack usage excessively with the # DSOs loaded.
PR: 295991
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D57954
ping: Fix bell char ordering in -A test cases
Previously, these tests expected the bell chars to arrive
before the initial status line. This appeared to be ok because
ping(8) incorrectly mixed unbuffered and buffered writes by using
printf(3) calls for the initial status, but direct write(2) calls
for the bell chars. 141bb85798 revealed that the test's assertions
only passed because the buffered writes did not get flushed before
the direct writes in the test runs.
8bda488114f3 fixed ping(8) to use POSIX stdio buffered writes
in all cases and guarantee a deterministic output ordering to stdout
observers. This patch fixes the test to match the correct ordering.
Reviewed by: des
Sponsored by: The FreeBSD Foundation
Revert "ping/tests: expect bell chars from stderr after initial status"
This reverts commit 5b8c28adb829b50fb8ac065637fa99f717858bab.
The commit message was wrong.
Reported by: des
sound: Start each channel individually
Unlock all members before starting any of them. Holding multiple channel
locks while calling chn_start() on a virtual channel can trigger the
parent, which acquires PCM_LOCK() while other virtual channels are still
locked -- a lock order reversal.
Reviewed by: christos
Differential Revision: https://reviews.freebsd.org/D57399
(cherry picked from commit 47ae0a869c7db693ffb1ac058d63dcb79c4e68a8)
ipfilter(4): Fix a couple of typos in the manual pages
- s/heirarchical/hierarchical/
- s/itnerface/interface/
- s/conjuction/conjunction/
(cherry picked from commit 0223ae33ad6dd29215bbb6efd041aa5b6c67dc1f)
ps(1): Fix a few typos in the manual page
- s/occurence/occurrence/
- s/occurences/occurrences/
- s/ouput/output/
(cherry picked from commit dd2127b54f97fd7445bb4f4187a148e979c9c944)
ipfilter(4): Fix a couple of typos in the manual pages
- s/heirarchical/hierarchical/
- s/itnerface/interface/
- s/conjuction/conjunction/
(cherry picked from commit 0223ae33ad6dd29215bbb6efd041aa5b6c67dc1f)
ps(1): Fix a few typos in the manual page
- s/occurence/occurrence/
- s/occurences/occurrences/
- s/ouput/output/
(cherry picked from commit dd2127b54f97fd7445bb4f4187a148e979c9c944)
posix_spawn(3): create a guard page below the stack for rfork_thread on x86
Reviewed by: kevans
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D57955
rtld: add spinlock around the crt malloc calls
Right now, the rtld malloc is called under the write-locked rtld bind
lock. A future change adds places where only read-locked rtld bind lock
is held, and then the spinlock protects the malloc structures from the
parallel updates.
Reviewed by: kevans
Tested by: Marek Zarychta <zarychtam at plan-b.pwste.edu.pl>
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D57908
rtld: stop using unbound alloca()
For DoneList allocations, its size depends on the number of loaded DSOs.
Small images could be served by alloca(), but large donelists need to
go into heap.
For map_object(), alloca size is the number of segments in the object.
In both cases, over-grown situations would cause a stack overflow.
PR: 295991
Noted and reviewed by: kevans
Tested by: Marek Zarychta <zarychtam at plan-b.pwste.edu.pl>
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D57908
netinet6: cleanse safeguards against IFT_PFLOG
This "interface" type is no more. Leave the constant in if_types.h, we
probably need an exp-run before removing it.