Skip to content

Commit e950639

Browse files
Ram Paitorvalds
authored andcommitted
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. [[email protected]: fix powerpc access right definitions] Link: http://lkml.kernel.org/r/1ba86fd8a94f38131cfe2d9f277001dd1ad1d34e.1588959697.git.sandipan@linux.ibm.com Signed-off-by: Ram Pai <[email protected]> Signed-off-by: Sandipan Das <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Acked-by: Dave Hansen <[email protected]> Cc: Dave Hansen <[email protected]> Cc: Florian Weimer <[email protected]> Cc: "Desnes A. Nunes do Rosario" <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Thiago Jung Bauermann <[email protected]> Cc: "Aneesh Kumar K.V" <[email protected]> Cc: Michael Ellerman <[email protected]> Cc: Michal Hocko <[email protected]> Cc: Michal Suchanek <[email protected]> Cc: Shuah Khan <[email protected]> Link: http://lkml.kernel.org/r/f6eb38cb3a1e12eb2cdc9da6300bc5a5dfba0db9.1585646528.git.sandipan@linux.ibm.com Signed-off-by: Linus Torvalds <[email protected]>
1 parent fa17437 commit e950639

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

tools/testing/selftests/vm/pkey-powerpc.h

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,11 @@
1616
#define fpregs fp_regs
1717
#define si_pkey_offset 0x20
1818

19-
#ifndef PKEY_DISABLE_ACCESS
20-
# define PKEY_DISABLE_ACCESS 0x3 /* disable read and write */
21-
#endif
19+
#undef PKEY_DISABLE_ACCESS
20+
#define PKEY_DISABLE_ACCESS 0x3 /* disable read and write */
2221

23-
#ifndef PKEY_DISABLE_WRITE
24-
# define PKEY_DISABLE_WRITE 0x2
25-
#endif
22+
#undef PKEY_DISABLE_WRITE
23+
#define PKEY_DISABLE_WRITE 0x2
2624

2725
#define NR_PKEYS 32
2826
#define NR_RESERVED_PKEYS_4K 27 /* pkey-0, pkey-1, exec-only-pkey

0 commit comments

Comments
 (0)