History

scm: add SO_PASSPIDFD and SCM_PIDFD

Implement SCM_PIDFD, a new type of CMSG type analogical to SCM_CREDENTIALS, but it contains pidfd instead of plain pid, which allows programmers not to care about PID reuse problem. We mask SO_PASSPIDFD feature if CONFIG_UNIX is not builtin because it depends on a pidfd_prepare() API which is not exported to the kernel modules. Idea comes from UAPI kernel group: https://uapi-group.org/kernel-features/ Big thanks to Christian Brauner and Lennart Poettering for productive discussions about this.

Alexander Mikhalitsyn committed 3 years ago

Commit 5e2ff671 parent 55d7c9112 files · +76 −7Browse files

Showing the changes to include/uapi (1 of 12 files). Show all

Unified · Split

include/uapi/asm-generic/socket.h+2−0
@@ -132,6 +132,8 @@ · 131 unmodified lines
132 132
133#define SO_RCVMARK 75133#define SO_RCVMARK 75
134 134
135#define SO_PASSPIDFD 76
136
135#if !defined(__KERNEL__)137#if !defined(__KERNEL__)
136 138
137#if __BITS_PER_LONG == 64 || (defined(__x86_64__) && defined(__ILP32__))139#if __BITS_PER_LONG == 64 || (defined(__x86_64__) && defined(__ILP32__))

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t