Lines Matching refs:pkey
44 #define pkeyshift(pkey) (PKEY_REG_BITS - ((pkey+1) * AMR_BITS_PER_PKEY)) argument
260 static inline void init_amr(int pkey, u8 init_bits) in init_amr() argument
262 u64 new_amr_bits = (((u64)init_bits & 0x3UL) << pkeyshift(pkey)); in init_amr()
263 u64 old_amr = read_amr() & ~((u64)(0x3ul) << pkeyshift(pkey)); in init_amr()
268 static inline void init_iamr(int pkey, u8 init_bits) in init_iamr() argument
270 u64 new_iamr_bits = (((u64)init_bits & 0x1UL) << pkeyshift(pkey)); in init_iamr()
271 u64 old_iamr = read_iamr() & ~((u64)(0x1ul) << pkeyshift(pkey)); in init_iamr()
280 int __arch_set_user_pkey_access(struct task_struct *tsk, int pkey, in __arch_set_user_pkey_access() argument
290 pkey_bits = 0x3ul << pkeyshift(pkey); in __arch_set_user_pkey_access()
304 init_iamr(pkey, new_iamr_bits); in __arch_set_user_pkey_access()
312 init_amr(pkey, new_amr_bits); in __arch_set_user_pkey_access()
370 int pkey) in __arch_override_mprotect_pkey() argument
384 pkey = execute_only_pkey(vma->vm_mm); in __arch_override_mprotect_pkey()
385 if (pkey > 0) in __arch_override_mprotect_pkey()
386 return pkey; in __arch_override_mprotect_pkey()
393 static bool pkey_access_permitted(int pkey, bool write, bool execute) in pkey_access_permitted() argument
398 pkey_shift = pkeyshift(pkey); in pkey_access_permitted()