Lines Matching refs:pkey
49 #define pkeyshift(pkey) (PKEY_REG_BITS - ((pkey+1) * AMR_BITS_PER_PKEY)) argument
315 static inline void init_amr(int pkey, u8 init_bits) in init_amr() argument
317 u64 new_amr_bits = (((u64)init_bits & 0x3UL) << pkeyshift(pkey)); in init_amr()
318 u64 old_amr = current_thread_amr() & ~((u64)(0x3ul) << pkeyshift(pkey)); in init_amr()
323 static inline void init_iamr(int pkey, u8 init_bits) in init_iamr() argument
325 u64 new_iamr_bits = (((u64)init_bits & 0x1UL) << pkeyshift(pkey)); in init_iamr()
326 u64 old_iamr = current_thread_iamr() & ~((u64)(0x1ul) << pkeyshift(pkey)); in init_iamr()
338 int __arch_set_user_pkey_access(struct task_struct *tsk, int pkey, in __arch_set_user_pkey_access() argument
348 pkey_bits = 0x3ul << pkeyshift(pkey); in __arch_set_user_pkey_access()
362 init_iamr(pkey, new_iamr_bits); in __arch_set_user_pkey_access()
370 init_amr(pkey, new_amr_bits); in __arch_set_user_pkey_access()
392 int pkey) in __arch_override_mprotect_pkey() argument
406 pkey = execute_only_pkey(vma->vm_mm); in __arch_override_mprotect_pkey()
407 if (pkey > 0) in __arch_override_mprotect_pkey()
408 return pkey; in __arch_override_mprotect_pkey()
415 static bool pkey_access_permitted(int pkey, bool write, bool execute) in pkey_access_permitted() argument
420 pkey_shift = pkeyshift(pkey); in pkey_access_permitted()