loader.8: Document module commands
Begin documenting module loader commands in loader(8), where the reader
would look for them. Segregate them by their availability in individual
loader implementations, like build(7) targets.
These details were graciously donated by kevans.
MFC after: 3 days
Reviewed by: kevans
Co-authored-by: Kyle Evans <kevans at freebsd.org>
Differential Revision: https://reviews.freebsd.org/D50727
(cherry picked from commit 6fb0d67819f730e8def56e139f780eff3c0cab0f)
loader manuals: Clarify console and boot_serial
console=comconsole is for the loader and boot_serial is for the kernel.
I think we should centralize documentation on the loader settings in one
manual, such a loader.8. The current proliferation is not obvious where
to find the documentation. To the user, these are all set in loader.conf
or at the loader prompt.
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D53695
(cherry picked from commit 09ffaa4e07d749c83cc1db13829505f21b025f29)
sound: Retire snd_mtx* wrappers
Do not create mutexes with snd_mtxcreate(). It doesn't provide any
value, plus it first allocates the mutex with malloc(9). Allocate
mutexes in the stack and use mtx_* functions directly instead of the
snd_mtx* wrappers.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: kib, markj
Differential Revision: https://reviews.freebsd.org/D53855
sound: Merge chn_intr() with chn_intr_locked()
There is no scenario where chn_intr() is called with the channel lock
already held.
No functional change intended.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: kib, markj
Differential Revision: https://reviews.freebsd.org/D53854
sound: Merge PCM_ALIVE() with PCM_REGISTERED()
PCM_ALIVE() is used only in pcm_unregister(), but it does not hurt to
use PCM_REGISTERED(), which uses PCM_ALIVE() internally. In fact, it's
more robust this way.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
sound: Simplify logic in dsp_io_ops()
Use CHN_LOCK()/CHN_UNLOCK() directly, instead of
dsp_lock_chans()/dsp_unlock_chans(). These functions are useful when we
want to potentially lock both channels. Here we know which channel we
are locking, so we can just lock it directly. This way we get rid of the
prio variable as well.
Related to runpid again, there is no reason to assign it when
CHN_F_RUNNING is not set. channel->pid (as well as channel->comm) is
always assigned in dsp_chn_alloc().
Get rid of runpid. I do not see how we can end up with channel->pid
(td->td_proc->p_pid) not matching buf->uio_td->td_proc->p_pid.
Also improve errno values.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
[2 lines not shown]
dmesg.8: Index kern.msgbuf_show_timestamp
This is the only place this important debugging tunable is documented.
Mark it up with the Va macro according to style.mdoc(5) so that people
can find it via `apropos Va=kern.msg`, the standard syntax to search
the FreeBSD manual for sysctls and tunables.
Fixes: 6910fee62e77 (dmesg: Document kern.msgbuf_show_timestamp)
(cherry picked from commit e13664f6a44b4970ea5e8378b8e1a4879fa5d5a0)
dmesg.8: Index kern.msgbuf_show_timestamp
This is the only place this important debugging tunable is documented.
Mark it up with the Va macro according to style.mdoc(5) so that people
can find it via `apropos Va=kern.msg`, the standard syntax to search
the FreeBSD manual for sysctls and tunables.
Fixes: 6910fee62e77 (dmesg: Document kern.msgbuf_show_timestamp)
(cherry picked from commit e13664f6a44b4970ea5e8378b8e1a4879fa5d5a0)
dmesg.8: Index kern.msgbuf_show_timestamp
This is the only place this important debugging tunable is documented.
Mark it up with the Va macro according to style.mdoc(5) so that people
can find it via `apropos Va=kern.msg`, the standard syntax to search
the FreeBSD manual for sysctls and tunables.
Fixes: 6910fee62e77 (dmesg: Document kern.msgbuf_show_timestamp)
pf: fix another endpoint-independent crash
In c12013f5bb38 we fixed udp_mapping cleanup issues in pf_get_sport(), but
missed the static-port case (i.e. low == 0 && high == 0). We could still exit
pf_get_sport() without either inserting the udp_mapping or freeing it.
Address this and add a test case to provoke the problem.
Reviewed by: thj
MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D53856
vm_page_free_prep(): convert PG_ZERO zeroed page check to use sf_buf
Make the check MI by allocating sf_buf in non-blockable manner. For
DMAP arches, this should be nop since sf_buf allocation cannot fail
trivially. For non-DMAP arches, we get the checks activated unless there
is serious sf_buf pressure, which typically should be not.
The context for vm_page_free_prep() should be ready to block on some VM
mutexes, which should make it reasonable to block on sf_buf list lock.
Move the code to INVARIANTS build from DIAGNOSTIC, and control its activation
with the sysctl debug.vm_check_pg_zero.
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D53850
vm_fault: add a verifier that the PG_ZERO page is indeed zeroed
Compiled under INVARIANTS, activated by the same sysctl
debug.vm_check_pg_zero.
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D53850
unix: Fix handling of listening sockets during garbage collection
socantrcvmore() and unp_dispose() assume that the socket's socket
buffers are initialized, which isn't the case for listening sockets.
Reported by: syzbot+a62883292a5c257703be at syzkaller.appspotmail.com
MFC after: 1 week
Reviewed by: glebius
Differential Revision: https://reviews.freebsd.org/D53743
(cherry picked from commit 9d9fa9a2c22f67d5f8afec18106c9f0072d6b3d4)