x86/pkeys: Add check for pkey "overflow"
[linux-2.6-microblaze.git] / arch / x86 / include / asm / pkeys.h
index 19b137f..2ff9b98 100644 (file)
@@ -4,6 +4,11 @@
 
 #define ARCH_DEFAULT_PKEY      0
 
+/*
+ * If more than 16 keys are ever supported, a thorough audit
+ * will be necessary to ensure that the types that store key
+ * numbers and masks have sufficient capacity.
+ */
 #define arch_max_pkey() (boot_cpu_has(X86_FEATURE_OSPKE) ? 16 : 1)
 
 extern int arch_set_user_pkey_access(struct task_struct *tsk, int pkey,