diff mbox series

[v3] selftests/powerpc: Fix pkey syscall redefinitions

Message ID 1bb744b0c7ed3985a5b73289f4de629ac0aeaf7c.1596453627.git.sandipan@linux.ibm.com (mailing list archive)
State Superseded, archived
Headers show
Series [v3] selftests/powerpc: Fix pkey syscall redefinitions | expand

Checks

Context Check Description
snowpatch_ozlabs/apply_patch success Successfully applied on branch powerpc/merge (14fd53d1e5ee7350564cac75e336f8c0dea13bc9)
snowpatch_ozlabs/build-ppc64le warning Upstream build failed, couldn't test patch
snowpatch_ozlabs/build-ppc64be warning Upstream build failed, couldn't test patch
snowpatch_ozlabs/build-ppc64e warning Upstream build failed, couldn't test patch
snowpatch_ozlabs/build-pmac32 warning Upstream build failed, couldn't test patch
snowpatch_ozlabs/checkpatch success total: 0 errors, 0 warnings, 0 checks, 17 lines checked
snowpatch_ozlabs/needsstable success Patch has no Fixes tags

Commit Message

Sandipan Das Aug. 3, 2020, 11:23 a.m. UTC
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 <sachinp@linux.vnet.ibm.com>
Signed-off-by: Sandipan Das <sandipan@linux.ibm.com>
---
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(+)

Comments

Sachin Sant Aug. 3, 2020, 2:07 p.m. UTC | #1
> On 03-Aug-2020, at 4:53 PM, Sandipan Das <sandipan@linux.ibm.com> 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 <sachinp@linux.vnet.ibm.com>
> Signed-off-by: Sandipan Das <sandipan@linux.ibm.com>
> —

Thanks for the fix.

Tested-by: Sachin Sant <sachinp@linux.vnet.ibm.com>
diff mbox series

Patch

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