Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp557696rdb; Tue, 23 Jan 2024 07:45:39 -0800 (PST) X-Google-Smtp-Source: AGHT+IFMw5GxQPyS/wyJi+Tk2VxMY71v61/bI4iQWyW288bAIdGVIhpoi5h+cZLDXQaZ7NXplrRV X-Received: by 2002:a05:6e02:791:b0:35f:ec50:ea1e with SMTP id q17-20020a056e02079100b0035fec50ea1emr20476ils.37.1706024739686; Tue, 23 Jan 2024 07:45:39 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706024739; cv=pass; d=google.com; s=arc-20160816; b=QzqmY55o471WobpGtGuijbMDRcbAoRoywIajM6RffoPdtRRVSNPJFqn7HWQxHxzkz6 LXire9MWa8hTJ75a0PylhqiF1SqUWkGDXTgrCOeayYBdNclvCyvcYRPHh/8ULAYm6iKY ZBsnAvtFqdedfetC6cVRIs3nzKtN9KK7ILOuKssWCpfm1KpetehbBqzVhnucvxyGF1Ht vLemZc+R112WO/3VrQs76vNfBK5aNNwj00GLKcowIpDxYbHMPn3PWVjwdm4xaD34Ei4G tytcFtJL8h3x0YWFVZw+tAqL++w4dH/OTag1PhdFUKdAEQj+9pRknqDyl3dPNeTbRNBQ fMuQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:feedback-id:dkim-signature:dkim-signature; bh=cpXoKTh0mBiWlf0Tpz7TlcUg3DJUYpaHX2Su09+jA0s=; fh=HTIScwFeRGEg+WigohWfUuwlAMWx7PdJJHQOgISBi/E=; b=IHGkDpeU3ig5v8dK2SsW9a/nAVtvI3tG20VegnWP33FQXnsmH/Z7VmyssE7m4JUVXU qtbgiQCapKYsqEW0hcGzX0jSgDXkFD0H8q/alMop/z5ar/04gUI8LXLTeb2b9wLXu7Cp VNhyLTEeofLPoXFlt9gHV26yhDeHQ9yKL4jMTRMiLVTfNnQ3pdiW/Q/2fjsxVSb65B5c MOhMHcWwMQI7RjSrc8feGRCyUVhvppIzo8VnMII9e9CGaTkvb2aaPReWPafiXioYvxmQ oNBCJgP6vCa+fmWk+5pI08SmGNpiSP4EviqDF0+9WNGmyPmt4X1gpdLiZ2AU+qPXiN/p mm7w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@tycho.pizza header.s=fm2 header.b=fBlX29H2; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=dgEPaiM3; 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-35559-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-35559-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 c15-20020a63da0f000000b005cda184c288si9919534pgh.212.2024.01.23.07.45.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jan 2024 07:45:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-35559-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=fBlX29H2; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=dgEPaiM3; 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-35559-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-35559-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 20F82283013 for ; Tue, 23 Jan 2024 15:41:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4224F604A0; Tue, 23 Jan 2024 15:35:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tycho.pizza header.i=@tycho.pizza header.b="fBlX29H2"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="dgEPaiM3" 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 E96C75FDCC; Tue, 23 Jan 2024 15:35:05 +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=1706024108; cv=none; b=lzNJEjhIdt7LfB5+1RhIypctyCMEfGCGMOUZ1vjkj7IJHgdt8CtMcHuqCWs2uzvxydnSj2WgSLDCVc6Ay+Y2tkWPz/lZLjlIZV2k51Z6zN/x16mEjnrOSlUj/INqMxKKQjOoy8TglMATgIkcjrO3YHxVQLHtfmRquLlMuqY9LWU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706024108; c=relaxed/simple; bh=XcJc/yvMCH0RbyeBdmRrU6syGsXpx3+8eaxSeIwzZ+c=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=flIB3cmH5zNla5LNw09b8aSXdW7MDxX2p+ocQMHHAmk1NzSQGLmFGW4p0NWFKYWjDUnDEw1XCUMYQhCm4DGx2DfpfFmxUv4M/XNn66EO3ztOMWb2Q5LZFOeyQ27o2YRa+axGJ3yOyrCLYmNjh8b7qW7CpOaQ+79DvNs/vg/sFmU= 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=fBlX29H2; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=dgEPaiM3; 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 compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id CD27B5C01C5; Tue, 23 Jan 2024 10:35:04 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Tue, 23 Jan 2024 10:35:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tycho.pizza; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:message-id:mime-version:reply-to:subject:subject:to :to; s=fm2; t=1706024104; x=1706110504; bh=cpXoKTh0mBiWlf0Tpz7Tl cUg3DJUYpaHX2Su09+jA0s=; b=fBlX29H2GKnOsOdTnWheKvb5z7HjLMeIi1o6h y5T5Odtf6rADsoffBEXIEHKzCAGqDJ3kjkXC9DlRg0CMOKcimfCWAigJO6eOLNpL m0o1SnrSHqqcD4HyiSquik2WtrVZDOY6PrCGXE0RvfxDirdm4FbuSkg8dxHjyHIH GE0Gzm3ARElfQuNna13DK40ThMSrxmDfuilQV4Y52+IK5d2dvJyv7CjCdRT3jL+b 9mdMbw1yqwMFyDgEhDMRxc2qo5uoUXw1DaRLCT/LCS/bIPYkEB1Rb3FJzLKB1IN+ C8TGlyNSp42TdPMuTjKJqSYw75kWlzuSyDO4EDopzn6WfIkfg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:message-id:mime-version:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; t=1706024104; x=1706110504; bh=cpXoKTh0mBiWlf0Tpz7TlcUg3DJU YpaHX2Su09+jA0s=; b=dgEPaiM3Y4oX1IDgLIegPeyh4zh6oMZ2vJHohdGCS92g FBzKO5BfQh4LadliUm4805B68V1+bkLooin4lKGpcOuRilaCWBF2yaKDCPwjm3p/ VMGWwuF4DbhNjAV3fTbS0m51b6D9Qqb/og9eAkQdHtnwnNUdLDeiHVbT+l4qEmWe e/KKgmAQniU9AKD1C/QMFZPv1CCxIC0mvfAAUsqydkuwMr0JWrgS5Z6IWJ2drvtA 1CjSF+txfzpjOVDddiMNO3ZucKIHJddnKMJnhh9hIeGC6Yl0Cr8lPu3Xh5L/VGOv SLhCRKO9ZB5+we4sQSKVA4I+8AhEDqYTfCb8I8D9jA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvdekkedgjeejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgggfestdekredtredttdenucfhrhhomhepvfihtghhohcu tehnuggvrhhsvghnuceothihtghhohesthihtghhohdrphhiiiiirgeqnecuggftrfgrth htvghrnhepheeffeehleeftdfgjeegheelieefvdfghfeuudeuheehuefhhffhtefhiedv geegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepth ihtghhohesthihtghhohdrphhiiiiirg X-ME-Proxy: Feedback-ID: i21f147d5:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 23 Jan 2024 10:35:03 -0500 (EST) From: Tycho Andersen To: Christian Brauner Cc: Oleg Nesterov , linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, Tycho Andersen Subject: [PATCH v3 0/3] pidfds for non thread group leaders Date: Tue, 23 Jan 2024 08:34:49 -0700 Message-Id: <20240123153452.170866-1-tycho@tycho.pizza> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Tycho Andersen Hi all, Finally picking this back up. I looked for a location where we could put the do_notify_pidfd() call so that we'd only need one for an embarassingly long time, but couldn't find anything that worked. So, we have a new call in a similar location in v1, just using the actual helper. Perhaps this makes sense, since we're adding a new feature. Hopefully all the tests even pass this time! I looked for a bit but couldn't figure out why they don't exit(0) when something failed. I'll keep looking at that. Thoughts welcome, Tycho Tycho Andersen (3): pidfd: allow pidfd_open() on non-thread-group leaders selftests/pidfd: add non-thread-group leader tests clone: allow CLONE_THREAD | CLONE_PIDFD together include/linux/sched/signal.h | 1 + kernel/exit.c | 11 + kernel/fork.c | 7 +- kernel/pid.c | 11 +- kernel/signal.c | 2 +- tools/testing/selftests/pidfd/.gitignore | 1 + tools/testing/selftests/pidfd/Makefile | 3 +- .../selftests/pidfd/pidfd_non_tgl_test.c | 600 ++++++++++++++++++ 8 files changed, 619 insertions(+), 17 deletions(-) create mode 100644 tools/testing/selftests/pidfd/pidfd_non_tgl_test.c base-commit: 610347effc2ecb5ededf5037e82240b151f883ab -- 2.34.1