]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
selftests/landlock: Test ptrace as much as possible with Yama
authorJeff Xu <jeffxu@google.com>
Sat, 14 Jan 2023 02:03:06 +0000 (02:03 +0000)
committerMickaël Salaün <mic@digikod.net>
Fri, 27 Jan 2023 17:53:55 +0000 (18:53 +0100)
commit8677e555f17f51321d0730b945aeb7d4b95f998f
tree3c0d004a5630561c2b14dcb70f4a29b131d86166
parent366617a69e60610912836570546f118006ebc7cb
selftests/landlock: Test ptrace as much as possible with Yama

Update ptrace tests according to all potential Yama security policies.
This is required to make such tests pass even if Yama is enabled.

Tests are not skipped but they now check both Landlock and Yama boundary
restrictions at run time to keep a maximum test coverage (i.e. positive
and negative testing).

Signed-off-by: Jeff Xu <jeffxu@google.com>
Link: https://lore.kernel.org/r/20230114020306.1407195-2-jeffxu@google.com
Cc: stable@vger.kernel.org
[mic: Add curly braces around EXPECT_EQ() to make it build, and improve
commit message]
Co-developed-by: Mickaël Salaün <mic@digikod.net>
Signed-off-by: Mickaël Salaün <mic@digikod.net>
tools/testing/selftests/landlock/ptrace_test.c