summaryrefslogtreecommitdiff
path: root/tools/lib/python
diff options
context:
space:
mode:
authorChristian Brauner <brauner@kernel.org>2026-10-05 10:09:33 -0500
committerChristian Brauner <brauner@kernel.org>2026-10-12 10:58:20 +0200
commitbe3a5e06b962ed056afb2be933817242a6ce32a5 (patch)
tree3d4868edd28405b69d0f046f85d6e4f1c891c88e /tools/lib/python
parentc48ae5bcfc356a8472132ad7fbdd5df83a34e8ac (diff)
downloadlinux-next-be3a5e06b962ed056afb2be933817242a6ce32a5.tar.gz
linux-next-be3a5e06b962ed056afb2be933817242a6ce32a5.zip
net: add SO_PASSPIDFD_THREAD to get a thread-specific SCM_PIDFD
Currently, SCM_PIDFD carries a pidfd for the thread-group leader. A broker or the coredump server cannot learn the identity of the specific thread that sent a given message. Now that both struct pids are recorded a receiver can ask for the specific identity it needs. So add SO_PASSPIDFD_THREAD as a sibling of SO_PASSPIDFD. SO_PASSPIDFD_THREAD delivers an SCM_PIDFD_THREAD, i.e. scoped to the specific thread sending. This is completely independent of SO_PASSPIDFD, meaning you can use both options and get both cmsgs. On SOCK_STREAM sockets recvmsg() only stops merging data at a thread boundary when the receiver asked for a thread pidfd. For SO_PASSCRED and SO_PASSPIDFD receivers all threads of one process remain a single writer. Co-developed-by: Andrew Halaney <andrew@amutable.com> Signed-off-by: Andrew Halaney <andrew@amutable.com> Link: https://patch.msgid.link/20261005-work-unix-passpidfd-v4-3-350183b6e02a@amutable.com Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com> Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions