Re: [PATCH v2 00/10] net: support thread-specific pidfds for send and connect

From: Christian Brauner

Date: Wed Sep 09 2026 - 09:03:52 EST


On Wed, 09 Sep 2026 12:42:59 +0200, Christian Brauner wrote:
> SO_PASSPIDFD/SCM_PIDFD and SO_PEERPIDFD allow to retrieve a pidfd for
> the thread-group leader. The coredump server using the coredump socket
> cannot get a handle on the task that took the signal and is writing the
> coredump easily. Workloads interested in per-thread authentification
> have similar problems.
>
> Add SO_PASSPIDFD_THREAD and SO_PEERPIDFD_THREAD. We record the sending
> and the connecting thread in addition to the thread-group leader.
>
> [...]

@Jakub, shared branch in vfs-7.4.shared.net-next.pidfd. I'm open to rebasing if
you have need for that on your end during the cycle.

---

Applied to the vfs-7.4.shared.net-next.pidfd branch of the vfs/vfs.git tree.
Patches in the vfs-7.4.shared.net-next.pidfd branch should appear in linux-next soon.

Please report any outstanding bugs that were missed during review in a
new review to the original patch series allowing us to drop it.

It's encouraged to provide Acked-bys and Reviewed-bys even though the
patch has now been applied. If possible patch trailers will be updated.

Note that commit hashes shown below are subject to change due to rebase,
trailer updates or similar. If in doubt, please check the listed branch.

tree: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs-7.4.shared.net-next.pidfd

[01/10] pid: add helpers to operate on a struct pid array
https://git.kernel.org/vfs/vfs/c/b674dcb18f1d
[02/10] af_unix: record the pid of the sending thread
https://git.kernel.org/vfs/vfs/c/a8575fe8b94e
[03/10] net: add SO_PASSPIDFD_THREAD to get a thread-specific SCM_PIDFD
https://git.kernel.org/vfs/vfs/c/78dc8469581d
[04/10] selftests/net: SO_PASSPIDFD_THREAD
https://git.kernel.org/vfs/vfs/c/7810049c5675
[05/10] net: turn sk_peer_pid into an array indexed by pid type
https://git.kernel.org/vfs/vfs/c/0149a6ceaf8f
[06/10] af_unix: record the pid of the connecting thread
https://git.kernel.org/vfs/vfs/c/4dd362b00be5
[07/10] net: add SO_PEERPIDFD_THREAD to get a thread-specific pidfd
https://git.kernel.org/vfs/vfs/c/41972f2e5ab0
[08/10] selftests/net: SO_PEERPIDFD_THREAD
https://git.kernel.org/vfs/vfs/c/6e8bef9686e4
[09/10] pidfs: record the coredump on the dumping thread's pid too
https://git.kernel.org/vfs/vfs/c/52671ec3712c
[10/10] selftests/coredump: check the dumping thread's pidfd
https://git.kernel.org/vfs/vfs/c/b956027e73be