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)
committerKees Cook <keescook@chromium.org>
Thu, 1 Feb 2024 18:16:03 +0000 (10:16 -0800)
commit471dbc547612adeaa769e48498ef591c6c95a57a
tree2f33b686aa44b6c1de890c869c24116453f32a9e
parentecaaa55c9fa5e8058445a8b891070b12208cdb6d
selftests/seccomp: Change the syscall used in KILL_THREAD test

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>
tools/testing/selftests/seccomp/seccomp_bpf.c