linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] selftests/mm: remove PROT_EXEC req from file-collapse tests
@ 2025-09-09 19:05 Zach O'Keefe
  2025-09-10  1:23 ` Baolin Wang
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Zach O'Keefe @ 2025-09-09 19:05 UTC (permalink / raw)
  To: Andrew Morton, David Hildenbrand, Lorenzo Stoakes, Zi Yan,
	Baolin Wang, Liam R. Howlett, Ryan Roberts, Dev Jain, Shuah Khan,
	linux-mm, linux-kselftest, linux-kernel
  Cc: Zach O'Keefe

As of v6.8 commit 7fbb5e188248 ("mm: remove VM_EXEC requirement for THP eligibility")
thp collapse no longer requires file-backed mappings be created with
PROT_EXEC.

Remove the overly-strict dependency from thp collapse tests so we test
the least-strict requirement for success.

Signed-off-by: Zach O'Keefe <zokeefe@google.com>
---
 tools/testing/selftests/mm/khugepaged.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/mm/khugepaged.c b/tools/testing/selftests/mm/khugepaged.c
index a18c50d51141..3fe7ef04ac62 100644
--- a/tools/testing/selftests/mm/khugepaged.c
+++ b/tools/testing/selftests/mm/khugepaged.c
@@ -394,7 +394,7 @@ static void *file_setup_area(int nr_hpages)
 		perror("open()");
 		exit(EXIT_FAILURE);
 	}
-	p = mmap(BASE_ADDR, size, PROT_READ | PROT_EXEC,
+	p = mmap(BASE_ADDR, size, PROT_READ,
 		 MAP_PRIVATE, finfo.fd, 0);
 	if (p == MAP_FAILED || p != BASE_ADDR) {
 		perror("mmap()");
-- 
2.51.0.384.g4c02a37b29-goog



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-09-10  9:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-09 19:05 [PATCH] selftests/mm: remove PROT_EXEC req from file-collapse tests Zach O'Keefe
2025-09-10  1:23 ` Baolin Wang
2025-09-10  3:58 ` Dev Jain
2025-09-10  6:47 ` David Hildenbrand
2025-09-10  9:16 ` Wei Yang
2025-09-10  9:21   ` David Hildenbrand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox