Thread (33 messages) 33 messages, 2 authors, 2020-01-30

Lifecycle

  1. Posted Sandipan Das <sandipan@linux.ibm.com>

[PATCH v17 23/24] selftests/vm/pkeys: Override access right definitions on powerpc

From: Sandipan Das <hidden>
Date: 2020-01-20 08:37:38
Also in: linux-arch, linux-kselftest, linux-mm
Subsystem: kernel selftest framework, the rest · Maintainers: Shuah Khan, Linus Torvalds

From: Ram Pai <redacted>

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.

cc: Dave Hansen <redacted>
cc: Florian Weimer <redacted>
Signed-off-by: Ram Pai <redacted>
Signed-off-by: Sandipan Das <redacted>
---
 tools/testing/selftests/vm/pkey-powerpc.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/vm/pkey-powerpc.h b/tools/testing/selftests/vm/pkey-powerpc.h
index d31665c48f5e..02bd4dd7d467 100644
--- a/tools/testing/selftests/vm/pkey-powerpc.h
+++ b/tools/testing/selftests/vm/pkey-powerpc.h
@@ -16,11 +16,13 @@
 #define fpregs			fp_regs
 #define si_pkey_offset		0x20
 
-#ifndef PKEY_DISABLE_ACCESS
+#ifdef PKEY_DISABLE_ACCESS
+#undef PKEY_DISABLE_ACCESS
 # define PKEY_DISABLE_ACCESS	0x3  /* disable read and write */
 #endif
 
-#ifndef PKEY_DISABLE_WRITE
+#ifdef PKEY_DISABLE_WRITE
+#undef PKEY_DISABLE_WRITE
 # define PKEY_DISABLE_WRITE	0x2
 #endif
 
-- 
2.17.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help