--- a/tools/testing/selftests/vm/pkey-powerpc.h~selftests-vm-pkeys-override-access-right-definitions-on-powerpc +++ a/tools/testing/selftests/vm/pkey-powerpc.h @@ -16,13 +16,11 @@ #define fpregs fp_regs #define si_pkey_offset 0x20 -#ifndef PKEY_DISABLE_ACCESS -# define PKEY_DISABLE_ACCESS 0x3 /* disable read and write */ -#endif +#undef PKEY_DISABLE_ACCESS +#define PKEY_DISABLE_ACCESS 0x3 /* disable read and write */ -#ifndef PKEY_DISABLE_WRITE -# define PKEY_DISABLE_WRITE 0x2 -#endif +#undef PKEY_DISABLE_WRITE +#define PKEY_DISABLE_WRITE 0x2 #define NR_PKEYS 32 #define NR_RESERVED_PKEYS_4K 27 /* pkey-0, pkey-1, exec-only-pkey