x86/pkeys: Add check for pkey "overflow"
[sfrench/cifs-2.6.git] / arch / x86 / include / asm / pkeys.h
index 19b137f1b3beb9a2eefd9d769933dea444e237ef..2ff9b98812b7637de7fedadc25aa60d20634e19a 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,