Lines Matching refs:pkey
12 extern int arch_set_user_pkey_access(struct task_struct *tsk, int pkey,
34 int prot, int pkey);
36 int prot, int pkey) in arch_override_mprotect_pkey() argument
41 return __arch_override_mprotect_pkey(vma, prot, pkey); in arch_override_mprotect_pkey()
47 #define mm_set_pkey_allocated(mm, pkey) do { \ argument
48 mm_pkey_allocation_map(mm) |= (1U << pkey); \
50 #define mm_set_pkey_free(mm, pkey) do { \ argument
51 mm_pkey_allocation_map(mm) &= ~(1U << pkey); \
55 bool mm_pkey_is_allocated(struct mm_struct *mm, int pkey) in mm_pkey_is_allocated() argument
62 if (pkey < 0) in mm_pkey_is_allocated()
64 if (pkey >= arch_max_pkey()) in mm_pkey_is_allocated()
71 if (pkey == mm->context.execute_only_pkey) in mm_pkey_is_allocated()
74 return mm_pkey_allocation_map(mm) & (1U << pkey); in mm_pkey_is_allocated()
108 int mm_pkey_free(struct mm_struct *mm, int pkey) in mm_pkey_free() argument
110 if (!mm_pkey_is_allocated(mm, pkey)) in mm_pkey_free()
113 mm_set_pkey_free(mm, pkey); in mm_pkey_free()