Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp989430rdb; Fri, 9 Feb 2024 07:11:57 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVS0O4o+kwrZZYiDK0YuFHQYa54atjGKyC3GvrVkuOt+OuekgBJiK9ykwrH1tkK6TUs6TQQVj4AYYd7BbKULCEe6fX7UFSzmnAKceMIww== X-Google-Smtp-Source: AGHT+IHmyX67yuyJxVAm00eSdNYYe27lhRCI1Ftu9XsYzwDLw5hjEc+2oAKhUBktnNAMQl7Odsr4 X-Received: by 2002:a05:6a00:1386:b0:6e0:a073:711a with SMTP id t6-20020a056a00138600b006e0a073711amr180736pfg.4.1707491517526; Fri, 09 Feb 2024 07:11:57 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707491517; cv=pass; d=google.com; s=arc-20160816; b=iQkhRaqUlDGoeZCQm+cmE0tnotCP2aOmuW02rCYhshWzismnXl1EVW/zpi+Q1wnMWh K4c4hrbhBdz7aLl+VEr3jv+Q7GED6e/vkqn8dZexoRwSCtHqZcKxqiiSbuRwYmla8ohW tnhVFkS80BR2xUGmrMSUXR4GsA8kHi1mnK9qc5keY2Ljc+CyjnLB6sPqPEWnDzeEBLM1 5U/zYVBm95SB+Y55wU0Oa9Qgy/GCEN9YsOh6m9ait1AhLjZZMnCAMyiy9wpyjONFetMo eIdDu5dfgQI0YNPV5X83h3wz/X8hS+4hio8WKu5aRT+h5OHkmJb7ggItTpdugR4/fmr+ xZaQ== 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=53TEClrekNzHKexKHuzxNrD3BWzj2H0fNU2TOKMmspk=; fh=aoWRsuSh3F2zWkopr/Nbo51cTzfuuh0hBQHNYtIiSuA=; b=YYmuvmiRXA1KPz/ipTbz5w6hPHB9NQs3xmeJMuemVUvIju0T5YQJadhvQcqeewwxbD JOvWkv8gUINQ15FntwqqZ+B6AxipY3r+rnjKSD0LROg9/UZE+mqfNnSpTqI7diBv4keH eOcNamLJU+hNNHpan/3GqFADRXDZfYyfHltL9GdKU1Zp/ljnHXkS+leWJjsLUdXL0/DV k8TG8CRgejTM63pXE6IImi/a1qDgRzdApxVrh/1uvP2GIGNRNJtb/fF9cAvcLGuNNO1y HpOkbN2/PK1slHjWK54E4VcMLX+xFe25GPT+IS9bUc+Fh5eim5zWeOlN3/bj6J1smFXY +fMw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qXnBv+Pa; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-59516-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-59516-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; AJvYcCVz5KtO+Vy/W9r8FVBITUYdoSlfvwG5BXiSnu5U8CXLLnEeFaSeRI3vXM5+XKFrgocjUyoSUnAiyBwG1dT53KIVL8v0OZQMUYluvXmaqQ== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id s4-20020a62e704000000b006e0733b3429si436565pfh.340.2024.02.09.07.11.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Feb 2024 07:11:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-59516-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=@kernel.org header.s=k20201202 header.b=qXnBv+Pa; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-59516-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-59516-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 874BD2888E6 for ; Fri, 9 Feb 2024 15:11:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C38AD6EB4E; Fri, 9 Feb 2024 15:11:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="qXnBv+Pa" 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 E821E6D1CB; Fri, 9 Feb 2024 15:11:13 +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=1707491474; cv=none; b=iRL7xWLffef9BAzzlPWQJF+i3F8kPD2p6obUT55UOSEAEkP05cM+EuTZzjTa61s2mCprMFI/PJ583q8dCBd3HkcENt333LXL8EddJbcX/2UYCr5hUiG0YLlAv0F5aThpm68WIH2ViewWFZVoZz7EWcdndREOTaY6X2HknXdVR/E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707491474; c=relaxed/simple; bh=VwCqQlgMD5ijvTe1CDRtTpyuJtBMBP3AZJbX9C0U4eQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=JVToFPgd3os8xSN2CS9NPPH/iCnqIujeZ9cV64F/vX/xQ+mNFDxpYwvwzzG9ucQ5+7NIbK7bD4DQjYX/z2FNd+BDQie6qlt1LEzw4AZN20jNZE5Ucq/39CBRTNliy1eXWBw9FOHAJFJwb5yxhQWYo1oN9xixpIQQXxeIntjrJzg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=qXnBv+Pa; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 09CE5C43390; Fri, 9 Feb 2024 15:11:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707491473; bh=VwCqQlgMD5ijvTe1CDRtTpyuJtBMBP3AZJbX9C0U4eQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=qXnBv+PaprGtyM8d1vEJZaPYs8z9ZiMmYRLvBJdHcpmfzTRm/hr6im4QePAIUKTEy Ddhf8E9NuKTx0XAcqCj2daArr6uwjZ2vgA1MRLQ9yjdJbvvq0me0993N9AHRn7+h9p /VbpybhSp8acS4pkGLAoYvsKB65Rc4x7JmCqLjUCtg6BmuYD3i+PtBO54qoCnJntm+ +yDl0XaZYeiRc+yyEAsEueh9L4EGrdEQ0I7jcBvOBfY9xerDLGRTQNo6v2lC3BJGD5 UCG4OrrnTTqOcxYPoNL7eTN12PoYV9m/DKJaIEGx7KM3rTXW9XBL/1Q9hnAyOmRqXo 0ckgim5vRfscA== Date: Fri, 9 Feb 2024 16:11:09 +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: <20240209-bockig-essverhalten-9d80946c0bf4@brauner> References: <20240209130620.GA8039@redhat.com> <20240209130650.GA8048@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: <20240209130650.GA8048@redhat.com> On Fri, Feb 09, 2024 at 02:06:50PM +0100, Oleg Nesterov wrote: > Turn kill_pid_info() into kill_pid_info_type(), this allows to pass any > pid_type to group_send_sig_info(), despite its name it should work fine > even if type = PIDTYPE_PID. > > Change pidfd_send_signal() to use PIDTYPE_PID or PIDTYPE_TGID depending > on PIDFD_THREAD. > > While at it kill another TODO comment in pidfd_show_fdinfo(). As Christian > expains fdinfo reports f_flags, userspace can already detect PIDFD_THREAD. > > Signed-off-by: Oleg Nesterov > --- Looks good to me, Reviewed-by: Christian Brauner