4 #include <linux/mm_types.h>
5 #include <asm/mmu_context.h>
7 #ifdef CONFIG_ARCH_HAS_PKEYS
9 #else /* ! CONFIG_ARCH_HAS_PKEYS */
10 #define arch_max_pkey() (1)
11 #endif /* ! CONFIG_ARCH_HAS_PKEYS */
14 * This is called from mprotect_pkey().
16 * Returns true if the protection keys is valid.
18 static inline bool validate_pkey(int pkey)
22 return (pkey < arch_max_pkey());
25 #endif /* _LINUX_PKEYS_H */