+ lower-the-ptrace-permissions-so-that-the-memfd_secrect-test-program-runs-without-an-issue.patch added to mm-nonmm-unstable branch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: tools/testing/selftests/mm/run_vmtests.sh: lower the ptrace permissions
has been added to the -mm mm-nonmm-unstable branch.  Its filename is
     lower-the-ptrace-permissions-so-that-the-memfd_secrect-test-program-runs-without-an-issue.patch

This patch will shortly appear at
     https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/lower-the-ptrace-permissions-so-that-the-memfd_secrect-test-program-runs-without-an-issue.patch

This patch will later appear in the mm-nonmm-unstable branch at
    git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days

------------------------------------------------------
From: Itaru Kitayama <itaru.kitayama@xxxxxxxxx>
Subject: tools/testing/selftests/mm/run_vmtests.sh: lower the ptrace permissions
Date: Mon, 30 Oct 2023 17:54:45 +0900

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@xxxxxxxxx
Signed-off-by: Itaru Kitayama <itaru.kitayama@xxxxxxxxx>
Cc: Shuah Khan <shuah@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 tools/testing/selftests/mm/run_vmtests.sh |    1 +
 1 file changed, 1 insertion(+)

--- a/tools/testing/selftests/mm/run_vmtests.sh~lower-the-ptrace-permissions-so-that-the-memfd_secrect-test-program-runs-without-an-issue
+++ a/tools/testing/selftests/mm/run_vmtests.sh
@@ -309,6 +309,7 @@ CATEGORY="hmm" run_test bash ./test_hmm.
 # MADV_POPULATE_READ and MADV_POPULATE_WRITE tests
 CATEGORY="madv_populate" run_test ./madv_populate
 
+echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope
 CATEGORY="memfd_secret" run_test ./memfd_secret
 
 # KSM KSM_MERGE_TIME_HUGE_PAGES test with size of 100
_

Patches currently in -mm which might be from itaru.kitayama@xxxxxxxxx are

lower-the-ptrace-permissions-so-that-the-memfd_secrect-test-program-runs-without-an-issue.patch




[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux