HardenedBSD/src 15e61ebsys/dev/sound/pci via8233.c envy24ht.c, sys/dev/sound/pcm mixer.c

Merge remote-tracking branch 'origin/hardened/current/master' into hardened/current/cross-dso-cfi
DeltaFile
+51-54sys/dev/sound/pcm/mixer.c
+50-51sys/dev/sound/pci/via8233.c
+34-35sys/dev/sound/pci/envy24ht.c
+34-34sys/dev/sound/pci/envy24.c
+29-28sys/dev/sound/pci/emu10k1.c
+27-27sys/dev/sound/pci/cmi.c
+225-22950 files not shown
+730-68656 files

HardenedBSD/src d2222f8sys/dev/sound/pci via8233.c envy24ht.c, sys/dev/sound/pcm mixer.c

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+51-54sys/dev/sound/pcm/mixer.c
+50-51sys/dev/sound/pci/via8233.c
+34-35sys/dev/sound/pci/envy24ht.c
+34-34sys/dev/sound/pci/envy24.c
+29-28sys/dev/sound/pci/emu10k1.c
+27-27sys/dev/sound/pci/cmi.c
+225-22950 files not shown
+730-68656 files

HardenedBSD/src 47d5989sbin/dmesg dmesg.8, sys/netlink netlink_snl.h

Merge branch 'freebsd/14-stable/main' into hardened/14-stable/master
DeltaFile
+3-3sys/netlink/netlink_snl.h
+2-2sbin/dmesg/dmesg.8
+5-52 files

HardenedBSD/src 727f3dbshare/man/man4 vt.4, stand/man loader.8 loader_simp.8

Merge branch 'freebsd/15-stable/main' into hardened/15-stable/main
DeltaFile
+47-1stand/man/loader.8
+29-0tests/sys/kern/unix_passfd_test.c
+9-9sys/kern/uipc_usrreq.c
+8-1share/man/man4/vt.4
+8-0usr.bin/fortune/datfiles/freebsd-tips
+2-2stand/man/loader_simp.8
+103-133 files not shown
+111-149 files

HardenedBSD/src 513b9dbstand/man loader.8

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)
DeltaFile
+47-1stand/man/loader.8
+47-11 files

HardenedBSD/src 3035855stand/defaults loader.conf.5, stand/man loader_simp.8

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)
DeltaFile
+2-2stand/man/loader_simp.8
+3-0stand/defaults/loader.conf.5
+5-22 files

HardenedBSD/src f0bb9d2usr.bin/fortune/datfiles freebsd-tips

freebsd-tips: Add a shell function for laptops

MFC after:              3 days
Reviewed by:            pauamma_gundo.com
Differential Revision:  https://reviews.freebsd.org/D53748

(cherry picked from commit 42d9ae4945f281d12f3ef96cdbd7356e067f8b18)
DeltaFile
+8-0usr.bin/fortune/datfiles/freebsd-tips
+8-01 files

HardenedBSD/src 2da71eeshare/man/man4 vt.4

vt.4: Document increasing scrollback size

MFC:                    immediately as 2 llms say this is impossible
Reviewed by:            adrian, emaste
Differential Revision:  https://reviews.freebsd.org/D53860

(cherry picked from commit a8740ba860bfc35879f886b80b30327d0d3b16bd)
DeltaFile
+8-1share/man/man4/vt.4
+8-11 files

HardenedBSD/src a8740bashare/man/man4 vt.4

vt.4: Document increasing scrollback size

MFC:                    immediately as 2 llms say this is impossible
Reviewed by:            adrian, emaste
Differential Revision:  https://reviews.freebsd.org/D53860
DeltaFile
+8-1share/man/man4/vt.4
+8-11 files

HardenedBSD/src cf95eabsys/netlink netlink_snl.h

netlink: in snl_init_writer() don't overwrite error in case of failure

PR:     290050
(cherry picked from commit 488718ff42346888243496c00cbeb42ba004171e)
DeltaFile
+3-3sys/netlink/netlink_snl.h
+3-31 files

HardenedBSD/src 9d18115sys/dev/sound/pci via8233.c envy24ht.c, sys/dev/sound/pcm mixer.c

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
DeltaFile
+51-54sys/dev/sound/pcm/mixer.c
+50-51sys/dev/sound/pci/via8233.c
+34-35sys/dev/sound/pci/envy24ht.c
+34-34sys/dev/sound/pci/envy24.c
+29-28sys/dev/sound/pci/emu10k1.c
+27-27sys/dev/sound/pci/cmi.c
+225-22931 files not shown
+537-58137 files

HardenedBSD/src e254ef8sys/dev/sound/pcm channel.c channel.h

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
DeltaFile
+2-18sys/dev/sound/pcm/channel.c
+0-1sys/dev/sound/pcm/channel.h
+2-192 files

HardenedBSD/src 3107b95sys/dev/sound/pcm sound.h sound.c

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
DeltaFile
+2-2sys/dev/sound/pcm/sound.h
+1-1sys/dev/sound/pcm/sound.c
+3-32 files

HardenedBSD/src 4e8eb77sys/dev/sound/midi midi.c mpu401.c

sound: Clean up midi/ includes

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D53841
DeltaFile
+11-16sys/dev/sound/midi/midi.c
+2-9sys/dev/sound/midi/mpu401.c
+13-252 files

HardenedBSD/src b4c32d6sys/dev/sound/pcm dsp.c

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]
DeltaFile
+10-22sys/dev/sound/pcm/dsp.c
+10-221 files

HardenedBSD/src 6ceab1csbin/dmesg dmesg.8

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)
DeltaFile
+2-2sbin/dmesg/dmesg.8
+2-21 files

HardenedBSD/src 1c0668csbin/dmesg dmesg.8

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)
DeltaFile
+1-1sbin/dmesg/dmesg.8
+1-11 files

HardenedBSD/src e13664fsbin/dmesg dmesg.8

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)
DeltaFile
+1-1sbin/dmesg/dmesg.8
+1-11 files

HardenedBSD/src 7dedc3csys/netpfil/pf pf_lb.c, tests/sys/netpfil/pf nat.sh

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
DeltaFile
+30-0tests/sys/netpfil/pf/nat.sh
+12-4sys/netpfil/pf/pf_lb.c
+42-42 files

HardenedBSD/src b9fc762sys/vm vm_page.c vm_extern.h

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
DeltaFile
+25-7sys/vm/vm_page.c
+3-0sys/vm/vm_extern.h
+28-72 files

HardenedBSD/src d8bfcacsys/vm vm_fault.c

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
DeltaFile
+20-0sys/vm/vm_fault.c
+20-01 files

HardenedBSD/src f7c3aa2sys/kern uipc_usrreq.c, tests/sys/kern unix_passfd_test.c

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)
DeltaFile
+29-0tests/sys/kern/unix_passfd_test.c
+6-4sys/kern/uipc_usrreq.c
+35-42 files

HardenedBSD/src 7c15791sys/kern uipc_usrreq.c

unix: Remove an always-false null pointer check

No functional change intended.

MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D53453

(cherry picked from commit ce5692bf009ed5607d3b880eec4055697479c13d)
DeltaFile
+3-5sys/kern/uipc_usrreq.c
+3-51 files

HardenedBSD/src a7d0529share/man/man3 Makefile

queue.3: Add MLINKs for *_EMPTY_ATOMIC

MFC after:      1 week
Fixes:          d2870b8666f2 ("queue: Add atomic variants for *_EMPTY")

(cherry picked from commit 1563da200d4d3d56799267f1bbc58933a6c21331)
DeltaFile
+4-0share/man/man3/Makefile
+4-01 files

HardenedBSD/src b2b3d2alibexec/rtld-elf rtld.c, libexec/rtld-elf/aarch64 rtld_machdep.h

rtld-elf: move powerpc-specific auxv compat code into arch hook

Tested by:      Timothy Pearson (tpearson_raptorengineering.com)
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D53801
DeltaFile
+26-0libexec/rtld-elf/powerpc/reloc.c
+26-0libexec/rtld-elf/powerpc64/reloc.c
+1-24libexec/rtld-elf/rtld.c
+2-0libexec/rtld-elf/i386/rtld_machdep.h
+2-0libexec/rtld-elf/aarch64/rtld_machdep.h
+2-0libexec/rtld-elf/powerpc/rtld_machdep.h
+59-244 files not shown
+67-2410 files

HardenedBSD/src 19aa4e7sys/dev/iwx if_iwx.c, sys/netinet ip_ecn.c ip_ecn.h

Merge remote-tracking branch 'origin/hardened/current/master' into hardened/current/cross-dso-cfi
DeltaFile
+32-30sys/dev/iwx/if_iwx.c
+8-8sys/netinet/ip_ecn.c
+6-6sys/sys/syscallsubr.h
+8-1tools/test/stress2/misc/syzkaller59.sh
+1-8tools/test/stress2/misc/all.exclude
+2-2sys/netinet/ip_ecn.h
+57-557 files not shown
+65-6413 files

HardenedBSD/src dfadf48sys/dev/iwx if_iwx.c, sys/netinet ip_ecn.c

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+32-30sys/dev/iwx/if_iwx.c
+8-8sys/netinet/ip_ecn.c
+6-6sys/sys/syscallsubr.h
+8-1tools/test/stress2/misc/syzkaller59.sh
+1-8tools/test/stress2/misc/all.exclude
+2-2tools/test/stress2/misc/syzkaller82.sh
+57-557 files not shown
+65-6413 files

HardenedBSD/src baaf2a0share/man/man9 exterror.9 Makefile

Merge branch 'freebsd/15-stable/main' into hardened/15-stable/main
DeltaFile
+137-0share/man/man9/exterror.9
+1-0share/man/man9/Makefile
+138-02 files

HardenedBSD/src 747e842sys/sys syscallsubr.h

sys/syscallsubr.h: fix some whitespace

Sponsored by:   DARPA, AFRL
DeltaFile
+6-6sys/sys/syscallsubr.h
+6-61 files

HardenedBSD/src 5b33683sys/sys extattr.h

sys/extaddr.h: don't declare struct iovec

The code never uses it so there's no need to forward declare it.

Sponsored by:   Innovate UK
DeltaFile
+0-2sys/sys/extattr.h
+0-21 files