From: Andrew Halaney <andrew@amutable.com>
To: Paolo Abeni <pabeni@redhat.com>
Cc: Jakub Kicinski <kuba@kernel.org>,
Kuniyuki Iwashima <kuniyu@google.com>,
Oleg Nesterov <oleg@redhat.com>,
"David S. Miller" <davem@davemloft.net>,
Simon Horman <horms@kernel.org>,
Willem de Bruijn <willemb@google.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Alexander Viro <viro@zeniv.linux.org.uk>,
Jan Kara <jack@suse.cz>,
linux-fsdevel@vger.kernel.org,
Alexander Mikhalitsyn <alexander@mihalicyn.com>,
"Christian Brauner (Amutable)" <brauner@kernel.org>,
Eric Dumazet <edumazet@kernel.org>
Subject: Re: [PATCH v4 00/10] net: support thread-specific pidfds for send and connect
Date: Mon, 12 Oct 2026 13:14:52 -0500 [thread overview]
Message-ID: <as0i2WdL_T6L6_fD@toolbx> (raw)
In-Reply-To: <1ab71b00-fbe1-42a0-a99e-27d5cd5e5a6e@redhat.com>
On Mon, Oct 12, 2026 at 05:59:17PM +0200, Paolo Abeni wrote:
> On 10/5/26 17:09, Andrew Halaney 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/SCM_PIDFD_THREAD and SO_PEERPIDFD_THREAD. We
> > record the sending and the connecting thread in addition to the
> > thread-group leader.
> >
> > SO_PASSPIDFD_THREAD functions like SO_PASSPIDFD but instead of an
> > SCM_PIDFD message for the thread-group leader, SCM_PIDFD_THREAD sends a
> > pidfd for the specific thread. SO_PASSPIDFD / SO_PASSPIDFD_THREAD are
> > independent, allowing callers to get both styles of pidfd back in their
> > cmsg.
> >
> > SO_PEERPIDFD_THREAD allows to retrieve a pidfd for the specific thread
> > that called connect(), listen(), or socketpair().
> >
> > pidfs_coredump() now also stamps the dumping thread's struct pid so a
> > pidfd for that thread reports the coredump like the pidfd of the
> > thread-group leader does.
> >
> > Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
> > Signed-off-by: Andrew Halaney <andrew@amutable.com>
> >
> > ---
> > Changes in v4:
> > - Moved get_pid() out of scm_set_cred() into scm_send() (Kuniyuki)
> > - Dropped unnecessary helps (Kuniyuki)
> > - Rebased on v7.3-r6
> > - Collected Kuniyuki's RB tags
> > - Link to v3: https://lore.kernel.org/r/20260928-work-unix-passpidfd-v3-0-532018a91b21@amutable.com
> Out of sheer ignorance, I don't see the shared, stable tree where we
> can pull from, can you please point that out?
Here ya go!
https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git/log/?h=vfs-7.4.shared.net-next.pidfd
>
> I think that this late in the cycle, the series could go via Christian's
> tree only and we could get it back after the merge window. WDYT?
This works for me at least, for what its worth.
Thanks,
Andrew
prev parent reply other threads:[~2026-10-12 18:14 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-05 15:09 [PATCH v4 00/10] net: support thread-specific pidfds for send and connect Andrew Halaney
2026-10-05 15:09 ` [PATCH v4 01/10] pid: add helpers to operate on a struct pid array Andrew Halaney
2026-10-05 15:09 ` [PATCH v4 02/10] af_unix: record the pid of the sending thread Andrew Halaney
2026-10-08 4:35 ` Kuniyuki Iwashima
2026-10-05 15:09 ` [PATCH v4 03/10] net: add SO_PASSPIDFD_THREAD to get a thread-specific SCM_PIDFD Andrew Halaney
2026-10-08 4:36 ` Kuniyuki Iwashima
2026-10-05 15:09 ` [PATCH v4 04/10] selftests/net: SO_PASSPIDFD_THREAD Andrew Halaney
2026-10-08 5:03 ` Kuniyuki Iwashima
2026-10-05 15:09 ` [PATCH v4 05/10] net: turn sk_peer_pid into an array indexed by pid type Andrew Halaney
2026-10-05 15:09 ` [PATCH v4 06/10] af_unix: record the pid of the connecting thread Andrew Halaney
2026-10-05 15:09 ` [PATCH v4 07/10] net: add SO_PEERPIDFD_THREAD to get a thread-specific pidfd Andrew Halaney
2026-10-05 15:09 ` [PATCH v4 08/10] selftests/net: SO_PEERPIDFD_THREAD Andrew Halaney
2026-10-08 5:05 ` Kuniyuki Iwashima
2026-10-05 15:09 ` [PATCH v4 09/10] pidfs: record the coredump on the dumping thread's pid too Andrew Halaney
2026-10-05 15:09 ` [PATCH v4 10/10] selftests/coredump: check the dumping thread's pidfd Andrew Halaney
2026-10-12 9:00 ` [PATCH v4 00/10] net: support thread-specific pidfds for send and connect Christian Brauner
2026-10-12 15:59 ` Paolo Abeni
2026-10-12 18:14 ` Andrew Halaney [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=as0i2WdL_T6L6_fD@toolbx \
--to=andrew@amutable.com \
--cc=alexander@mihalicyn.com \
--cc=brauner@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=horms@kernel.org \
--cc=jack@suse.cz \
--cc=kuba@kernel.org \
--cc=kuniyu@google.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=oleg@redhat.com \
--cc=pabeni@redhat.com \
--cc=viro@zeniv.linux.org.uk \
--cc=willemb@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.