Home
last modified time | relevance | path

Searched refs:pkey (Results 1 – 14 of 14) sorted by relevance

/arch/powerpc/include/asm/
Dpkeys.h33 static inline u64 pkey_to_vmflag_bits(u16 pkey) in pkey_to_vmflag_bits() argument
35 return (((u64)pkey << VM_PKEY_SHIFT) & ARCH_VM_PKEY_FLAGS); in pkey_to_vmflag_bits()
50 #define pkey_alloc_mask(pkey) (0x1 << pkey) argument
54 #define __mm_pkey_allocated(mm, pkey) { \ argument
55 mm_pkey_allocation_map(mm) |= pkey_alloc_mask(pkey); \
58 #define __mm_pkey_free(mm, pkey) { \ argument
59 mm_pkey_allocation_map(mm) &= ~pkey_alloc_mask(pkey); \
62 #define __mm_pkey_is_allocated(mm, pkey) \ argument
63 (mm_pkey_allocation_map(mm) & pkey_alloc_mask(pkey))
65 #define __mm_pkey_is_reserved(pkey) (reserved_allocation_mask & \ argument
[all …]
Dmman.h17 unsigned long pkey) in arch_calc_vm_prot_bits() argument
20 return (((prot & PROT_SAO) ? VM_SAO : 0) | pkey_to_vmflag_bits(pkey)); in arch_calc_vm_prot_bits()
25 #define arch_calc_vm_prot_bits(prot, pkey) arch_calc_vm_prot_bits(prot, pkey) argument
/arch/x86/include/asm/
Dpkeys.h12 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()
44 extern int __arch_set_user_pkey_access(struct task_struct *tsk, int pkey,
50 #define mm_set_pkey_allocated(mm, pkey) do { \ argument
51 mm_pkey_allocation_map(mm) |= (1U << pkey); \
53 #define mm_set_pkey_free(mm, pkey) do { \ argument
54 mm_pkey_allocation_map(mm) &= ~(1U << pkey); \
58 bool mm_pkey_is_allocated(struct mm_struct *mm, int pkey) in mm_pkey_is_allocated() argument
[all …]
Dpkru.h19 static inline bool __pkru_allows_read(u32 pkru, u16 pkey) in __pkru_allows_read() argument
21 int pkru_pkey_bits = pkey * PKRU_BITS_PER_PKEY; in __pkru_allows_read()
25 static inline bool __pkru_allows_write(u32 pkru, u16 pkey) in __pkru_allows_write() argument
27 int pkru_pkey_bits = pkey * PKRU_BITS_PER_PKEY; in __pkru_allows_write()
Dpgtable.h1350 static inline bool __pkru_allows_pkey(u16 pkey, bool write) in __pkru_allows_pkey() argument
1354 if (!__pkru_allows_read(pkru, pkey)) in __pkru_allows_pkey()
1356 if (write && !__pkru_allows_write(pkru, pkey)) in __pkru_allows_pkey()
/arch/powerpc/mm/book3s64/
Dpkeys.c48 #define pkeyshift(pkey) (PKEY_REG_BITS - ((pkey+1) * AMR_BITS_PER_PKEY)) argument
313 static inline void init_amr(int pkey, u8 init_bits) in init_amr() argument
315 u64 new_amr_bits = (((u64)init_bits & 0x3UL) << pkeyshift(pkey)); in init_amr()
316 u64 old_amr = current_thread_amr() & ~((u64)(0x3ul) << pkeyshift(pkey)); in init_amr()
321 static inline void init_iamr(int pkey, u8 init_bits) in init_iamr() argument
323 u64 new_iamr_bits = (((u64)init_bits & 0x1UL) << pkeyshift(pkey)); in init_iamr()
324 u64 old_iamr = current_thread_iamr() & ~((u64)(0x1ul) << pkeyshift(pkey)); in init_iamr()
336 int __arch_set_user_pkey_access(struct task_struct *tsk, int pkey, in __arch_set_user_pkey_access() argument
346 pkey_bits = 0x3ul << pkeyshift(pkey); in __arch_set_user_pkey_access()
360 init_iamr(pkey, new_iamr_bits); in __arch_set_user_pkey_access()
[all …]
/arch/x86/mm/
Dpkeys.c76 int __arch_override_mprotect_pkey(struct vm_area_struct *vma, int prot, int pkey) in __arch_override_mprotect_pkey() argument
82 if (pkey != -1) in __arch_override_mprotect_pkey()
83 return pkey; in __arch_override_mprotect_pkey()
92 pkey = execute_only_pkey(vma->vm_mm); in __arch_override_mprotect_pkey()
93 if (pkey > 0) in __arch_override_mprotect_pkey()
94 return pkey; in __arch_override_mprotect_pkey()
113 #define PKRU_AD_KEY(pkey) (PKRU_AD_BIT << ((pkey) * PKRU_BITS_PER_PKEY)) argument
Dfault.c714 u32 pkey) in kernelmode_fixup_or_oops() argument
740 force_sig_pkuerr((void __user *)address, pkey); in kernelmode_fixup_or_oops()
801 unsigned long address, u32 pkey, int si_code) in __bad_area_nosemaphore() argument
807 SIGSEGV, si_code, pkey); in __bad_area_nosemaphore()
844 force_sig_pkuerr((void __user *)address, pkey); in __bad_area_nosemaphore()
860 unsigned long address, u32 pkey, int si_code) in __bad_area() argument
869 __bad_area_nosemaphore(regs, error_code, address, pkey, si_code); in __bad_area()
925 u32 pkey = vma_pkey(vma); in bad_area_access_error() local
927 __bad_area(regs, error_code, address, pkey, SEGV_PKUERR); in bad_area_access_error()
/arch/arm64/include/asm/
Dmman.h10 unsigned long pkey __always_unused) in arch_calc_vm_prot_bits()
22 #define arch_calc_vm_prot_bits(prot, pkey) arch_calc_vm_prot_bits(prot, pkey) argument
/arch/sparc/include/asm/
Dmman.h30 #define arch_calc_vm_prot_bits(prot, pkey) sparc_calc_vm_prot_bits(prot) argument
/arch/powerpc/mm/
Dfault.c96 int pkey; in bad_access_pkey() local
115 pkey = vma_pkey(vma); in bad_access_pkey()
127 _exception_pkey(regs, address, pkey); in bad_access_pkey()
/arch/s390/crypto/
Dpaes_s390.c146 struct pkey_protkey pkey; in __paes_convert_key() local
148 ret = __paes_keyblob2pkey(&ctx->kb, &pkey); in __paes_convert_key()
153 memcpy(&ctx->pk, &pkey, sizeof(pkey)); in __paes_convert_key()
/arch/x86/kernel/fpu/
Dxstate.c922 int arch_set_user_pkey_access(struct task_struct *tsk, int pkey, in arch_set_user_pkey_access() argument
940 if (WARN_ON_ONCE(pkey >= arch_max_pkey())) in arch_set_user_pkey_access()
950 pkey_shift = pkey * PKRU_BITS_PER_PKEY; in arch_set_user_pkey_access()
/arch/s390/include/uapi/asm/
Dpkey.h443 __u8 __user *pkey; /* in: pkey blob buffer space ptr */ member