Skip to contentSkip to conversation

selftests-mm-only-prepare-ptrace_scope-when-memfd_secret-is-selected.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Oct 9

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: selftests/mm: only prepare ptrace_scope when memfd_secret is selected
has been removed from the -mm tree. Its filename was
selftests-mm-only-prepare-ptrace_scope-when-memfd_secret-is-selected.patch

This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Tianyi Chen <[email protected]>
Subject: selftests/mm: only prepare ptrace_scope when memfd_secret is selected
Date: Thu, 10 Sep 2026 20:56:45 +0800

The memfd_secret setup clears ptrace_scope whenever its test binary is executable, even when a different category was selected. run_test() filters the test invocation, but it does not protect the preceding setup.

Check the category selection before entering the memfd_secret block so running unrelated categories does not change ptrace_scope. Keep the existing executable check and the behavior when memfd_secret is selected.

---

 tools/testing/selftests/mm/run_vmtests.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/mm/run_vmtests.sh renamed from tools/testing/selftests/mm/run_vmtests.sh~selftests-mm-only-prepare-ptrace_scope-when-memfd_secret-is-selected +1 -1
@@ -370,7 +370,7 @@ CATEGORY="process_madv" run_test ./proce
 
 CATEGORY="vma_merge" run_test ./merge
 
-if [ -x ./memfd_secret ]
+if test_selected "memfd_secret" && [ -x ./memfd_secret ]
 then
 if [ -f /proc/sys/kernel/yama/ptrace_scope ]; then
 	(echo 0 > /proc/sys/kernel/yama/ptrace_scope 2>&1) | tap_prefix

_

Patches currently in -mm which might be from [email protected] are