linux/arch
Christian Brauner be3a5e06b9
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>
2026-10-12 10:58:20 +02:00
..
alpha net: add SO_PASSPIDFD_THREAD to get a thread-specific SCM_PIDFD 2026-10-12 10:58:20 +02:00
arc ARC: arch_cmpxchg_relaxed to use size of pointed type not pointer 2026-09-24 21:17:09 -07:00
arm ARM: socfpga: select the PL310 erratum 753970 workaround 2026-08-31 10:44:39 -05:00
arm64 arm64 fixes for -rc7 2026-10-09 23:32:55 +02:00
csky mm.git review status for mm-hotfixes-stable..mm-stable 2026-08-20 18:17:08 -07:00
hexagon Treewide timer related cleanups: 2026-08-18 15:58:29 -07:00
loongarch bpf-fixes 2026-10-02 12:59:32 -07:00
m68k m68knommu: updates and fixes for v7.3 2026-08-28 08:44:36 -07:00
microblaze Treewide timer related cleanups: 2026-08-18 15:58:29 -07:00
mips net: add SO_PASSPIDFD_THREAD to get a thread-specific SCM_PIDFD 2026-10-12 10:58:20 +02:00
nios2 mm.git review status for mm-hotfixes-stable..mm-stable 2026-08-20 18:17:08 -07:00
openrisc OpenRISC 7.3 updates 2026-08-30 09:26:54 -07:00
parisc net: add SO_PASSPIDFD_THREAD to get a thread-specific SCM_PIDFD 2026-10-12 10:58:20 +02:00
powerpc Perf events fixes: 2026-10-04 08:35:29 -07:00
riscv riscv: fix load_unaligned_zeropad() fixup for RV32 2026-10-07 20:25:09 -06:00
s390 bpf-fixes 2026-10-02 12:59:32 -07:00
sh gpio updates for v7.3-rc1 2026-08-19 09:10:07 -07:00
sparc net: add SO_PASSPIDFD_THREAD to get a thread-specific SCM_PIDFD 2026-10-12 10:58:20 +02:00
um net: always dissect GSO packets in __virtio_net_hdr_to_skb() 2026-10-06 15:35:40 -07:00
x86 x86/CPU/AMD: Fix AMD TLBI Erratum #1718 2026-10-05 10:29:08 -07:00
xtensa Xtensa updates for v7.3 2026-08-28 08:55:47 -07:00
.gitignore
Kconfig VDSO updates: 2026-08-18 16:56:25 -07:00