Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp1619919rdb; Sat, 10 Feb 2024 09:23:17 -0800 (PST) X-Google-Smtp-Source: AGHT+IEwyEGBfaBHnHveHpp5+sBkqYFjNrP2QtUMV8tZ0HUraMoC6wlC1Xq2P5XDTUCwMirUcvJV X-Received: by 2002:a05:6871:146:b0:218:d5a6:e14 with SMTP id z6-20020a056871014600b00218d5a60e14mr2385295oab.46.1707585796756; Sat, 10 Feb 2024 09:23:16 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707585796; cv=pass; d=google.com; s=arc-20160816; b=ENelmmutvyU77qg4Z5n+cMSsevUN/RWbKNXPEO8HjjH7fJBZTZnmjXrvUbiUjOPyhs PYx5eC9P9/PrmpABbrD2+sf+Dt5y2Xj4tbp41fTa3//sPV9NOtao75gr9I9rqIPNk2x0 dVTB0tz5b8J/LHYVDXhb4A2ePlG4eRKVXn2FiI2XYQG7yn8bbd72jkrmMk7VZUTLoMYp xUyxxa8s4qA9lNRwBcUYokKS/vkhvbyDT2/aaaPM3lTZFpl3J2K40SPUmyZjffYxttxi MGFZGTA4x9S10Xu/oD3LpUccBnUL6jY1BPRQIW/ghYG55zHnTMQY/ZujF3KKwCz+W7Q1 pezA== 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:dkim-signature; bh=FaKZeTq4D6oISYSTg/tvla8n01CnPWHFUkGvOTmyTH0=; fh=41uALrvk3+TkoMry5tUTueoq+plDfOMayngWRtGfNHI=; b=g6mpHoovM0ETMv5c6ZhO7WQmSsTfPKMi0HrMEfHHnycEOVkbQcU1or8Lwpgq42L+fx vhK6BDqCFzLRJxnh8ob6RlAOv1XxNUG3zYRZYNXQBSRh7kDh0z4R/1DBrLPaMrXQ/jBK Yxy+Lbusc5d1URr+aBHDeadnmNvUmnp1Fzb9W3yB6koxBfDLinzHW27yb1ZU6zyaiJSF hs1Mh6ySIkF6/+9P+ijrYRWNE0TO2OVOwS2lPZxSrtFCqf6atqvBbRUhwNzo6CU80z9e UwhbgqYHHJej6gcDCnU3iuictqCFkCZ+pEa62wClkHsFCS6crFnY9Ls3vl8LH5zFZhCr 7QPg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=u8K4oQ3I; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-60497-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-60497-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=2; AJvYcCU5T28eFJoFmUKf8RNNG4BUMzbNJl6mCZa8NHLOKH8zq1ebElOZCHPP025oAiM6qmLvMGuWIEMntU12jZQTuktmvLfOD1is4snbH3MRnA== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id e9-20020ac85dc9000000b0042aad1f71bdsi4662664qtx.618.2024.02.10.09.23.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 10 Feb 2024 09:23:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-60497-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=u8K4oQ3I; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-60497-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-60497-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 473001C211BA for ; Sat, 10 Feb 2024 17:23:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 97F8A5D48C; Sat, 10 Feb 2024 17:23:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="u8K4oQ3I" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 BEDC45380C; Sat, 10 Feb 2024 17:22:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707585779; cv=none; b=eloccX4hyO2IMCWWpnFGAdRXDttyjwLYA7HO42vN9NHL6hPdfd/qHP2AwLRtDXAW+BwA4cpypw2vWYlpOAXzBtzvuvrOo1UhH0PkeocRJwbuHeI5L3gfdfOUQOj4vTmG5Z2v9gc64p3mOIUE4Qfyf0sOmKUm55fJNiv4w363OJw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707585779; c=relaxed/simple; bh=wU4lyT7QKhQe201ARBPkcpqXar4YYZc2vEKe20J8mTM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=roBLM+mWbd+yZiABnYUUS6jTlJ1qJDmBZ+oVSwe0b8eRf2ByP5NGVKzJbOBmvo87o1xsvM1YYrI0LA5rFL9MeAy6q5L+jXQqjglb/OoYiym+PyLUrVorR+byuH/rdt0NMsvtnr5Xi6WC4Liv+nGMAdYU5+Gv0URTbJqGHMxCvQc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=u8K4oQ3I; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6B151C433F1; Sat, 10 Feb 2024 17:22:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707585779; bh=wU4lyT7QKhQe201ARBPkcpqXar4YYZc2vEKe20J8mTM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=u8K4oQ3ICJ5RGjRrS9mJ39grWPbL69RlywqjExMvsbQlk1hQNFmYoI/3R/Vne3ETW 1cdBOBp1C52muk+MysV7vN2XQ+HIfN3InFYrBKoboHl+qGQxweQco8xq8P/9Sit1cj kOoZp3W8l1QyYvOHEFxgu7IkNpy02K552t1pYvJLq2SFaMgTGCDAI4ZRjB3AD2ON2g 3gg7DkZ4ZXQ6vnaD2/Lrwq36W/WNM9AJF2US9OU7axaLrpIqPGW9+v4xE3Yo7pmggB rhwGZZUAKxjVCZypXpXsILNaQ8/15+Y6Q9xzIPzeIfvgSw8gzPBAzYe7KBVaYxhyfE cOvFQQYCuq+pA== Date: Sat, 10 Feb 2024 18:22:54 +0100 From: Christian Brauner To: Oleg Nesterov Cc: Andy Lutomirski , "Eric W. Biederman" , Tycho Andersen , linux-api@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 2/2] pidfd: change pidfd_send_signal() to respect PIDFD_THREAD Message-ID: <20240210-gemolken-gasteltern-2ca46a9d7fa2@brauner> References: <20240209-stangen-feuerzeug-17c8662854c9@brauner> <20240209154305.GC3282@redhat.com> <20240209-radeln-untrennbar-9d4ae05aa4cc@brauner> <20240209155644.GD3282@redhat.com> <20240210-abfinden-beimessen-2dbfea59b0da@brauner> <20240210123033.GA27557@redhat.com> <20240210-dackel-getan-619c70fefa62@brauner> <20240210131518.GC27557@redhat.com> <20240210-chihuahua-hinzog-3945b6abd44a@brauner> <20240210165133.GD27557@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=utf-8 Content-Disposition: inline In-Reply-To: <20240210165133.GD27557@redhat.com> On Sat, Feb 10, 2024 at 05:51:33PM +0100, Oleg Nesterov wrote: > On 02/10, Christian Brauner wrote: > > > > On Sat, Feb 10, 2024 at 02:15:18PM +0100, Oleg Nesterov wrote: > > > On 02/10, Christian Brauner wrote: > > > > > > > > The question is what is more useful for userspace when they do: > > > > pidfd_send_signal(1234, PIDFD_SEND_PROCESS_GROUP)? > > > > > > > > (1) They either mean to signal a process group that is headed by 1234. > > > > > > Yes, this is what I had in mind, see also another email from me. > > > Simple, clear, and matches kill(-1234). > > > > I went for a walk and kept thinking about this and I agree with you. > > It will require that 1234 will be a process group leader but I think > > that this is ok to require that. > > Yes... but I am starting to understand why you mentioned the new > open PIDFD_PROCESS_GROUP flag... perhaps we can do something like > this later, but this needs more thinking. > > > + if (type == PIDFD_SIGNAL_PROCESS_GROUP) > > + ret = kill_pgrp_info(sig, &kinfo, pid); > > I guess you meant > > if (type == PIDTYPE_PGID) > > other than that, Bahaa, yes of course. > > Reviewed-by: Oleg Nesterov Thanks!