Skip to content

Commit 73276ce

Browse files
maddy-kerneldevctmarinas
authored andcommitted
selftest/powerpc/mm/pkey: fix build-break introduced by commit 00894c3
Build break was reported in the powerpc mailing list for next-20250218 with below errors make[1]: Nothing to be done for 'all'. BUILD_TARGET=/root/venkat/linux-next/tools/testing/selftests/powerpc/mm; mkdir -p $BUILD_TARGET; make OUTPUT=$BUILD_TARGET -k -C mm all CC pkey_exec_prot In file included from pkey_exec_prot.c:18: /root/venkat/linux-next/tools/testing/selftests/powerpc/include/pkeys.h: In function ‘pkeys_unsupported’: /root/venkat/linux-next/tools/testing/selftests/powerpc/include/pkeys.h:96:34: error: ‘PKEY_UNRESTRICTED’ undeclared (first use in this function) 96 | pkey = sys_pkey_alloc(0, PKEY_UNRESTRICTED); | ^~~~~~~~~~~~~~~~~ https://lore.kernel.org/all/[email protected]/ patchset has been queued to arm64/for-next/pkey_unrestricted which is causing a build break in the selftest/powerpc builds. Commit 6d61527 ("mm/pkey: Add PKEY_UNRESTRICTED macro") added a macro PKEY_UNRESTRICTED to handle implicit literal value of 0x0 (which is "unrestricted"). Add the same to selftest/powerpc/pkeys.h to fix the reported build break. Fixes: 00894c3 ("selftests/powerpc: Use PKEY_UNRESTRICTED macro") Reported-by: Venkat Rao Bagalkote <[email protected]> Closes: https://lore.kernel.org/lkml/[email protected]/T/ Tested-by: Venkat Rao Bagalkote <[email protected]> Signed-off-by: Madhavan Srinivasan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Catalin Marinas <[email protected]>
1 parent 00894c3 commit 73276ce

File tree

1 file changed

+3
-0
lines changed
  • tools/testing/selftests/powerpc/include

1 file changed

+3
-0
lines changed

tools/testing/selftests/powerpc/include/pkeys.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
2424
#undef PKEY_DISABLE_EXECUTE
2525
#define PKEY_DISABLE_EXECUTE 0x4
2626

27+
#undef PKEY_UNRESTRICTED
28+
#define PKEY_UNRESTRICTED 0x0
29+
2730
/* Older versions of libc do not define this */
2831
#ifndef SEGV_PKUERR
2932
#define SEGV_PKUERR 4

0 commit comments

Comments
 (0)