]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
selftests/seccomp: Change the syscall used in KILL_THREAD test
authorTerry Tritton <terry.tritton@linaro.org>
Wed, 24 Jan 2024 14:13:56 +0000 (14:13 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 2 May 2024 14:32:41 +0000 (16:32 +0200)
commitf4b1e2cc9fd4c87adca18cc5efa0470c8d976c51
treee94afaa248035e4ef461255392d878d3b289b74a
parent003af8c23fca24ec6ed5e6cd7a8176b1d27c7357
selftests/seccomp: Change the syscall used in KILL_THREAD test

commit 471dbc547612adeaa769e48498ef591c6c95a57a upstream.

The Bionic version of pthread_create used on Android calls the prctl
function to give the stack and thread local storage a useful name. This
will cause the KILL_THREAD test to fail as it will kill the thread as
soon as it is created.

change the test to use getpid instead of prctl.

Signed-off-by: Terry Tritton <terry.tritton@linaro.org>
Link: https://lore.kernel.org/r/20240124141357.1243457-3-terry.tritton@linaro.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/testing/selftests/seccomp/seccomp_bpf.c