Skip to content

Commit 2ffc27b

Browse files
Itaru Kitayamaakpm00
authored andcommitted
tools/testing/selftests/mm/run_vmtests.sh: lower the ptrace permissions
On Ubuntu and probably other distros, ptrace permissions are tightend a bit by default; i.e., /proc/sys/kernel/yama/ptrace_score is set to 1. This cases memfd_secret's ptrace attach test fails with a permission error. Set it to 0 piror to running the program. Link: https://lkml.kernel.org/r/20231030-selftest-v1-1-743df68bb996@linux.dev Signed-off-by: Itaru Kitayama <itaru.kitayama@linux.dev> Cc: Shuah Khan <shuah@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
1 parent 90723a8 commit 2ffc27b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tools/testing/selftests/mm/run_vmtests.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,7 @@ CATEGORY="hmm" run_test bash ./test_hmm.sh smoke
303303
# MADV_POPULATE_READ and MADV_POPULATE_WRITE tests
304304
CATEGORY="madv_populate" run_test ./madv_populate
305305

306+
echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope
306307
CATEGORY="memfd_secret" run_test ./memfd_secret
307308

308309
# KSM KSM_MERGE_TIME_HUGE_PAGES test with size of 100

0 commit comments

Comments
 (0)