diff options
| author | Mark Brown <broonie@kernel.org> | 2025-06-10 15:07:44 +0100 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2025-07-09 22:42:05 -0700 |
| commit | ba78585585d9f5ec4dd32de7b3027a86fe33cee0 (patch) | |
| tree | eca3bc21e360cb1289a33295712c5576b76ee64a /lib/test_hmm.c | |
| parent | 4ff52d4a2de1c2adc77b2cca82b542cd916b42a9 (diff) | |
selftests/mm: check for YAMA ptrace_scope configuraiton before modifying it
When running the memfd_secret test run_vmtests.sh unconditionally tries
to confgiure the YAMA LSM's ptrace_scope configuration, leading to an error
if YAMA is not in the running kernel:
# ./run_vmtests.sh: line 432: /proc/sys/kernel/yama/ptrace_scope: No such file or directory
# # ----------------------
# # running ./memfd_secret
# # ----------------------
Check that this file is present before trying to write to it.
The indentation here is a bit odd, and it doesn't seem great that we
configure but don't restore ptrace_scope.
Link: https://lkml.kernel.org/r/20250610-selftest-mm-enable-yama-v1-1-0097b6713116@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Acked-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Acked-by: David Hildenbrand <david@redhat.com>
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'lib/test_hmm.c')
0 files changed, 0 insertions, 0 deletions