opnsense-src/sys
Konstantin Belousov 3360b48525 killpg(2): close a race with fork(2), part1
If the process group member performs fork(), the child could escape
signalling from killpg(). Prevent it by introducing an sx process group
lock pg_killsx which is taken interruptibly shared around fork. If there
is a pending signal, do the trip through userspace with ERESTART to
handle signal ASTs. The lock is taken exclusively during killpg().

The lock is also locked exclusive when the process changes group
membership, to avoid escaping a signal by this means, by ensuring that
the process group is stable during fork.

Note that the new lock is before proctree lock, so in some situations we
could only do trylocking to obtain it.

This relatively simple approach cannot work for REAP_KILL, because
process potentially belongs to more than one reaper tree by having
sub-reapers.

Reported by:	dchagin
Tested by:	dchagin, pho
Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
Differential revision:	https://reviews.freebsd.org/D40493
2023-07-04 06:21:53 +03:00
..
amd64 qlnxe: add driver to amd64 NOTES 2023-07-01 11:06:59 -06:00
arm fix qcom_cpu_kpssv2 compile on ASUS_AC1300 2023-06-12 08:30:15 -06:00
arm64 arm64: make VM_NFREEORDER and the comment describing it match 2023-06-29 12:48:48 -05:00
bsm
cam nvme_xpt: Tidy nvme_announce_periph for fabrics support. 2023-06-26 20:37:43 -07:00
cddl dtrace/arm64: Fix user memory access routines 2023-06-15 12:39:21 -04:00
compat LinuxKPI: list.h add list_count_nodes() 2023-06-28 01:32:29 +00:00
conf sys: Add [u]divmoddi4 intrinsics on i386. 2023-07-01 12:22:44 -07:00
contrib zfs: merge openzfs/zfs@009d3288d 2023-07-01 15:24:26 +02:00
crypto ossl: Don't try to initialize the cipher for Chacha20+Poly1305. 2023-06-20 07:53:50 -07:00
ddb
dev nctgpio: Populate the cache earlier 2023-07-01 11:19:54 -06:00
dts
fs fdescfs: improve linrdlnk mount option 2023-06-27 13:43:17 +03:00
gdb netgdb: Fix netgdb double ack, print proxy address 2023-05-27 09:34:17 -07:00
geom bios: Don't keep sending BIO_FLUSH after first ENOTSUPP. 2023-07-01 11:14:49 -06:00
gnu
i386 linux: binutils as requires %eflags instead of %flags for CFI. 2023-06-30 09:43:58 -07:00
isa
kern killpg(2): close a race with fork(2), part1 2023-07-04 06:21:53 +03:00
kgssapi
libkern libkern: Trim OBE comment from divmoddi routines. 2023-07-01 14:43:53 -07:00
modules rdrand_rng: Build with -fPIC on i386 when using GCC. 2023-07-01 12:23:00 -07:00
net altq codel: do not insert the same mtag twice 2023-07-03 21:32:33 +02:00
net80211 net80211: Radiotap: update for defines 2023-05-20 00:56:21 +00:00
netgraph
netinet dtrace: improve siftr probe 2023-07-02 03:08:51 +02:00
netinet6 netinet[6]: make in[6]_control use ucred instead of td. 2023-07-01 06:52:24 +00:00
netipsec tcp: fix TCP MD5 digest computation for TCP over UDP 2023-06-21 22:48:12 +02:00
netlink netinet[6]: make in[6]_control use ucred instead of td. 2023-07-01 06:52:24 +00:00
netpfil pf: Add code to enable filtering for locally delivered packets 2023-06-20 15:34:01 +01:00
netsmb
nfs Fix panic in nfs bootp/diskless after 0785c323f3. 2023-06-02 12:57:26 -04:00
nfsclient
nfsserver
nlm
ofed
opencrypto crypto: Advance the correct pointer in crypto_cursor_copydata() 2023-06-12 12:52:24 -04:00
powerpc sysentvec: Retire sv_imgact_try as unneeded anymore 2023-05-29 11:18:11 +03:00
riscv riscv: Remove MACHINE_ARCH-specific remnants of riscv64sf. 2023-06-27 10:19:31 -07:00
rpc
security veriexec: Do not save error from file info in fingerprint status 2023-06-09 10:49:59 -04:00
sys killpg(2): close a race with fork(2), part1 2023-07-04 06:21:53 +03:00
teken
tests ktest: make ktest work with Netlink loaded as a module. 2023-06-13 06:04:14 +00:00
tools makesyscall: Stop generating $FreeBSD$ 2023-06-09 07:26:24 -06:00
ufs Write out corrected superblock when creating a UFS/FFS snapshot. 2023-06-13 00:22:13 -07:00
vm vm_fault: move FAULT_* return codes out of range for Mach errors 2023-06-28 00:03:14 +03:00
x86 x86: Add defines for a couple of thermal and PM bits 2023-06-19 13:32:22 -04:00
xdr
xen
Makefile
README.md

FreeBSD Kernel Source:

This directory contains the source files and build glue that make up the FreeBSD kernel and its modules, including both original and contributed software.

Kernel configuration files are located in the conf/ subdirectory of each architecture. GENERIC is the configuration used in release builds. NOTES contains documentation of all possible entries. LINT is a compile-only configuration used to maximize build coverage and detect regressions.

Source Roadmap:

Directory Description
amd64 AMD64 (64-bit x86) architecture support
arm 32-bit ARM architecture support
arm64 64-bit ARM (AArch64) architecture support
cam Common Access Method storage subsystem - cam(4) and ctl(4)
cddl CDDL-licensed optional sources such as DTrace
conf kernel build glue
compat Linux compatibility layer, FreeBSD 32-bit compatibility
contrib 3rd-party imported software such as OpenZFS
crypto crypto drivers
ddb interactive kernel debugger - ddb(4)
fs most filesystems, excluding UFS, NFS, and ZFS
dev device drivers and other arch independent code
gdb kernel remote GDB stub - gdb(4)
geom GEOM framework - geom(4)
i386 i386 (32-bit x86) architecture support
kern main part of the kernel
libkern libc-like and other support functions for kernel use
modules kernel module infrastructure
net core networking code
net80211 wireless networking (IEEE 802.11) - net80211(4)
netgraph graph-based networking subsystem - netgraph(4)
netinet IPv4 protocol implementation - inet(4)
netinet6 IPv6 protocol implementation - inet6(4)
netipsec IPsec protocol implementation - ipsec(4)
netpfil packet filters - ipfw(4), pf(4), and ipfilter(4)
opencrypto OpenCrypto framework - crypto(7)
powerpc PowerPC/POWER (32 and 64-bit) architecture support
riscv 64-bit RISC-V architecture support
security security facilities - audit(4) and mac(4)
sys kernel headers
tests kernel unit tests
ufs Unix File System - ffs(7)
vm virtual memory system
x86 code shared by AMD64 and i386 architectures