• Linus Torvalds's avatar
    Merge tag 'pidfd-v5.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux · a9dce667
    Linus Torvalds authored
    Pull pidfd system call from Christian Brauner:
     "This introduces the ability to use file descriptors from /proc/<pid>/
      as stable handles on struct pid. Even if a pid is recycled the handle
      will not change. For a start these fds can be used to send signals to
      the processes they refer to.
    
      With the ability to use /proc/<pid> fds as stable handles on struct
      pid we can fix a long-standing issue where after a process has exited
      its pid can be reused by another process. If a caller sends a signal
      to a reused pid it will end up signaling the wrong process.
    
      With this patchset we enable a variety of use cases. One obvious
      example is that we can now safely delegate an important part of
      process management - sending signals - to processes other than the
      parent of a given process by sending file descriptors around via scm
      rights and not fearing that the given process will have been recycled
      in the meantime. It also allows for easy testing whether a given
      process is still alive or not by sending signal 0 to a pidfd which is
      quite handy.
    
      There has been some interest in this feature e.g. from systems
      management (systemd, glibc) and container managers. I have requested
      and gotten comments from glibc to make sure that this syscall is
      suitable for their needs as well. In the future I expect it to take on
      most other pid-based signal syscalls. But such features are left for
      the future once they are needed.
    
      This has been sitting in linux-next for quite a while and has not
      caused any issues. It comes with selftests which verify basic
      functionality and also test that a recycled pid cannot be signaled via
      a pidfd.
    
      Jon has written about a prior version of this patchset. It should
      cover the basic functionality since not a lot has changed since then:
    
          https://lwn.net/Articles/773459/
    
      The commit message for the syscall itself is extensively documenting
      the syscall, including it's functionality and extensibility"
    
    * tag 'pidfd-v5.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux:
      selftests: add tests for pidfd_send_signal()
      signal: add pidfd_send_signal() syscall
    a9dce667
Name
Last commit
Last update
..
bpf Loading commit data...
cgroup Loading commit data...
configs Loading commit data...
debug Loading commit data...
dma Loading commit data...
events Loading commit data...
gcov Loading commit data...
irq Loading commit data...
livepatch Loading commit data...
locking Loading commit data...
power Loading commit data...
printk Loading commit data...
rcu Loading commit data...
sched Loading commit data...
time Loading commit data...
trace Loading commit data...
.gitignore Loading commit data...
Kconfig.freezer Loading commit data...
Kconfig.hz Loading commit data...
Kconfig.locks Loading commit data...
Kconfig.preempt Loading commit data...
Makefile Loading commit data...
acct.c Loading commit data...
async.c Loading commit data...
audit.c Loading commit data...
audit.h Loading commit data...
audit_fsnotify.c Loading commit data...
audit_tree.c Loading commit data...
audit_watch.c Loading commit data...
auditfilter.c Loading commit data...
auditsc.c Loading commit data...
backtracetest.c Loading commit data...
bounds.c Loading commit data...
capability.c Loading commit data...
compat.c Loading commit data...
configs.c Loading commit data...
context_tracking.c Loading commit data...
cpu.c Loading commit data...
cpu_pm.c Loading commit data...
crash_core.c Loading commit data...
crash_dump.c Loading commit data...
cred.c Loading commit data...
delayacct.c Loading commit data...
dma.c Loading commit data...
elfcore.c Loading commit data...
exec_domain.c Loading commit data...
exit.c Loading commit data...
extable.c Loading commit data...
fail_function.c Loading commit data...
fork.c Loading commit data...
freezer.c Loading commit data...
futex.c Loading commit data...
groups.c Loading commit data...
hung_task.c Loading commit data...
iomem.c Loading commit data...
irq_work.c Loading commit data...
jump_label.c Loading commit data...
kallsyms.c Loading commit data...
kcmp.c Loading commit data...
kcov.c Loading commit data...
kexec.c Loading commit data...
kexec_core.c Loading commit data...
kexec_file.c Loading commit data...
kexec_internal.h Loading commit data...
kmod.c Loading commit data...
kprobes.c Loading commit data...
ksysfs.c Loading commit data...
kthread.c Loading commit data...
latencytop.c Loading commit data...
memremap.c Loading commit data...
module-internal.h Loading commit data...
module.c Loading commit data...
module_signing.c Loading commit data...
notifier.c Loading commit data...
nsproxy.c Loading commit data...
padata.c Loading commit data...
panic.c Loading commit data...
params.c Loading commit data...
pid.c Loading commit data...
pid_namespace.c Loading commit data...
profile.c Loading commit data...
ptrace.c Loading commit data...
range.c Loading commit data...
reboot.c Loading commit data...
relay.c Loading commit data...
resource.c Loading commit data...
rseq.c Loading commit data...
seccomp.c Loading commit data...
signal.c Loading commit data...
smp.c Loading commit data...
smpboot.c Loading commit data...
smpboot.h Loading commit data...
softirq.c Loading commit data...
stackleak.c Loading commit data...
stacktrace.c Loading commit data...
stop_machine.c Loading commit data...
sys.c Loading commit data...
sys_ni.c Loading commit data...
sysctl.c Loading commit data...
sysctl_binary.c Loading commit data...
task_work.c Loading commit data...
taskstats.c Loading commit data...
test_kprobes.c Loading commit data...
torture.c Loading commit data...
tracepoint.c Loading commit data...
tsacct.c Loading commit data...
ucount.c Loading commit data...
uid16.c Loading commit data...
uid16.h Loading commit data...
umh.c Loading commit data...
up.c Loading commit data...
user-return-notifier.c Loading commit data...
user.c Loading commit data...
user_namespace.c Loading commit data...
utsname.c Loading commit data...
utsname_sysctl.c Loading commit data...
watchdog.c Loading commit data...
watchdog_hld.c Loading commit data...
workqueue.c Loading commit data...
workqueue_internal.h Loading commit data...