From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-yx1-f48.google.com (mail-yx1-f48.google.com [74.125.224.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 84A924ABBC4 for ; Mon, 12 Oct 2026 18:14:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.224.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791828897; cv=none; b=M4DH8b4S4pkpe3FvnpMLjQXggVRg451g9/AAHq+6VOmHgHuKh8QwVCuxp2I0oofuP09M1eHB1QwnkgbbsRniBpjRsCjr5zmsXIMsROYjkrNUP4gpr1VjSEI6eAbjcCe6zkliDwDSQHrxBf1iZdzvYKxCMER+b+jHJixiZF7gZYA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791828897; c=relaxed/simple; bh=QmmaBmlJVo5FdvqhyuBn14AUH7EEO+X0T1K+iasYDNY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=pMAqIjLpc+4nWN2ZrtiRnUce48kbgpFpsEb1+cGE+k2Jc8zeCKL0LxcVXfAT6qs5biIvHUhli+YUPaMQprU8KD3lEHrH8wUaKTnIMyUHXrSYPyKqw3grg4kpcSMaCtNxpdoLsomG8stT7P8yzAb9AnwZ0cg0sT2KitRFFO6CUFM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=amutable.com; spf=pass smtp.mailfrom=amutable.com; dkim=pass (2048-bit key) header.d=amutable-com.20251104.gappssmtp.com header.i=@amutable-com.20251104.gappssmtp.com header.b=CuM3h/+9; arc=none smtp.client-ip=74.125.224.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=amutable.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=amutable.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=amutable-com.20251104.gappssmtp.com header.i=@amutable-com.20251104.gappssmtp.com header.b="CuM3h/+9" Received: by mail-yx1-f48.google.com with SMTP id 956f58d0204a3-677ad9083feso1480608d50.2 for ; Mon, 12 Oct 2026 11:14:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amutable-com.20251104.gappssmtp.com; s=20251104; t=1791828895; x=1792433695; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=jiSdjWiO6CP6czxAtbTP6DSzhB/PYb1mZmzJGcgFfYI=; b=CuM3h/+9LU7XaeR+xoTNf+sgxUzQrQSWBaIA/BFftBOeOr40m9H0beCVLbJrp7F60j 0DBRgWAh/PMbQPFUNtukqB7S9hcZpuadWv+1kdLOTL+rWaRXQilsfo2mX+KKVOLKChi6 HgHnLLD7X0d53N52RW/+B/l5mVZ+2iKb/jXez0auS5+iBf/04mczW44jsZerMcIv670T rqOpWEVYb0px5zi/+uZW9ysnc93BsbWKChqvvYAcafl+e/gEqUMpBfaI0kKg1tMvK7C3 MSrFo3cNfmWMmVSrrIbgvJBiCsauAsI01bTSQclALrQR0gzQ9fnTm5lvUcND6EgkultL xVRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1791828895; x=1792433695; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=jiSdjWiO6CP6czxAtbTP6DSzhB/PYb1mZmzJGcgFfYI=; b=WY6p0HS/8jmEtIfJBFofyMS5iwTcpCF7S/sj82JlVNLdUD3NR44yXub7PT2ysbfl6a ctxFeUZD8yL1ZuixW71vs5ulC4hnPvBhvFFV/t+sITG2U/Uc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084:b0:677:cb43:4b30 with SMTP id 956f58d0204a3-67936adfb2dmr3395147d50.97.1791828895170; Mon, 12 Oct 2026 11:14:55 -0700 (PDT) Received: from toolbx (104-53-165-62.lightspeed.stlsmo.sbcglobal.net. [104.53.165.62]) by smtp.gmail.com with ESMTPSA id 956f58d0204a3-679356ef60fsm3859048d50.21.2026.10.12.11.14.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Oct 2026 11:14:54 -0700 (PDT) Date: Mon, 12 Oct 2026 13:14:52 -0500 From: Andrew Halaney To: Paolo Abeni Cc: Jakub Kicinski , Kuniyuki Iwashima , Oleg Nesterov , "David S. Miller" , Simon Horman , Willem de Bruijn , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Alexander Viro , Jan Kara , linux-fsdevel@vger.kernel.org, Alexander Mikhalitsyn , "Christian Brauner (Amutable)" , Eric Dumazet Subject: Re: [PATCH v4 00/10] net: support thread-specific pidfds for send and connect Message-ID: References: <20261005-work-unix-passpidfd-v4-0-350183b6e02a@amutable.com> <1ab71b00-fbe1-42a0-a99e-27d5cd5e5a6e@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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) > > Signed-off-by: Andrew Halaney > > > > --- > > 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