selftests: improve vm.memfd_noexec sysctl tests
authorAleksa Sarai <cyphar@cyphar.com>
Mon, 14 Aug 2023 08:41:01 +0000 (18:41 +1000)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 21 Aug 2023 20:38:00 +0000 (13:38 -0700)
commit6469b66e3f5a38214bf1d1220d54d78d9cd08ebd
treeb08c8b954764ff3a7f35b08fdda48e2ac6dbe999
parent9876cfe8ec1cb3c88de31f4d58d57b0e7e22bcc4
selftests: improve vm.memfd_noexec sysctl tests

This adds proper tests for the nesting functionality of vm.memfd_noexec as
well as some minor cleanups to spawn_*_thread().

Link: https://lkml.kernel.org/r/20230814-memfd-vm-noexec-uapi-fixes-v2-5-7ff9e3e10ba6@cyphar.com
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
Cc: Christian Brauner <brauner@kernel.org>
Cc: Daniel Verkamp <dverkamp@chromium.org>
Cc: Dominique Martinet <asmadeus@codewreck.org>
Cc: Jeff Xu <jeffxu@google.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
tools/testing/selftests/memfd/memfd_test.c