Received: by 2002:a89:2c3:0:b0:1ed:23cc:44d1 with SMTP id d3csp906218lqs; Tue, 5 Mar 2024 23:33:16 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVIqWTVW9gY/ZydFDQwYA4p+LD3qUiaJPGnfP7KJO+6bd4iTCFox0caG99KEGqD9Qwheppbj3X/qVRiJwv/xTRlii4AbDLlk0WZppS19A== X-Google-Smtp-Source: AGHT+IGa2jNlezY+60kslNEM8MLED+OJPjjCupFdGZiHjI8mTAIEmkgQ8pwDfgFtXazFSYITrisO X-Received: by 2002:aa7:c2d8:0:b0:567:612:1149 with SMTP id m24-20020aa7c2d8000000b0056706121149mr7964382edp.27.1709710396688; Tue, 05 Mar 2024 23:33:16 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709710396; cv=pass; d=google.com; s=arc-20160816; b=MVjqW611VCh/FLiCcT4xhx7bugriSKJ0Z5kQDc04cSaV9KofeDCBjdrJTbBocWQXWZ b7rQCNzaFOzvTxE6LM8AU6W526mtaHpIxUjgYhmM0JQVRJMbPVm4JEu/Go4lEdalKZGP XISBozAPHnd+LrIOaAWs7W6Z9J56tDSHRuGyuRUA+kkMtdxoACCyLIyQH5g5QCGXd2R7 NGm+VbJEpMq1WUC75krhzkcE7DMTAjqCE1EO4tNCxpzLTsRbBHepjinbS8E/5SkOpr3n gTTJ2mH/TxBmoLA/wdiOxpFzWlmoYlSng+eSOoZ7vvLa8KSA/z842Er5PhuYED0WEuAR 26Zw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=6MKLJAiDiuVc2UdtNibtOijh4W3cueF0AxoinSjP5Uc=; fh=zN573xxm4nAOZLCRcLBD8pvpOyTv+UeEiYwaWUOMoBs=; b=DU07u1wJLo7hTSJJdVlZb3hZ50pbXml/0SnAXrPOP1vf4i30X8+kcAwK7WvO/zBKVD zvaqWpGTla1wId9kko1NqjhugXGm07GNYo3eB77vEsp4bbBGm0mXthrXfgm2b5oq2Y/p +Wptf2IHkJxo/rPTmjns2Xv5+SaUCnLW5JmvL9IRThHMquo460n0UdIu3m0HIgS+WPY8 lAx+Qx0dWwzMsJr9pUc2ClTzE2cMpSnj0Tb/AFm8Dwa2V9hQ7Z8Z3gyJfP2wWMpbcqI9 a3Ay6MVLjXyPNus5V695nfg0q/wlZJnY37x/qsS9waD9Uupk5cVeAVboelPJV3uU2Qow TRwQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@digikod.net header.s=20191114 header.b=Bnf+pGBR; arc=pass (i=1 spf=pass spfdomain=digikod.net dkim=pass dkdomain=digikod.net); spf=pass (google.com: domain of linux-kernel+bounces-93435-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-93435-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id x30-20020a50d61e000000b00564470ecac8si5841458edi.310.2024.03.05.23.33.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Mar 2024 23:33:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-93435-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@digikod.net header.s=20191114 header.b=Bnf+pGBR; arc=pass (i=1 spf=pass spfdomain=digikod.net dkim=pass dkdomain=digikod.net); spf=pass (google.com: domain of linux-kernel+bounces-93435-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-93435-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 1B22B1F22AB6 for ; Wed, 6 Mar 2024 07:32:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0A7C15C914; Wed, 6 Mar 2024 07:32:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=digikod.net header.i=@digikod.net header.b="Bnf+pGBR" Received: from smtp-8fac.mail.infomaniak.ch (smtp-8fac.mail.infomaniak.ch [83.166.143.172]) (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 01C835C60A for ; Wed, 6 Mar 2024 07:32:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=83.166.143.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709710349; cv=none; b=gM2J1VBRczym1An5PjdvR8kX3h7U9cZZlp1B4LAVyU+Rn7pbgII8iZAvu4HaqZxbK5Va8R6nJgik7PzF9F6T00gfiHwG02AjkQIcXHegVJ3zzhiReyvLV0E2PzTOXoUYCndDdyIqg3E9liEf3AO64xKr5OmL5OPmUQ4tEyw+ows= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709710349; c=relaxed/simple; bh=jHtL5/BM5lZdwyQNewndmLOTlA78bq8Zp6YPa9Nivys=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=BG1XYeTM1xAZq67u1S5DFdyZ6t08JdBFp5rtwOjyOmdPxNbqiEqmq21VdyR/NmAxzFiV8JxB2XeXgEzDsMh0JMxzRyHKyoeo2Y4bqHuKgK/THBepC9sL/HDRwLwC5vm8XKkaetRSxLQtETKeC+9iSId5N9+YgIb/bG3wxWtCe8g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=digikod.net; spf=pass smtp.mailfrom=digikod.net; dkim=pass (1024-bit key) header.d=digikod.net header.i=@digikod.net header.b=Bnf+pGBR; arc=none smtp.client-ip=83.166.143.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=digikod.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=digikod.net Received: from smtp-3-0000.mail.infomaniak.ch (unknown [10.4.36.107]) by smtp-3-3000.mail.infomaniak.ch (Postfix) with ESMTPS id 4TqPK35KvxzMqCRH; Wed, 6 Mar 2024 08:32:23 +0100 (CET) Received: from unknown by smtp-3-0000.mail.infomaniak.ch (Postfix) with ESMTPA id 4TqPK31Q2Wz3Y; Wed, 6 Mar 2024 08:32:23 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=digikod.net; s=20191114; t=1709710343; bh=jHtL5/BM5lZdwyQNewndmLOTlA78bq8Zp6YPa9Nivys=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Bnf+pGBRCM2oQmZ/Ndmfz09ggrMuO8bVAMRpw82pfQYm8+aSp6GxqB3TSue3nay+W LbcPAM0SW5uwFHuS0amH3R74dYgRrxfTViUtVTsZd3NdniYaJK/CPwjk2X9uYeWxKv gpBSk7PtlovH39NeEzG8AX8N8Y6VhBfyq7mLTF1o= Date: Wed, 6 Mar 2024 08:32:13 +0100 From: =?utf-8?Q?Micka=C3=ABl_Sala=C3=BCn?= To: Jakub Kicinski Cc: "David S . Miller" , Kees Cook , Mark Brown , Shuah Khan , =?utf-8?Q?G=C3=BCnther?= Noack , Will Drewry , edumazet@google.com, jakub@cloudflare.com, pabeni@redhat.com, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-security-module@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH] selftests/harness: Fix TEST_F()'s vfork handling Message-ID: <20240306.aepaGah0tie2@digikod.net> References: <20240305.sheeF9yain1O@digikod.net> <20240305201029.1331333-1-mic@digikod.net> <20240305122554.1e42c423@kernel.org> <20240306.Hei7aekahvaj@digikod.net> 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 Content-Transfer-Encoding: 8bit In-Reply-To: <20240306.Hei7aekahvaj@digikod.net> X-Infomaniak-Routing: alpha On Wed, Mar 06, 2024 at 08:25:45AM +0100, Mickaël Salaün wrote: > On Tue, Mar 05, 2024 at 12:25:54PM -0800, Jakub Kicinski wrote: > > On Tue, 5 Mar 2024 21:10:29 +0100 Mickaël Salaün wrote: > > > Always run fixture setup in the grandchild process, and by default also > > > run the teardown in the same process. However, this change makes it > > > possible to run the teardown in a parent process when > > > _metadata->teardown_parent is set to true (e.g. in fixture setup). > > > > > > Fix TEST_SIGNAL() by forwarding grandchild's signal to its parent. Fix > > > seccomp tests by running the test setup in the parent of the test > > > thread, as expected by the related test code. Fix Landlock tests by > > > waiting for the grandchild before processing _metadata. > > > > > > Use of exit(3) in tests should be OK because the environment in which > > > the vfork(2) call happen is already dedicated to the running test (with > > > flushed stdio, setpgrp() call), see __run_test() and the call to fork(2) > > > just before running the setup/test/teardown. Even if the test > > > configures its own exit handlers, they will not be run by the parent > > > because it never calls exit(3), and the test function either ends with a > > > call to _exit(2) or a signal. > > > > > > Cc: David S. Miller > > > Cc: Günther Noack > > > Cc: Jakub Kicinski > > > Cc: Kees Cook > > > Cc: Mark Brown > > > Cc: Shuah Khan > > > Cc: Will Drewry > > > Fixes: 0710a1a73fb4 ("selftests/harness: Merge TEST_F_FORK() into TEST_F()") > > > Link: https://lore.kernel.org/r/20240305201029.1331333-1-mic@digikod.net > > Signed-off-by: Mickaël Salaün Reported-by: Mark Brown > > > > > Your S-o-b is missing. Should be enough if you responded with it. > > > > Code LGTM, thanks! > >