/arch/powerpc/include/asm/ |
D | pkeys.h | 33 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 …]
|
D | mman.h | 17 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/ |
D | pkeys.h | 14 extern int arch_set_user_pkey_access(struct task_struct *tsk, int pkey, 36 int prot, int pkey); 38 int prot, int pkey) in arch_override_mprotect_pkey() argument 43 return __arch_override_mprotect_pkey(vma, prot, pkey); in arch_override_mprotect_pkey() 46 extern int __arch_set_user_pkey_access(struct task_struct *tsk, int pkey, 52 #define mm_set_pkey_allocated(mm, pkey) do { \ argument 53 mm_pkey_allocation_map(mm) |= (1U << pkey); \ 55 #define mm_set_pkey_free(mm, pkey) do { \ argument 56 mm_pkey_allocation_map(mm) &= ~(1U << pkey); \ 60 bool mm_pkey_is_allocated(struct mm_struct *mm, int pkey) in mm_pkey_is_allocated() argument [all …]
|
D | pgtable.h | 1373 static inline bool __pkru_allows_read(u32 pkru, u16 pkey) in __pkru_allows_read() argument 1375 int pkru_pkey_bits = pkey * PKRU_BITS_PER_PKEY; in __pkru_allows_read() 1379 static inline bool __pkru_allows_write(u32 pkru, u16 pkey) in __pkru_allows_write() argument 1381 int pkru_pkey_bits = pkey * PKRU_BITS_PER_PKEY; in __pkru_allows_write() 1399 static inline bool __pkru_allows_pkey(u16 pkey, bool write) in __pkru_allows_pkey() argument 1403 if (!__pkru_allows_read(pkru, pkey)) in __pkru_allows_pkey() 1405 if (write && !__pkru_allows_write(pkru, pkey)) in __pkru_allows_pkey()
|
/arch/powerpc/mm/book3s64/ |
D | pkeys.c | 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() [all …]
|
/arch/x86/mm/ |
D | pkeys.c | 76 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
|
D | fault.c | 801 unsigned long address, u32 pkey, int si_code) in __bad_area_nosemaphore() argument 836 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/ |
D | mman.h | 10 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/powerpc/mm/ |
D | fault.c | 94 int pkey; in bad_access_pkey() local 113 pkey = vma_pkey(vma); in bad_access_pkey() 125 _exception_pkey(regs, address, pkey); in bad_access_pkey()
|
/arch/sparc/include/asm/ |
D | mman.h | 30 #define arch_calc_vm_prot_bits(prot, pkey) sparc_calc_vm_prot_bits(prot) argument
|
/arch/s390/crypto/ |
D | paes_s390.c | 141 struct pkey_protkey pkey; in __paes_convert_key() local 143 if (__paes_keyblob2pkey(&ctx->kb, &pkey)) in __paes_convert_key() 147 memcpy(&ctx->pk, &pkey, sizeof(pkey)); in __paes_convert_key()
|
/arch/s390/include/uapi/asm/ |
D | pkey.h | 443 __u8 __user *pkey; /* in: pkey blob buffer space ptr */ member
|
/arch/x86/kernel/fpu/ |
D | xstate.c | 1037 int arch_set_user_pkey_access(struct task_struct *tsk, int pkey, in arch_set_user_pkey_access() argument 1041 int pkey_shift = (pkey * PKRU_BITS_PER_PKEY); in arch_set_user_pkey_access() 1056 WARN_ON_ONCE(pkey >= arch_max_pkey()); in arch_set_user_pkey_access()
|