Lines Matching refs:pkey
14 extern int arch_set_user_pkey_access(struct task_struct *tsk, int pkey,
36 int prot, int pkey);
38 int prot, int pkey)
43 return __arch_override_mprotect_pkey(vma, prot, pkey);
46 extern int __arch_set_user_pkey_access(struct task_struct *tsk, int pkey,
52 #define mm_set_pkey_allocated(mm, pkey) do { \
53 mm_pkey_allocation_map(mm) |= (1U << pkey); \
55 #define mm_set_pkey_free(mm, pkey) do { \
56 mm_pkey_allocation_map(mm) &= ~(1U << pkey); \
60 bool mm_pkey_is_allocated(struct mm_struct *mm, int pkey)
64 * from pkey_alloc() or pkey 0 which is allocated
67 if (pkey < 0)
69 if (pkey >= arch_max_pkey())
72 * The exec-only pkey is set in the allocation map, but
76 if (pkey == mm->context.execute_only_pkey)
79 return mm_pkey_allocation_map(mm) & (1U << pkey);
90 * that the pkey is valid as far as the hardware is
113 int mm_pkey_free(struct mm_struct *mm, int pkey)
115 if (!mm_pkey_is_allocated(mm, pkey))
118 mm_set_pkey_free(mm, pkey);
123 extern int arch_set_user_pkey_access(struct task_struct *tsk, int pkey,
125 extern int __arch_set_user_pkey_access(struct task_struct *tsk, int pkey,