mirror-linux/tools/testing/selftests
Linus Torvalds 07c3ef5822 vfs-7.1-rc1.pidfs
Please consider pulling these changes from the signed vfs-7.1-rc1.pidfs tag.
 
 Thanks!
 Christian
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQRAhzRXHqcMeLMyaSiRxhvAZXjcogUCadjZCwAKCRCRxhvAZXjc
 omfuAQDckt5g7vxBr9hKdyrq1//nsu44fst/mRqr2iSYjuKfPQD/VN6Lw9e56Y/q
 l4hHxsPPrSSxbijwng7im36iPIGdfwI=
 =BbFh
 -----END PGP SIGNATURE-----

Merge tag 'vfs-7.1-rc1.pidfs' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs

Pull clone and pidfs updates from Christian Brauner:
 "Add three new clone3() flags for pidfd-based process lifecycle
  management.

  CLONE_AUTOREAP:

     CLONE_AUTOREAP makes a child process auto-reap on exit without ever
     becoming a zombie. This is a per-process property in contrast to
     the existing auto-reap mechanism via SA_NOCLDWAIT or SIG_IGN for
     SIGCHLD which applies to all children of a given parent.

     Currently the only way to automatically reap children is to set
     SA_NOCLDWAIT or SIG_IGN on SIGCHLD. This is a parent-scoped
     property affecting all children which makes it unsuitable for
     libraries or applications that need selective auto-reaping of
     specific children while still being able to wait() on others.

     CLONE_AUTOREAP stores an autoreap flag in the child's
     signal_struct. When the child exits do_notify_parent() checks this
     flag and causes exit_notify() to transition the task directly to
     EXIT_DEAD. Since the flag lives on the child it survives
     reparenting: if the original parent exits and the child is
     reparented to a subreaper or init the child still auto-reaps when
     it eventually exits. This is cleaner than forcing the subreaper to
     get SIGCHLD and then reaping it. If the parent doesn't care the
     subreaper won't care. If there's a subreaper that would care it
     would be easy enough to add a prctl() that either just turns back
     on SIGCHLD and turns off auto-reaping or a prctl() that just
     notifies the subreaper whenever a child is reparented to it.

     CLONE_AUTOREAP can be combined with CLONE_PIDFD to allow the parent
     to monitor the child's exit via poll() and retrieve exit status via
     PIDFD_GET_INFO. Without CLONE_PIDFD it provides a fire-and-forget
     pattern. No exit signal is delivered so exit_signal must be zero.
     CLONE_THREAD and CLONE_PARENT are rejected: CLONE_THREAD because
     autoreap is a process-level property, and CLONE_PARENT because an
     autoreap child reparented via CLONE_PARENT could become an
     invisible zombie under a parent that never calls wait().

     The flag is not inherited by the autoreap process's own children.
     Each child that should be autoreaped must be explicitly created
     with CLONE_AUTOREAP.

  CLONE_NNP:

     CLONE_NNP sets no_new_privs on the child at clone time. Unlike
     prctl(PR_SET_NO_NEW_PRIVS) which a process sets on itself,
     CLONE_NNP allows the parent to impose no_new_privs on the child at
     creation without affecting the parent's own privileges.
     CLONE_THREAD is rejected because threads share credentials.
     CLONE_NNP is useful on its own for any spawn-and-sandbox pattern
     but was specifically introduced to enable unprivileged usage of
     CLONE_PIDFD_AUTOKILL.

  CLONE_PIDFD_AUTOKILL:

     This flag ties a child's lifetime to the pidfd returned from
     clone3(). When the last reference to the struct file created by
     clone3() is closed the kernel sends SIGKILL to the child. A pidfd
     obtained via pidfd_open() for the same process does not keep the
     child alive and does not trigger autokill - only the specific
     struct file from clone3() has this property. This is useful for
     container runtimes, service managers, and sandboxed subprocess
     execution - any scenario where the child must die if the parent
     crashes or abandons the pidfd or just wants a throwaway helper
     process.

     CLONE_PIDFD_AUTOKILL requires both CLONE_PIDFD and CLONE_AUTOREAP.
     It requires CLONE_PIDFD because the whole point is tying the
     child's lifetime to the pidfd. It requires CLONE_AUTOREAP because a
     killed child with no one to reap it would become a zombie - the
     primary use case is the parent crashing or abandoning the pidfd so
     no one is around to call waitpid(). CLONE_THREAD is rejected
     because autokill targets a process not a thread.

     If CLONE_NNP is specified together with CLONE_PIDFD_AUTOKILL an
     unprivileged user may spawn a process that is autokilled. The child
     cannot escalate privileges via setuid/setgid exec after being
     spawned. If CLONE_PIDFD_AUTOKILL is specified without CLONE_NNP the
     caller must have have CAP_SYS_ADMIN in its user namespace"

* tag 'vfs-7.1-rc1.pidfs' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs:
  selftests: check pidfd_info->coredump_code correctness
  pidfds: add coredump_code field to pidfd_info
  kselftest/coredump: reintroduce null pointer dereference
  selftests/pidfd: add CLONE_PIDFD_AUTOKILL tests
  selftests/pidfd: add CLONE_NNP tests
  selftests/pidfd: add CLONE_AUTOREAP tests
  pidfd: add CLONE_PIDFD_AUTOKILL
  clone: add CLONE_NNP
  clone: add CLONE_AUTOREAP
2026-04-13 13:27:11 -07:00
..
acct selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
alsa selftests: ALSA: Remove unused variable in utimer-test 2026-01-19 09:12:59 +01:00
amd-pstate
arm64 selftest/arm64: Fix sve2p1_sigill() to hwcap test 2026-03-06 11:54:26 +00:00
bpf Including fixes from netfilter, IPsec and wireless. This is again 2026-04-09 08:39:25 -07:00
breakpoints selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
cachestat selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
capabilities selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
cgroup selftests/cgroup: Don't require synchronous populated update on task exit 2026-03-24 10:21:57 -10:00
clone3 selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
connector selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
core selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
coredump selftests: check pidfd_info->coredump_code correctness 2026-03-23 16:29:15 +01:00
cpu-hotplug
cpufreq
damon selftests/damon/wss_estimation: deduplicate failed samples output 2026-01-31 14:22:45 -08:00
devices
dm-verity selftests: add dm-verity keyring selftests 2026-01-19 15:21:26 +01:00
dmabuf-heaps selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
drivers selftests: team: add non-Ethernet header_ops reproducer 2026-03-24 11:26:32 +01:00
dt
efivarfs
exec selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
fchmodat2 selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
filelock selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
filesystems vfs-7.1-rc1.xattr 2026-04-13 10:10:28 -07:00
firmware
fpu
ftrace selftests/tracing: Fix test_multiple_writes stall 2026-01-09 15:49:32 -07:00
futex Futex changes for v6.19: 2025-12-10 17:21:30 +09:00
gpio
hid selftests/hid: fix compilation when bpf_wq and hid_device are not exported 2026-03-16 16:21:06 +01:00
ia64
intel_pstate selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
iommu iommufd/selftest: Make it clearer to gcc that the access is not out of bounds 2025-12-15 20:34:41 -04:00
ipc selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
ir selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
kcmp selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
kexec selftests/kexec: Ignore selftest binary 2025-09-25 13:43:28 -06:00
kho kho: make debugfs interface optional 2025-11-27 14:24:31 -08:00
kmod
kselftest selftests/run_kselftest.sh: exit with error if tests fail 2025-11-19 15:00:22 -07:00
kselftest_harness selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
kvm KVM: s390: Fixes for 7.0 2026-03-24 17:32:13 +01:00
landlock selftests/landlock: Test tsync interruption and cancellation paths 2026-03-19 20:57:39 +01:00
lib
livepatch selftests: livepatch: use canonical ftrace path 2025-10-15 14:50:46 +02:00
liveupdate selftests/liveupdate: add kexec test for multiple and empty sessions 2025-11-27 14:24:42 -08:00
lkdtm lkdtm/bugs: Add __counted_by_ptr() test PTR_BOUNDS 2026-01-17 11:00:37 -08:00
locking
lsm selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
media_tests selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
membarrier selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
memfd selftests/memfd: use IPC semaphore instead of SIGSTOP/SIGCONT 2026-02-12 15:45:57 -08:00
memory-hotplug
mincore selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
mm mm.git review status for linus..mm-stable 2026-02-18 20:50:32 -08:00
module
mount
mount_setattr selftests/mount_setattr: increase tmpfs size for idmapped mount tests 2026-03-17 16:59:45 +01:00
move_mount_set_group selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
mqueue selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
mseal_system_mappings selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
namespaces Significant patch series in this pull request: 2025-12-06 14:01:20 -08:00
nci selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
net selftests: nft_queue.sh: add a parallel stress test 2026-04-08 13:34:51 +02:00
nolibc tools/nolibc: Add a simple test for writing to a FILE and reading it back 2026-01-11 12:47:47 +01:00
ntb
openat2 selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
pci_endpoint selftests: pci_endpoint: Add BAR subrange mapping test case 2026-01-29 17:42:37 -06:00
pcie_bwctrl
perf_events selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
pid_namespace selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
pidfd selftests: check pidfd_info->coredump_code correctness 2026-03-23 16:29:15 +01:00
power_supply
powerpc powerpc/selftests/copyloops: extend selftest to exercise __copy_tofrom_user_power7_vmx 2026-03-12 11:03:48 +05:30
prctl selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
proc selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
pstore
ptp selftests: ptp: treat unsupported PHC operations as skip 2026-01-27 17:57:28 -08:00
ptrace selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
rcutorture rcutorture: Add NOCB02 config for nocb poll mode testing 2026-03-30 15:48:14 -04:00
resctrl selftests/resctrl: Fix non-contiguous CBM check for Hygon 2026-01-09 16:49:01 -07:00
ring-buffer selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
riscv prctl: cfi: change the branch landing pad prctl()s to be more descriptive 2026-04-04 18:40:58 -06:00
rlimits
rseq selftests/rseq: Add rseq slice histogram script 2026-01-22 11:11:20 +01:00
rtc selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
rust
safesetid
sched
sched_ext selftests/sched_ext: Add cyclic SCX_KICK_WAIT stress test 2026-03-30 08:37:55 -10:00
seccomp selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
sgx selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
signal selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
size
sparc64 selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
splice
static_keys
sync selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
syscall_user_dispatch selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
sysctl
tc-testing selftests/tc-testing: add tests for cls_fw and cls_flow on shared blocks 2026-04-02 15:08:42 +02:00
tdx selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
thermal/intel thermal: intel: selftests: workload_hint: Support slow workload hints 2026-01-07 21:42:10 +01:00
timens selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
timers Significant patch series in this pull request: 2025-12-06 14:01:20 -08:00
tmpfs selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
tpm2 selftests: tpm2: Fix ill defined assertions 2025-12-03 22:55:27 +02:00
tty TTY/Serial changes for 6.19-rc1 2025-12-06 18:38:19 -08:00
turbostat
ublk for-7.0/block-20260206 2026-02-09 17:57:21 -08:00
uevent selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
user_events selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
vDSO * VDSO rework and cleanups 2026-02-10 19:34:26 -08:00
verification selftests/verification: Add initial RV tests 2025-11-11 13:18:55 +01:00
vfio vfio: selftests: only build tests on arm64 and x86_64 2026-02-06 15:08:05 -07:00
vsock selftests/vsock: change tests to respect write-once child ns mode 2026-02-26 11:10:03 +01:00
watchdog
wireguard watchdog: softlockup: panic when lockup duration exceeds N thresholds 2026-01-20 19:44:20 -08:00
x86 selftests/x86: Clean up sysret_rip coding style 2026-01-19 12:06:11 +01:00
zram mm: remove unused zpool layer 2025-09-21 14:21:59 -07:00
.gitignore
Makefile netconsole: selftests: Move netconsole selftests to separate target 2026-01-29 17:30:48 -08:00
gen_kselftest_tar.sh
kselftest.h Summary of significant series in this pull request: 2025-10-02 18:18:33 -07:00
kselftest_deps.sh
kselftest_harness.h selftests/harness: order TEST_F and XFAIL_ADD constructors 2026-03-05 07:34:54 -08:00
kselftest_install.sh
kselftest_module.h
lib.mk selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
run_kselftest.sh selftests/run_kselftest.sh: Add `--skip` argument option 2026-01-16 13:46:40 -07:00