Skip to content

Commit db64dff

Browse files
kevin-brodsky-armctmarinas
authored andcommitted
selftests/mm: Define PKEY_UNRESTRICTED for pkey_sighandler_tests
Commit 6e182dc ("selftests/mm: Use generic pkey register manipulation") makes use of PKEY_UNRESTRICTED in pkey_sighandler_tests. The macro has been proposed for addition to uapi headers [1], but the patch hasn't landed yet. Define PKEY_UNRESTRICTED in pkey-helpers.h for the time being to fix the build. [1] https://lore.kernel.org/all/20241028090715.509527-2-yury.khrustalev@arm.com/ Fixes: 6e182dc ("selftests/mm: Use generic pkey register manipulation") Reported-by: Aishwarya TCV <aishwarya.tcv@arm.com> Signed-off-by: Kevin Brodsky <kevin.brodsky@arm.com> Link: https://lore.kernel.org/r/20241107131640.650703-1-kevin.brodsky@arm.com Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
1 parent 49f5957 commit db64dff

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tools/testing/selftests/mm/pkey-helpers.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,13 @@ void record_pkey_malloc(void *ptr, long size, int prot);
112112
#define PKEY_MASK (PKEY_DISABLE_ACCESS | PKEY_DISABLE_WRITE)
113113
#endif
114114

115+
/*
116+
* FIXME: Remove once the generic PKEY_UNRESTRICTED definition is merged.
117+
*/
118+
#ifndef PKEY_UNRESTRICTED
119+
#define PKEY_UNRESTRICTED 0x0
120+
#endif
121+
115122
#ifndef set_pkey_bits
116123
static inline u64 set_pkey_bits(u64 reg, int pkey, u64 flags)
117124
{

0 commit comments

Comments
 (0)