[PATCH v3] selftests/powerpc: Fix pkey syscall redefinitions

Subsystems: kernel selftest framework, the rest

STALE2205d

2 messages, 2 authors, 2020-08-03 · open the first message on its own page

[PATCH v3] selftests/powerpc: Fix pkey syscall redefinitions

From: Sandipan Das <hidden>
Date: 2020-08-03 11:25:40

On some distros, there are conflicts w.r.t to redefinition
of pkey syscall numbers which cause build failures. This
fixes them.

Reported-by: Sachin Sant <redacted>
Signed-off-by: Sandipan Das <redacted>
---
Previous versions can be found at:
v2: https://lore.kernel.org/linuxppc-dev/566dde119ce71f00f9642807ba30ceb7f54c9bfa.1596441105.git.sandipan@linux.ibm.com/
v1: https://lore.kernel.org/linuxppc-dev/20200803074043.466809-1-sandipan@linux.ibm.com/

Changes in v3:
- Use ifndef...endif instead of undef as suggested by
  Michael.

Changes in v2:
- Fix incorrect commit message.

---
 tools/testing/selftests/powerpc/include/pkeys.h | 8 ++++++++
 1 file changed, 8 insertions(+)
diff --git a/tools/testing/selftests/powerpc/include/pkeys.h b/tools/testing/selftests/powerpc/include/pkeys.h
index 6ba95039a034..54bf9aa9e1e1 100644
--- a/tools/testing/selftests/powerpc/include/pkeys.h
+++ b/tools/testing/selftests/powerpc/include/pkeys.h
@@ -31,9 +31,17 @@
 
 #define SI_PKEY_OFFSET	0x20
 
+#ifndef SYS_pkey_mprotect
 #define SYS_pkey_mprotect	386
+#endif
+
+#ifndef SYS_pkey_alloc
 #define SYS_pkey_alloc		384
+#endif
+
+#ifndef SYS_pkey_free
 #define SYS_pkey_free		385
+#endif
 
 #define PKEY_BITS_PER_PKEY	2
 #define NR_PKEYS		32
-- 
2.25.1

Re: [PATCH v3] selftests/powerpc: Fix pkey syscall redefinitions

From: Sachin Sant <hidden>
Date: 2020-08-03 14:11:44

On 03-Aug-2020, at 4:53 PM, Sandipan Das [off-list ref] wrote:

On some distros, there are conflicts w.r.t to redefinition
of pkey syscall numbers which cause build failures. This
fixes them.

Reported-by: Sachin Sant <redacted>
Signed-off-by: Sandipan Das <redacted>
—
Thanks for the fix.

Tested-by: Sachin Sant <redacted>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help