Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp423732rdb; Mon, 29 Jan 2024 06:34:16 -0800 (PST) X-Google-Smtp-Source: AGHT+IEJAUAyIy674lDS1CQ7mVd8gcbGtxf7rU3XFn4/40Rs2WE/hMNcIGGz17BM+uddnx0ONsTD X-Received: by 2002:a05:6358:e48a:b0:178:623c:2200 with SMTP id by10-20020a056358e48a00b00178623c2200mr4719559rwb.40.1706538856220; Mon, 29 Jan 2024 06:34:16 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706538856; cv=pass; d=google.com; s=arc-20160816; b=HU9MfVmwkNsRSBVvQQ1rA1ui99iVKRv/94mTRvK6rWdg0jylele/qJ3xagSXxiw21O vsY2GNWRLv5VLoo7sCPplkG0dfkG4k4U/GQ8X0Sd6Kn/FmPr8tmD2NznmqT3AAXSxpYZ wtGAi0asSiUzASHCOMeidrHP3UHLXmkTxf9fBDVY0g6HNN58xVoxyBxVKvlGBpUVwEdZ GUEZoZFGIXpNqljZ5HktZExGaNzX2MpdvySstmf9zALppz86iwWuagIrx0oyUGz6wX70 WbpmfKOkF3fit4ajq5NGcAprjf5RvwC2ySzOBGSoXpEKq3N2q0YLt95qpcLRhb9Vwz0O U8sg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:feedback-id:dkim-signature:dkim-signature; bh=B4pNIPUED5e8/0rG6KTfg7B2imzrt3EK7wCNXBQ9N68=; fh=RAd7iifg8PHuuztlceTC1K71TKFhA8iPkHKTU+Fv96k=; b=xZLFG+Ju0b7kxiK9Jt3c1kLlbvDLPxnetU5lxaciGG5188WuwBm1oxnUIa4PnsPO7R pbnkCvdUtkQxYqwccwEkmJfcRG2ljWeAj2tkHNHj2tjNFDHsalHeGpD+oSU5rVgDJ6jg wPmJ7ioFQ2jNOQ4Q2ga6gAN6C2/ZinLNV/+uydjsTxa1kv2KN2oZB9WFE7qviFlFVHxG qxfYqujHaYx/5Z/yEelRZ3T5xFhyNNKMfX2OPzJVUU2xbMUIZUH97YrHYtv32mS+CRjU YhChQyQGxL72GG8iXTyA/8O7FYZFvwLPR/ra6Cxy5L5qViZW9yqN1P821yQHEfzj6sHY kyrw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@tycho.pizza header.s=fm2 header.b="IRYT/Zcs"; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b="u44/savz"; arc=pass (i=1 spf=pass spfdomain=tycho.pizza dkim=pass dkdomain=tycho.pizza dkim=pass dkdomain=messagingengine.com); spf=pass (google.com: domain of linux-kernel+bounces-42908-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-42908-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id n129-20020a632787000000b005d8b8f81dd2si3891336pgn.700.2024.01.29.06.34.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jan 2024 06:34:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-42908-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@tycho.pizza header.s=fm2 header.b="IRYT/Zcs"; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b="u44/savz"; arc=pass (i=1 spf=pass spfdomain=tycho.pizza dkim=pass dkdomain=tycho.pizza dkim=pass dkdomain=messagingengine.com); spf=pass (google.com: domain of linux-kernel+bounces-42908-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-42908-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 36BE7287A92 for ; Mon, 29 Jan 2024 14:31:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 788CD14A0B3; Mon, 29 Jan 2024 14:31:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tycho.pizza header.i=@tycho.pizza header.b="IRYT/Zcs"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="u44/savz" Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B6A27148FF8; Mon, 29 Jan 2024 14:31:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=66.111.4.28 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706538702; cv=none; b=LsajUqyJSswNgqFdz/FmBFt8cHiYIl3QFeJCKjru6eoB71US7SIZOEzBCOoLGrgT7w1iPDNpRRyJMYFA9fDdZBbikf49Yp1HRZdVUVn0VzKwIr6sMU4FIOcJ5+8eXKN4lnKxn31G/rSW43D/hx3cjK+zzV9vJHmn9jsaGcQHE94= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706538702; c=relaxed/simple; bh=RizKcmX3RRLlgUG/ugjzq4ScN+Mw8mbriMNFmh8enxo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ONBVnLh0o3Gi7ZRQrEwDZaqy90d2X7mB9BuHsEXSTNYAxtN+QgkzRuJNHDllqUlP7JzIUeJVacqiM8yrv13Ga5QCsHLenfJUQxCzGWlnELz6HuVA8WXkx/tUbkdzEYy5sbNL5zuY1Z4mGsIJNydDLFv67sXdLNhC00YJssrzZ7k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tycho.pizza; spf=pass smtp.mailfrom=tycho.pizza; dkim=pass (2048-bit key) header.d=tycho.pizza header.i=@tycho.pizza header.b=IRYT/Zcs; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=u44/savz; arc=none smtp.client-ip=66.111.4.28 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tycho.pizza Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tycho.pizza Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 9CBFB5C0140; Mon, 29 Jan 2024 09:31:38 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Mon, 29 Jan 2024 09:31:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tycho.pizza; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm2; t=1706538698; x=1706625098; bh=B4pNIPUED5 e8/0rG6KTfg7B2imzrt3EK7wCNXBQ9N68=; b=IRYT/Zcs6PYprK1iWpOsU2VzBk TslIQkVJQT9LxvrAJaPlNSUzUi/8CaBLdQCiM26bn2kyRhZfrRvjzwDOPpZJ1DCM QoN9TjnyOXhd649b3bCh+hIEh2qR8PR4xvMQpiViLLUeJEW6YLQw+DP72SY1SDSd jI4prNKUSxpCrV2777oUcMdnoc3vNcV3h5j1wrl04RHdfgYuM4AF8LGvYba/nTIE 4tzEtX/+L2asEPn0tEaa0o+QtwueTKDQ2wacTfj2+Jx9kUuSON44Cu85ihy6GK5T ReqdecmTZPARZFyC86X/JJ/WbvOHnRT46oczemdveC0Clwg7Vm/fbtzpe0VA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; t=1706538698; x=1706625098; bh=B4pNIPUED5e8/0rG6KTfg7B2imzr t3EK7wCNXBQ9N68=; b=u44/savz0unPS7y0N5xrioUI4Cxd1N1aPBZbBm+j+n12 qvN4XcwjJCi9ilJqC2JBZLNhws0oAQ0vW+up5o9fDcXdHaFeRSbGVOnofUiLoQDF RcHchMet0eE+oMWSyrYxHBd+T9fCPlkoryF5uUWFGx4tWod8RUhN1/t+4O4JKArZ ozdj+l8uGkmK9rpdEODB59zQ0BHctoBlpn73duuE5nZhjs8jnlMCHl70XZAUrBP4 /oG9qu+4evjxv8bwDlmeb3O+mHvtHAVI+5tH3P+WkW1ILtCmKGss3N9kyUYFtgP6 hYRwXTCWIfsXmXQsqwbbKjzzQlVL+POUrU4OubbRFA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrfedtgedgheehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggujgesthdtredttddtvdenucfhrhhomhepvfihtghh ohcutehnuggvrhhsvghnuceothihtghhohesthihtghhohdrphhiiiiirgeqnecuggftrf grthhtvghrnhepueettdetgfejfeffheffffekjeeuveeifeduleegjedutdefffetkeel hfelleetnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh epthihtghhohesthihtghhohdrphhiiiiirg X-ME-Proxy: Feedback-ID: i21f147d5:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 29 Jan 2024 09:31:37 -0500 (EST) Date: Mon, 29 Jan 2024 07:31:35 -0700 From: Tycho Andersen To: Christian Brauner Cc: Oleg Nesterov , linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, Tycho Andersen , "Eric W. Biederman" Subject: Re: [RFC PATCH] pidfd: implement PIDFD_THREAD flag for pidfd_open() Message-ID: References: <20240127105410.GA13787@redhat.com> <20240127163117.GB13787@redhat.com> <20240127193127.GC13787@redhat.com> <20240127210634.GE13787@redhat.com> <20240129112313.GA11635@redhat.com> <20240129-plakat-einlud-4903633a5410@brauner> 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: <20240129-plakat-einlud-4903633a5410@brauner> On Mon, Jan 29, 2024 at 02:41:11PM +0100, Christian Brauner wrote: > On Mon, Jan 29, 2024 at 12:23:15PM +0100, Oleg Nesterov wrote: > > --- a/kernel/signal.c > > +++ b/kernel/signal.c > > @@ -2051,7 +2051,8 @@ bool do_notify_parent(struct task_struct *tsk, int sig) > > WARN_ON_ONCE(!tsk->ptrace && > > (tsk->group_leader != tsk || !thread_group_empty(tsk))); > > /* > > - * tsk is a group leader and has no threads, wake up the pidfd waiters. > > + * tsk is a group leader and has no threads, wake up the !PIDFD_THREAD > > + * waiters. > > */ > > if (thread_group_empty(tsk)) > > do_notify_pidfd(tsk); > > @@ -3926,6 +3927,7 @@ SYSCALL_DEFINE4(pidfd_send_signal, int, pidfd, int, sig, > > prepare_kill_siginfo(sig, &kinfo); > > } > > > > + /* TODO: respect PIDFD_THREAD */ > > So I've been thinking about this at the end of last week. Do we need to > give userspace a way to send a thread-group wide signal even when a > PIDFD_THREAD pidfd is passed? Or should we just not worry about this > right now and wait until someone needs this? I don't need it currently, but it would have been handy for some of the tests I wrote. Should I fix those up and send them too on top of Oleg's v2? Tycho