lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240305122554.1e42c423@kernel.org>
Date: Tue, 5 Mar 2024 12:25:54 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Mickaël Salaün <mic@...ikod.net>
Cc: "David S . Miller" <davem@...emloft.net>, Kees Cook
 <keescook@...omium.org>, Mark Brown <broonie@...nel.org>, Shuah Khan
 <shuah@...nel.org>, Günther Noack <gnoack@...gle.com>,
 Will Drewry <wad@...omium.org>, edumazet@...gle.com, jakub@...udflare.com,
 pabeni@...hat.com, linux-kernel@...r.kernel.org,
 linux-kselftest@...r.kernel.org, linux-security-module@...r.kernel.org,
 netdev@...r.kernel.org
Subject: Re: [PATCH] selftests/harness: Fix TEST_F()'s vfork handling

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 <davem@...emloft.net>
> Cc: Günther Noack <gnoack@...gle.com>
> Cc: Jakub Kicinski <kuba@...nel.org>
> Cc: Kees Cook <keescook@...omium.org>
> Cc: Mark Brown <broonie@...nel.org>
> Cc: Shuah Khan <shuah@...nel.org>
> Cc: Will Drewry <wad@...omium.org>
> Fixes: 0710a1a73fb4 ("selftests/harness: Merge TEST_F_FORK() into TEST_F()")
> Link: https://lore.kernel.org/r/20240305201029.1331333-1-mic@digikod.net

Your S-o-b is missing. Should be enough if you responded with it.

Code LGTM, thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ