Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] selftests/mm: remove the local PKEY_UNRESTRICTED fallback
@ 2026-08-18 11:49 Hemanth Selam
  2026-08-18 13:11 ` David Hildenbrand (Arm)
  0 siblings, 1 reply; 5+ messages in thread
From: Hemanth Selam @ 2026-08-18 11:49 UTC (permalink / raw)
  To: Andrew Morton, David Hildenbrand, Shuah Khan
  Cc: Yury Khrustalev, Kevin Brodsky, Lorenzo Stoakes, Liam R . Howlett,
	Vlastimil Babka, Mike Rapoport, Suren Baghdasaryan, Michal Hocko,
	linux-mm, linux-kselftest, linux-kernel, Hemanth Selam

pkey-helpers.h defines PKEY_UNRESTRICTED itself when the macro is not
already known, a stopgap from when the generic definition was still
under review.  It has been merged since, commit 6d61527d931b ("mm/pkey:
Add PKEY_UNRESTRICTED macro"), and pkey-helpers.h already includes
<linux/mman.h>, so the guard is never taken.  Honour the FIXME and drop
it.

The mm selftests build against the headers of the kernel source, see
Documentation/dev-tools/kselftest.rst.  Building them without "make
headers", against system headers predating the macro, now fails to
compile instead of quietly falling back.

No functional change intended.

Signed-off-by: Hemanth Selam <hemanth.selam@gmail.com>
---
 tools/testing/selftests/mm/pkey-helpers.h | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/tools/testing/selftests/mm/pkey-helpers.h b/tools/testing/selftests/mm/pkey-helpers.h
index 2c377f4e9df1..626c2e1655dc 100644
--- a/tools/testing/selftests/mm/pkey-helpers.h
+++ b/tools/testing/selftests/mm/pkey-helpers.h
@@ -112,13 +112,6 @@ void record_pkey_malloc(void *ptr, long size, int prot);
 #define PKEY_MASK	(PKEY_DISABLE_ACCESS | PKEY_DISABLE_WRITE)
 #endif
 
-/*
- * FIXME: Remove once the generic PKEY_UNRESTRICTED definition is merged.
- */
-#ifndef PKEY_UNRESTRICTED
-#define PKEY_UNRESTRICTED 0x0
-#endif
-
 #ifndef set_pkey_bits
 static inline u64 set_pkey_bits(u64 reg, int pkey, u64 flags)
 {
-- 
2.43.7



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

end of thread, other threads:[~2026-08-18 14:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-18 11:49 [PATCH] selftests/mm: remove the local PKEY_UNRESTRICTED fallback Hemanth Selam
2026-08-18 13:11 ` David Hildenbrand (Arm)
2026-08-18 13:29   ` Lorenzo Stoakes (ARM)
2026-08-18 14:18     ` David Hildenbrand (Arm)
2026-08-18 14:36       ` Lorenzo Stoakes (ARM)

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