selftest/interpreter: Add tests for trusted_for(2) policies
authorMickaël Salaün <mic@linux.microsoft.com>
Tue, 4 Jan 2022 15:50:24 +0000 (16:50 +0100)
committerMickaël Salaün <mic@digikod.net>
Fri, 4 Feb 2022 10:02:47 +0000 (11:02 +0100)
commiteea13742554eb4fd41c49c9da4d15907fcc04b48
tree43983c4f7f947f4e49914d0841be8ed32f76e19d
parentb635cc3ce5f7e81be8bc1988b853b0866df3cac5
selftest/interpreter: Add tests for trusted_for(2) policies

Test that checks performed by trusted_for(2) on file descriptors are
consistent with noexec mount points and file execute permissions,
according to the policy configured with the fs.trust_policy sysctl.

Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: Mickaël Salaün <mic@linux.microsoft.com>
Reviewed-by: Thibaut Sautereau <thibaut.sautereau@ssi.gouv.fr>
Reviewed-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20220104155024.48023-5-mic@digikod.net
tools/testing/selftests/Makefile
tools/testing/selftests/interpreter/.gitignore [new file with mode: 0644]
tools/testing/selftests/interpreter/Makefile [new file with mode: 0644]
tools/testing/selftests/interpreter/config [new file with mode: 0644]
tools/testing/selftests/interpreter/trust_policy_test.c [new file with mode: 0644]