x86/pkeys/selftests: Add PROT_EXEC test
commit6af17cf89e99b64cf1f660bf848755442ab2f047
authorDave Hansen <dave.hansen@linux.intel.com>
Wed, 9 May 2018 17:13:48 +0000 (9 10:13 -0700)
committerIngo Molnar <mingo@kernel.org>
Mon, 14 May 2018 09:14:45 +0000 (14 11:14 +0200)
treea7ce9d60f1c483892d161307217d6dcffb4f8c52
parent3fcd2b2d928904cbf30b01e2c5e4f1dd2f9ab262
x86/pkeys/selftests: Add PROT_EXEC test

Under the covers, implement executable-only memory with
protection keys when userspace calls mprotect(PROT_EXEC).

But, we did not have a selftest for that.  Now we do.

Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Dave Hansen <dave.hansen@intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Michael Ellermen <mpe@ellerman.id.au>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ram Pai <linuxram@us.ibm.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-mm@kvack.org
Link: http://lkml.kernel.org/r/20180509171348.9EEE4BEF@viggo.jf.intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
tools/testing/selftests/x86/protection_keys.c