FreeBSD/src 6ed2f51share/man/man8 diskless.8

diskless(8): remove references to deleted clone_root script

The clone_root script was removed from the tree in commit
7736786b08e8 but the diskless(8) man page still referenced it
in two places. Remove both references.

PR: 292231
Signed-off-by: Kit Dallege <xaum.io at gmail.com>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/2101
(cherry picked from commit f8c8875add6946b09ea8cf1f7bbdbd90fe5b1f17)
DeltaFile
+2-9share/man/man8/diskless.8
+2-91 files

FreeBSD/src d5332d3sys/dev/usb/controller generic_ehci_fdt.c

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
DeltaFile
+1-1sys/dev/usb/controller/generic_ehci_fdt.c
+1-11 files

FreeBSD/src b8c6f58sys/netpfil/pf if_pflog.c

pflog: run VNET_SYSUNINIT in SI_SUB_PROTO_FIREWALL

Suggested by:   pouria, glebius
Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+1-1sys/netpfil/pf/if_pflog.c
+1-11 files

FreeBSD/src 32cf24bcddl/usr.bin/ctfmerge ctfmerge.1

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
DeltaFile
+49-27cddl/usr.bin/ctfmerge/ctfmerge.1
+49-271 files

FreeBSD/src e37b519tests/sys/net/routing test_rtsock_l3.c

tests/test_rtsock_l3: fix flaky temporal route addition tests

If RTM_DELETE arrives before RTM_ADD, the test will skip the first
reply and then timeout after attempting to read another message from
the rtsock_fd.

See the CI test failure[0] for more details.

[0] https://ci.freebsd.org/job/FreeBSD-main-riscv64-test/16628/testReport/sys.net.routing/test_rtsock_l3/rtm_add_v6_temporal1_success/

Reviewed by:    pouria
Fixes:          e02d3fe70c7247027c85d60179c331618554ba34
MFC after:      3 days
Sponsored by:   The FreeBSD Foundation

(cherry picked from commit 9e2d8ec2df414a8019d9c31a9a09a5cc728b4c19)
DeltaFile
+34-12tests/sys/net/routing/test_rtsock_l3.c
+34-121 files

FreeBSD/src 6aac5ddtests/sys/net/routing test_rtsock_l3.c

tests/test_rtsock_l3: fix flaky temporal route addition tests

If RTM_DELETE arrives before RTM_ADD, the test will skip the first
reply and then timeout after attempting to read another message from
the rtsock_fd.

See the CI test failure[0] for more details.

[0] https://ci.freebsd.org/job/FreeBSD-main-riscv64-test/16628/testReport/sys.net.routing/test_rtsock_l3/rtm_add_v6_temporal1_success/

Reviewed by:    pouria
Fixes:          e02d3fe70c7247027c85d60179c331618554ba34
MFC after:      3 days
Sponsored by:   The FreeBSD Foundation

(cherry picked from commit 9e2d8ec2df414a8019d9c31a9a09a5cc728b4c19)
DeltaFile
+34-12tests/sys/net/routing/test_rtsock_l3.c
+34-121 files

FreeBSD/src 3de9dc5lib/libc/tests/gen posix_spawn_test.c Makefile, lib/libc/tests/gen/libdummy libdummy.c Makefile

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
DeltaFile
+68-0lib/libc/tests/gen/posix_spawn_test.c
+14-0lib/libc/tests/gen/libdummy/libdummy.c
+9-0lib/libc/tests/gen/libdummy/Makefile
+2-0lib/libc/tests/gen/Makefile
+93-04 files

FreeBSD/src f7f916dsbin/ping/tests test_ping.py

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
DeltaFile
+4-4sbin/ping/tests/test_ping.py
+4-41 files

FreeBSD/src 7ac9995sbin/ping/tests test_ping.py

Revert "ping/tests: expect bell chars from stderr after initial status"

This reverts commit 5b8c28adb829b50fb8ac065637fa99f717858bab.

The commit message was wrong.

Reported by:    des
DeltaFile
+4-4sbin/ping/tests/test_ping.py
+4-41 files

FreeBSD/src a751490share/examples/sound mmap.c

sound: Adjust mmap example to use kqueue

Reviewed by:    christos
Differential Revision:  https://reviews.freebsd.org/D57410

(cherry picked from commit a48bbef5eb32508a8d7b3b986c9b1d28176d1694)
DeltaFile
+50-128share/examples/sound/mmap.c
+50-1281 files

FreeBSD/src 5347284share/man/man4 pcm.4, sys/dev/sound/pcm dsp.c

sound: Include more information in kevent returned from the kernel

Reviewed by:    christos
Differential Revision:  https://reviews.freebsd.org/D57362

(cherry picked from commit fe13f70b95a762e19c38d1152eac6312d8578f84)
DeltaFile
+76-0share/man/man4/pcm.4
+12-2sys/dev/sound/pcm/dsp.c
+88-22 files

FreeBSD/src 0665d5bsys/dev/sound/pcm dsp.c

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)
DeltaFile
+19-6sys/dev/sound/pcm/dsp.c
+19-61 files

FreeBSD/src a2e72a2sbin/ipf/ippool ippool.5 ippool.8

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)
DeltaFile
+2-2sbin/ipf/ippool/ippool.5
+1-1sbin/ipf/ippool/ippool.8
+3-32 files

FreeBSD/src 4a70a74bin/ps ps.1

ps(1): Fix a few typos in the manual page

- s/occurence/occurrence/
- s/occurences/occurrences/
- s/ouput/output/

(cherry picked from commit dd2127b54f97fd7445bb4f4187a148e979c9c944)
DeltaFile
+4-4bin/ps/ps.1
+4-41 files

FreeBSD/src f24211esbin/bectl bectl.8

bectl(8): Fix a typo in the manual page

- s/envionments/environments/

(cherry picked from commit c94302609a5999786f0be77d1bd0b016153b6b11)
DeltaFile
+1-1sbin/bectl/bectl.8
+1-11 files

FreeBSD/src de70e79sbin/ipf/ippool ippool.5 ippool.8

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)
DeltaFile
+2-2sbin/ipf/ippool/ippool.5
+1-1sbin/ipf/ippool/ippool.8
+3-32 files

FreeBSD/src 3a27e58sbin/ggate/ggated ggated.8

ggated(8): Fix two typos in the manual page

- s/colunm/column/
- s/operaions/operations/

(cherry picked from commit e2339370737bdbebc8bd34a84f5b869da3a9ed43)
DeltaFile
+2-2sbin/ggate/ggated/ggated.8
+2-21 files

FreeBSD/src f51949dsbin/natd natd.8

natd(8): Fix a typo in the manual page

- s/appplications/applications/

(cherry picked from commit be8c82bc8e83570474afa78c07f7583bb6813046)
DeltaFile
+1-1sbin/natd/natd.8
+1-11 files

FreeBSD/src 54ab35abin/ps ps.1

ps(1): Fix a few typos in the manual page

- s/occurence/occurrence/
- s/occurences/occurrences/
- s/ouput/output/

(cherry picked from commit dd2127b54f97fd7445bb4f4187a148e979c9c944)
DeltaFile
+4-4bin/ps/ps.1
+4-41 files

FreeBSD/src 716ba5fsbin/bectl bectl.8

bectl(8): Fix a typo in the manual page

- s/envionments/environments/

(cherry picked from commit c94302609a5999786f0be77d1bd0b016153b6b11)
DeltaFile
+1-1sbin/bectl/bectl.8
+1-11 files

FreeBSD/src a8bbce0sbin/ipfw ipfw.8

ipfw(8): Fix a typo in the manual page

- s/exept/except/

(cherry picked from commit 1e36ffffe21042983304290a5742ad7e0e0ffe05)
DeltaFile
+3-3sbin/ipfw/ipfw.8
+3-31 files

FreeBSD/src 270bfa3sbin/devd devd.conf.5

devd.conf(5): Fix a typo in the manual page

- s/betwen/between/

(cherry picked from commit 050962ab04a68756b45ff967af42eb2541b0ff5f)
DeltaFile
+1-1sbin/devd/devd.conf.5
+1-11 files

FreeBSD/src 2767a1flib/libc/gen posix_spawn.c

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
DeltaFile
+18-29lib/libc/gen/posix_spawn.c
+18-291 files

FreeBSD/src b516c23lib/libc/gen posix_spawn.c

do_posix_spawn(): use bool

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
DeltaFile
+3-3lib/libc/gen/posix_spawn.c
+3-31 files

FreeBSD/src 70fb92clibexec/rtld-elf map_object.c

rtld: unify the return path for map_object()

Reviewed by:    kevans
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D57908
DeltaFile
+4-6libexec/rtld-elf/map_object.c
+4-61 files

FreeBSD/src 559f456libexec/rtld-elf xmalloc.c rtld.c

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
DeltaFile
+71-1libexec/rtld-elf/xmalloc.c
+0-25libexec/rtld-elf/rtld.c
+71-262 files

FreeBSD/src 1e370f0libexec/rtld-elf rtld.c map_object.c

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
DeltaFile
+58-24libexec/rtld-elf/rtld.c
+3-1libexec/rtld-elf/map_object.c
+2-0libexec/rtld-elf/rtld.h
+63-253 files

FreeBSD/src f9a0147lib/libc/net protocols, sys/netinet in.h

protocols: remove IPPROTO_DIVERT
DeltaFile
+0-3sys/netinet/in.h
+0-1lib/libc/net/protocols
+0-42 files

FreeBSD/src bdd0c4dsys/net bpf_ifnet.c, sys/netinet6 in6_ifattach.c nd6.c

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.
DeltaFile
+3-3sys/netinet6/in6_ifattach.c
+0-5sys/net/bpf_ifnet.c
+2-2sys/netinet6/nd6.c
+0-1sys/netinet6/in6.c
+5-114 files

FreeBSD/src bcf4e3csys/net if_loop.c

loopback: use new names for checksum offloading flags

No functional change intended.

Reviewed by:            tuexen
MFC after:              1 week
Differential Revision:  https://reviews.freebsd.org/D57945
DeltaFile
+5-6sys/net/if_loop.c
+5-61 files