Commit e9506394 authored by Ram Pai's avatar Ram Pai Committed by Linus Torvalds

selftests/vm/pkeys: override access right definitions on powerpc

Some platforms hardcode the x86 values for PKEY_DISABLE_ACCESS
and PKEY_DISABLE_WRITE such as those in:
 /usr/include/bits/mman-shared.h.

This overrides the definitions with correct values for powerpc.

[sandipan@linux.ibm.com: fix powerpc access right definitions]
  Link: http://lkml.kernel.org/r/1ba86fd8a94f38131cfe2d9f277001dd1ad1d34e.1588959697.git.sandipan@linux.ibm.comSigned-off-by: default avatarRam Pai <linuxram@us.ibm.com>
Signed-off-by: default avatarSandipan Das <sandipan@linux.ibm.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Acked-by: default avatarDave Hansen <dave.hansen@intel.com>
Cc: Dave Hansen <dave.hansen@intel.com>
Cc: Florian Weimer <fweimer@redhat.com>
Cc: "Desnes A. Nunes do Rosario" <desnesn@linux.vnet.ibm.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Thiago Jung Bauermann <bauerman@linux.ibm.com>
Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Michal Suchanek <msuchanek@suse.de>
Cc: Shuah Khan <shuah@kernel.org>
Link: http://lkml.kernel.org/r/f6eb38cb3a1e12eb2cdc9da6300bc5a5dfba0db9.1585646528.git.sandipan@linux.ibm.comSigned-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent fa17437c
...@@ -16,13 +16,11 @@ ...@@ -16,13 +16,11 @@
#define fpregs fp_regs #define fpregs fp_regs
#define si_pkey_offset 0x20 #define si_pkey_offset 0x20
#ifndef PKEY_DISABLE_ACCESS #undef PKEY_DISABLE_ACCESS
# define PKEY_DISABLE_ACCESS 0x3 /* disable read and write */ #define PKEY_DISABLE_ACCESS 0x3 /* disable read and write */
#endif
#ifndef PKEY_DISABLE_WRITE #undef PKEY_DISABLE_WRITE
# define PKEY_DISABLE_WRITE 0x2 #define PKEY_DISABLE_WRITE 0x2
#endif
#define NR_PKEYS 32 #define NR_PKEYS 32
#define NR_RESERVED_PKEYS_4K 27 /* pkey-0, pkey-1, exec-only-pkey #define NR_RESERVED_PKEYS_4K 27 /* pkey-0, pkey-1, exec-only-pkey
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment