freebsd-src/tests/sys/kern
Gleb Smirnoff 458f475df8 unix/dgram: smart socket buffers for one-to-many sockets
A one-to-many unix/dgram socket is a socket that has been bound
with bind(2) and can get multiple connections.  A typical example
is /var/run/log bound by syslogd(8) and receiving multiple
connections from libc syslog(3) API.  Until now all of these
connections shared the same receive socket buffer of the bound
socket.  This made the socket vulnerable to overflow attack.
See 240d5a9b1c for a historical attempt to workaround the problem.

This commit creates a per-connection socket buffer for every single
connected socket and eliminates the problem.  The new behavior will
optimize seldom writers over frequent writers.  See added test case
scenarios and code comments for more detailed description of the
new behavior.

Reviewed by:		markj
Differential revision:	https://reviews.freebsd.org/D35303
2022-06-24 09:09:11 -07:00
..
acct
execve tests: add a basic test for argc == 0 2022-01-26 13:40:27 -06:00
pipe Do a sweep and remove most WARNS=6 settings 2020-10-01 01:10:51 +00:00
basic_signal.c Stop single stepping in signal handers on arm64 2022-02-07 15:03:23 +00:00
coredump_phnum_helper.c Have the coredump_phnum test ask for the page size 2022-04-07 15:59:32 +01:00
coredump_phnum_test.sh
fdgrowtable_test.c fdgrowtable_test.c: appease gcc 2020-12-11 22:52:16 +00:00
kcov.c Remove PAGE_SIZE from the kcov tests 2022-06-17 10:43:30 +01:00
kern_copyin.c copyin tests: Use the KERN_PROC_VM_LAYOUT sysctl to fetch layout info 2022-01-17 16:12:43 -05:00
kern_descrip_test.c
kill_zombie.c
ktls_test.c ktls_test: Permit an option to skip tests not using ifnet TLS. 2022-06-14 10:35:01 -07:00
libkern_crc32.c tests/sys/kern/crc32: Check for SSE4.2 before using it 2021-02-02 09:53:39 +00:00
Makefile tests/unix_passfd: Prevent running them in parallel 2022-05-23 15:44:10 +02:00
Makefile.depend
Makefile.inc
module_test.c module_test: Fix some assignments to errno intended to be tests. 2022-03-14 14:05:05 -07:00
pdeathsig.c
pdeathsig_helper.c
ptrace_test.c Add NT_ARM_ADDR_MASK 2022-02-22 17:10:35 +00:00
reaper.c
sched_affinity.c tests: Get rid of invalid since 3e11d3f6 testcase 2022-05-12 22:14:41 +03:00
sendfile_helper.c add a few tests for sendfile. 2020-07-20 20:36:32 +00:00
sendfile_test.sh kyua/qemu: When running in qemu, don't teset sendfile 2022-02-02 14:27:51 -07:00
sigaltstack.c
sigwait.c Fix build after 128b9bf9 2022-04-25 14:45:05 +03:00
sonewconn_overflow.py Clear the dmesg buffer to prevent rotating causes issues 2020-10-06 04:18:42 +00:00
sonewconn_overflow.sh Add a regression test for the changes in r359922 and r359923. 2020-04-16 20:07:34 +00:00
subr_physmem_test.c Handle non-page aligned/sized memory in physmem 2022-04-06 14:13:29 +01:00
sys_getrandom.c
sysctl_kern_proc.c tests: Add some regression tests for a couple of KERN_PROC_* sysctls 2021-12-17 13:10:52 -05:00
unix_dgram.c unix/dgram: smart socket buffers for one-to-many sockets 2022-06-24 09:09:11 -07:00
unix_passfd_test.c unix/*: rewrite unp_internalize() cmsg parsing cycle 2022-06-06 10:05:28 -07:00
unix_seqpacket_test.c
unix_socketpair_test.c
waitpid_nohang.c