x86/mm/pkeys: Allow kernel to modify user pkey rights register
[cascardo/linux.git] / include / linux / pkeys.h
index 55e465f..fc325b3 100644 (file)
@@ -4,6 +4,11 @@
 #include <linux/mm_types.h>
 #include <asm/mmu_context.h>
 
+#define PKEY_DISABLE_ACCESS    0x1
+#define PKEY_DISABLE_WRITE     0x2
+#define PKEY_ACCESS_MASK       (PKEY_DISABLE_ACCESS |\
+                                PKEY_DISABLE_WRITE)
+
 #ifdef CONFIG_ARCH_HAS_PKEYS
 #include <asm/pkeys.h>
 #else /* ! CONFIG_ARCH_HAS_PKEYS */