x86/pkeys/selftests: Adjust the self-test to fresh distros that export the pkeys ABI
authorIngo Molnar <mingo@kernel.org>
Mon, 14 May 2018 08:56:23 +0000 (10:56 +0200)
committerIngo Molnar <mingo@kernel.org>
Mon, 14 May 2018 09:14:45 +0000 (11:14 +0200)
commit0fb96620dce351608aa82eed5942e2f58b07beda
tree6d6379683c0724a08bf7fbee6a8c741aed05bc20
parent4a09f0210c8b1221aae8afda8bd3a603fece0986
x86/pkeys/selftests: Adjust the self-test to fresh distros that export the pkeys ABI

Ubuntu 18.04 started exporting pkeys details in header files, resulting
in build failures and warnings in the pkeys self-tests:

  protection_keys.c:232:0: warning: "SEGV_BNDERR" redefined
  protection_keys.c:387:5: error: conflicting types for ‘pkey_get’
  protection_keys.c:409:5: error: conflicting types for ‘pkey_set’
  ...

Fix these namespace conflicts and double definitions, plus also
clean up the ABI definitions to make it all a bit more readable ...

Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: akpm@linux-foundation.org
Cc: dave.hansen@intel.com
Cc: linux-mm@kvack.org
Cc: linuxram@us.ibm.com
Cc: mpe@ellerman.id.au
Cc: shakeelb@google.com
Cc: shuah@kernel.org
Link: http://lkml.kernel.org/r/20180514085623.GB7094@gmail.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
tools/testing/selftests/x86/protection_keys.c