Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp1509641rdb; Sat, 10 Feb 2024 05:16:53 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUsDVIXwQGblfXqnlacFIsKXkrQ7t/IAqv1Jfq8tafBKhjnIYiOUgS3tQ8Q3PW0pQzmn1cFIiItMfOLkZ/zYP2kiRv6ClbJm15o30p5yw== X-Google-Smtp-Source: AGHT+IEP6BLVn/3WHjHjgY8WafXVbnjkcETKSuptuTWNbBaSgHQg9wc+2z1hqzDlYekyQ8AYlZL9 X-Received: by 2002:a0c:e388:0:b0:686:170c:a90f with SMTP id a8-20020a0ce388000000b00686170ca90fmr1934883qvl.42.1707571012851; Sat, 10 Feb 2024 05:16:52 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707571012; cv=pass; d=google.com; s=arc-20160816; b=mCT05uT0qlo67TGFUoItLH/shX79tMdueKE8S8NRw93d36paZcx4+An3U1W3nygWAr mZkB7d9J6GtMMrDQ5h4htaVvQEOOSSBHCbZZv0IfPvyHmBLyAoTq7xj9+C71mDH+Dwup QJqnLTXJvFBLm5mt82QMolYbeWoPkd2HtbjJcOX58E8sOIjAD5H0+mPzmB/qHeeeNnmN bHlD6CFl84moxQ5HSKzXu3eG1qXTHyF0hTcJTlOsr+gTbZ4bXokOA9Sj+IuiSH+45yR5 ClhL8q9NqT8lmW8/sh+hvAU6dSlloYKsZmVdGZblGKNwPcp2AVAOChRPpuCrhrPFNSIa CMwQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent: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=sR82DA640YvaUHIigK5faA7hW88PKr3uHIF6nXu33zM=; fh=CfpWDNN0VcxukTPKDINhmhKfB9Q1MM4IKiEIUOvHX3I=; b=xvvkkjCEZtcbPd3lwIehT2Uw8acllM3oc4s7Q9wT6hWbUL7R5qFn3QHiSGbRJCfN90 0fkHTvlwN0JPrEQncdXKRsn/znHhoLPyjKpo8z6ukjk4JBOfvL0c+Qarotuf1UAQLK3L j/WHuJ6N27/lFp3sJRg9Htq0YNk+DBKTVV97fvj+n3mJ4Ce4lE7jfzmlj6uLCVNmcNQs Nu3O/fAtIFeVGRuJ4cJ3YGVvn2hydB+GgJN1sXud0AiiV48BmLdcra7orI9ESeYq5OjQ fdm4YuuCujT5wiU6mhJrIswLSmjge6v8CLxtC2L1Z6LD+a/ctS7wdnLjo6j/o4a5N17c +GFw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=fZNW4wxJ; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-60409-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-60409-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com X-Forwarded-Encrypted: i=2; AJvYcCXEkP4Qg9psp9HKFxtkeNG5zan4oMz0D5KqvJ0n3C3be1g+swAataXV/Tewscsa0e0M211EyX3ujPeC/C2+huC3r7zUzivVy9MydIZIZw== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id q15-20020ad4574f000000b0068530a114f7si4183916qvx.416.2024.02.10.05.16.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 10 Feb 2024 05:16:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-60409-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=@redhat.com header.s=mimecast20190719 header.b=fZNW4wxJ; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-60409-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-60409-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com 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 5F4C51C212C1 for ; Sat, 10 Feb 2024 13:16:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 187BC535D2; Sat, 10 Feb 2024 13:16:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="fZNW4wxJ" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 9411E482D2 for ; Sat, 10 Feb 2024 13:16:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707571004; cv=none; b=qTM0tMi9+xDq4tSnJLmwkaaskJV4RdUnRI17/NJNWWH4F0+qPMev/LBJKvcRTXvEJzgXOiUIHX8/LhK5gFIyhlDwJbkHG1D6jnLIxa7c8pCBbvzb6KnCCJ8MOvKYrn6la6DMFCUjU0y8DOwK98+soSdGqW9RihQZ2j8cf0By76s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707571004; c=relaxed/simple; bh=HpFHIIqeBXqulmQa3+Js29X+KfMEgFiwOOrpHsnaLgQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Db55CAQ3hhZJwjsu0K1i2MHMdRLzUVZxqgjcrLxPF6IJhAnKqGwmp7jeN2zOIR6L8KbGi/QJFCA5suFaL35lcJTSKyeBYpOT0L9wmLOEhwIVihPD4Ql7Zo4LmG4cj8eRcv7uR68pXttYkNvdFvORGZ6jk+dwBmWhRC5UjPx5bXU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=fZNW4wxJ; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1707571001; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=sR82DA640YvaUHIigK5faA7hW88PKr3uHIF6nXu33zM=; b=fZNW4wxJYsIoO7nkGC3JN4fjqe3GxenImQ3mjBg/LgC8H7Svn0Xr+106eaSPkhJ0lj/tyJ MdvkGTzRpOUjp/qAsKDqTcQEC/l8myFQGeQLFp9ogVOL1MKVAQGKR1gCN1eB8MS/3h2Z3f A/2mmi1+jdkx9RpEUA07yQv9Ir22wyE= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-595-Py3ii3VeMSK9g5YxLLwysA-1; Sat, 10 Feb 2024 08:16:37 -0500 X-MC-Unique: Py3ii3VeMSK9g5YxLLwysA-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2C5D33C0ED4C; Sat, 10 Feb 2024 13:16:37 +0000 (UTC) Received: from dhcp-27-174.brq.redhat.com (unknown [10.45.224.28]) by smtp.corp.redhat.com (Postfix) with SMTP id 832DA400D6D2; Sat, 10 Feb 2024 13:16:35 +0000 (UTC) Received: by dhcp-27-174.brq.redhat.com (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Sat, 10 Feb 2024 14:15:21 +0100 (CET) Date: Sat, 10 Feb 2024 14:15:18 +0100 From: Oleg Nesterov To: Christian Brauner 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: <20240210131518.GC27557@redhat.com> References: <20240209130620.GA8039@redhat.com> <20240209130650.GA8048@redhat.com> <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> 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: <20240210-dackel-getan-619c70fefa62@brauner> User-Agent: Mutt/1.5.24 (2015-08-30) X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.2 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). > (2) Or they want to signal a process group of which 1234 is a member or > the leader. Somehow I didn't even consider this option when I thought about PIDFD_SIGNAL_PGRP... > From a usability perspective (1) is a lot more restrictive because it > requires @pidfd to refer to a process group leader. Yes, but to be honest (2) doesn't fit my head. Probably simply because I always had (1) in mind... But I won't argue if you think that (2) has useful usecases. Oleg.