Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp1131327rdb; Fri, 9 Feb 2024 11:09:18 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXLzCsIydhdaB/VA+bwyRwoOhHtD2Hs5EWgZtJQ8DxXegXjaJy7W+pnSryuMaUk4DXN+kHPdVQ3CNI71H+XDQL08v9nOZzrpTu0HImkeQ== X-Google-Smtp-Source: AGHT+IHmswjgaAa0cGlZ7AeqINc8m3AGho102q2tn7spwJuhmAnKWw9ijN9z8aX83fdRiR9nwEFX X-Received: by 2002:a05:6a21:2d07:b0:19e:533b:2b52 with SMTP id tw7-20020a056a212d0700b0019e533b2b52mr33556pzb.35.1707505757960; Fri, 09 Feb 2024 11:09:17 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707505757; cv=pass; d=google.com; s=arc-20160816; b=odOmhBjGnk7a6XhaQldu5i3OrQAf6wjJmjwKJ256xsNmZlubt5qsjcNvJm+GD9mZlr CMXL9nxdWWul2KJ2Hqy/O0YDdKaU99jw0t28Rxz99p+NXWbQMgoDYZcFsboL06q77tnz rqHBqGfq/Jo92bTDcxpYDpEXWFmcPk/oS71qBHn4z+LlTw+ZXdrggrzlL5ZNHyEzDzUH Q9Q0cjhywaj9fvWc2jAcJg7YmcrUmIpk0tXeSYtYM+tWw08H+Ug4OHuMq+A1Narnpwj+ AOVPJN9SJc/kQ8rwRvx9aGLZaHzz7wdNZw02fs/IEjqVs3+ik4n4JJ1zwqpfFEqXwFSe uq6w== 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=SAe6fmg2iukgmMmSnSkobKVPLF6RTasrBQRLnrKYkHY=; fh=lMv84+4GWTKe23TKVHWhDo7uK6E4pdXwkCxk6IkEzzM=; b=o0iLO4/O4vOuZW+sWHVF6uroNoRnaaPm6AJPVSgX6ZB5mc6Cfzry8gvrZHrr0aZCbQ KV5rAZRuamgoJh4ZA3DqLPlDtBOcrXiN4sJy8K7K2XyCO4mboLZw2FM8n08RNRGWxHUK Wkr/2pPyJ4SgxNf5TH6RDFhWkZplZ97j3Rr+aFoehCZDuYFGoEy6v+1RdVpomwss4kAB PcQSTMg4keSOf4H97WEQ/BGuuTqj5bXHxPmPjdBKoMx9HeyHzwAD3DQllLq5GXCCAbbJ k1bs5t6JKSOYL5SJGYCU6X4kugmNB0i/Pl9nX+dxbK63THL8VXaeRsjqUhWDLgMu/7IW wHFg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@tycho.pizza header.s=fm2 header.b=w+ucZjAL; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=V6VQs3pY; 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-59861-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-59861-linux.lists.archive=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=2; AJvYcCVUiAyyVIHTOy+duHfPj0dlF/ajejm76/uuhTaNtTbKTL+gBbKQGF0UIwp0uuTPEgSXyW8JeoxQ2H8O9cexx4hZh03lEist5RJra6mrWA== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id bx24-20020a056a02051800b005dc16b88e8dsi2268210pgb.353.2024.02.09.11.09.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Feb 2024 11:09:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-59861-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=w+ucZjAL; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=V6VQs3pY; 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-59861-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-59861-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 359A7285AB2 for ; Fri, 9 Feb 2024 19:09:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 50AB282881; Fri, 9 Feb 2024 19:09:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tycho.pizza header.i=@tycho.pizza header.b="w+ucZjAL"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="V6VQs3pY" Received: from fhigh6-smtp.messagingengine.com (fhigh6-smtp.messagingengine.com [103.168.172.157]) (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 DA1702E3F7; Fri, 9 Feb 2024 19:08:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.157 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707505741; cv=none; b=HxX8c0RSK+riKQclbt8qYASElnYAR+GRL1yeI1d/QCl0SgHDaUqDtotG7bOszJGD10DgLV4K9mErNZb3fRmV3RfwowYDuu5Q+hPgHsysK6z50bBZabNBh68G2bbPRiBQEUHcHHw7YtNFITzLk+4LPqRiPbB5ZrT/29HJ16K4KIA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707505741; c=relaxed/simple; bh=+Az18EmozWnGENlBFvdl2uyGh3hA8/mru7NNCHcuS7s=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=DiiuFsFh42zLhUm8aewgobpv8Qs3aCwvzW0tjApo1c40fbcxTQ/nUVSV58WBBMU/uERGhG7scGhtIpk8na2+o2lVpOllguO+shiyq5CbWt+Hf7ru8K2TvbLv/r1JYa71tZAhULjCGGvG3TkjLcHooOIZq4UbAA9fq5XcfV1o6bo= 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=w+ucZjAL; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=V6VQs3pY; arc=none smtp.client-ip=103.168.172.157 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 compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailfhigh.nyi.internal (Postfix) with ESMTP id B3B9D1140085; Fri, 9 Feb 2024 14:08:57 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Fri, 09 Feb 2024 14:08:57 -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=1707505737; x=1707592137; bh=SAe6fmg2iu kgmMmSnSkobKVPLF6RTasrBQRLnrKYkHY=; b=w+ucZjAL8FE7GIe1p0B8EkVpU1 4SdP99jEVmNljXi4FCxlWrmD1p5kbEIiLMQ4/vKN3hYg5t49CmC/EerE4T4Vw4gm iishwdjp9Vg6JMm4NgCnkh5EFV7hQcQTvWPecri3Xp25jIDe2gD4/2bk3D/IM0hw ysDWKiHgi6ybo5WqvPCBUypBCJx1LtRFuEt+C+pvBtBd7S/tfkZ4rRQCFSyIWWTS GuvCJx+NW25EDfDBTRK1fYEnEuuJ86FDZYToBWeq3HKQoFZnCzxn2M2Lc1wGVfdk ozD0mIQNzG8HXkrIy5qKuS6sg+3FORHwsRg/ZwGtLqx0BB9pIvukjlY6NPeQ== 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=1707505737; x=1707592137; bh=SAe6fmg2iukgmMmSnSkobKVPLF6R TasrBQRLnrKYkHY=; b=V6VQs3pYr5cojBStLX+VeoMBgTE/9rLlTrQc9WQLSZnc 37UKHkca/lIdAst33VWfPlVkVpxJJugkEHJ+LM5l/PyajfzFHaQN79j36QAk44BI p7TIKLNk+y/YjlCxCZhA/fjHSPWfacQMr2sygo3+5FWnl70K7Oe9WnFnY7G6E9c5 q7Q6QetzdjKsbjPNc4SU2W8DoZj1jCgeuSAym2mVUxl/7YHVs+weBaTDBDTmaN6e NKaX+HhKIy8S3CT9qXqL1ekuszyFjhqDzSE/xjVAQ1zAJX3R6c4AwC4q9RdF/yje bzMZPYjf4ViM9G+Jyn8sRocn1uf/b1lAw70h1MVESA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrtdeigdduudelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggujgesthdtredttddtvdenucfhrhhomhepvfihtghh ohcutehnuggvrhhsvghnuceothihtghhohesthihtghhohdrphhiiiiirgeqnecuggftrf grthhtvghrnhepueettdetgfejfeffheffffekjeeuveeifeduleegjedutdefffetkeel hfelleetnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh epthihtghhohesthihtghhohdrphhiiiiirg X-ME-Proxy: Feedback-ID: i21f147d5:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 9 Feb 2024 14:08:56 -0500 (EST) Date: Fri, 9 Feb 2024 12:08:54 -0700 From: Tycho Andersen To: Oleg Nesterov Cc: Christian Brauner , Andy Lutomirski , "Eric W. Biederman" , 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: 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=us-ascii 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 Reviewed-by: Tycho Andersen