Re: [PATCH] selftests/seccomp: Don't call read() on TTY from background pgrp

From: Kees Cook
Date: Thu Mar 24 2022 - 19:22:13 EST


On Sat, 19 Mar 2022 02:00:11 +0100, Jann Horn wrote:
> Since commit 92d25637a3a4 ("kselftest: signal all child processes"), tests
> are executed in background process groups. This means that trying to read
> from stdin now throws SIGTTIN when stdin is a TTY, which breaks some
> seccomp selftests that try to use read(0, NULL, 0) as a dummy syscall.
>
> The simplest way to fix that is probably to just use -1 instead of 0 as
> the dummy read()'s FD.
>
> [...]

Applied to for-next/seccomp, thanks!

[1/1] selftests/seccomp: Don't call read() on TTY from background pgrp
https://git.kernel.org/kees/c/1d27adee48cf

--
Kees Cook