/linux/arch/x86/include/asm/ |
H A D | pkru.h | 19 static inline bool __pkru_allows_read(u32 pkru, u16 pkey) in __pkru_allows_read() argument 22 return !(pkru & (PKRU_AD_BIT << pkru_pkey_bits)); in __pkru_allows_read() 25 static inline bool __pkru_allows_write(u32 pkru, u16 pkey) in __pkru_allows_write() argument 32 return !(pkru & ((PKRU_AD_BIT|PKRU_WD_BIT) << pkru_pkey_bits)); in __pkru_allows_write() 42 static inline void write_pkru(u32 pkru) in write_pkru() argument 50 if (pkru != rdpkru()) in write_pkru() 51 wrpkru(pkru); in write_pkru()
|
H A D | special_insns.h | 83 u32 edx, pkru; in rdpkru() local 90 : "=a" (pkru), "=d" (edx) in rdpkru() 92 return pkru; in rdpkru() 95 static inline void wrpkru(u32 pkru) in wrpkru() argument 104 : : "a" (pkru), "c"(ecx), "d"(edx)); in wrpkru() 113 static inline void wrpkru(u32 pkru) in wrpkru() argument
|
H A D | processor.h | 497 u32 pkru; member
|
H A D | pgtable.h | 1677 u32 pkru = read_pkru(); in __pkru_allows_pkey() local 1679 if (!__pkru_allows_read(pkru, pkey)) in __pkru_allows_pkey() 1681 if (write && !__pkru_allows_write(pkru, pkey)) in __pkru_allows_pkey()
|
H A D | svm.h | 418 u32 pkru; member
|
H A D | kvm_host.h | 759 u32 pkru; member
|
/linux/arch/x86/kernel/fpu/ |
H A D | signal.c | 69 static inline int update_pkru_in_sigframe(struct xregs_state __user *buf, u32 pkru) in update_pkru_in_sigframe() argument 73 return __put_user(pkru, (unsigned int __user *)get_xsave_addr_user(buf, XFEATURE_PKRU)); in update_pkru_in_sigframe() 169 static inline int copy_fpregs_to_sigframe(struct xregs_state __user *buf, u32 pkru) in copy_fpregs_to_sigframe() argument 176 err = update_pkru_in_sigframe(buf, pkru); in copy_fpregs_to_sigframe() 205 bool copy_fpstate_to_sigframe(void __user *buf, void __user *buf_fx, int size, u32 pkru) in copy_fpstate_to_sigframe() argument 248 ret = copy_fpregs_to_sigframe(buf_fx, pkru); in copy_fpstate_to_sigframe()
|
H A D | xstate.c | 1171 struct pkru_state pkru = {0}; in __copy_xstate_to_uabi_buf() local 1176 pkru.pkru = pkru_val; in __copy_xstate_to_uabi_buf() 1177 membuf_write(&to, &pkru, sizeof(pkru)); in __copy_xstate_to_uabi_buf() 1212 tsk->thread.pkru, copy_mode); in copy_xstate_to_uabi_buf() 1257 const void __user *ubuf, u32 *pkru) in copy_uabi_to_xstate() argument 1310 *pkru = xpkru->pkru; in copy_uabi_to_xstate() 1316 if (pkru) in copy_uabi_to_xstate() 1317 *pkru = 0; in copy_uabi_to_xstate() 1338 int copy_uabi_from_kernel_to_xstate(struct fpstate *fpstate, const void *kbuf, u32 *pkru) in copy_uabi_from_kernel_to_xstate() argument 1340 return copy_uabi_to_xstate(fpstate, kbuf, NULL, pkru); in copy_uabi_from_kernel_to_xstate() [all …]
|
H A D | core.c | 372 unsigned int size, u64 xfeatures, u32 pkru) in fpu_copy_guest_fpstate_to_uabi() argument 379 __copy_xstate_to_uabi_buf(mb, kstate, xfeatures, pkru, in fpu_copy_guest_fpstate_to_uabi()
|
H A D | xstate.h | 50 extern int copy_uabi_from_kernel_to_xstate(struct fpstate *fpstate, const void *kbuf, u32 *pkru);
|
H A D | regset.c | 171 ret = copy_uabi_from_kernel_to_xstate(fpu->fpstate, kbuf ?: tmpbuf, &target->thread.pkru); in xstateregs_set()
|
/linux/arch/x86/kernel/ |
H A D | signal.c | 105 u32 pkru; in get_sigframe() local 161 pkru = sig_prepare_pkru(); in get_sigframe() 163 if (!copy_fpstate_to_sigframe(*fpstate, (void __user *)buf_fx, math_size, pkru)) { in get_sigframe() 168 write_pkru(pkru); in get_sigframe()
|
H A D | process_64.c | 381 prev->pkru = rdpkru(); in x86_pkru_load() 387 if (prev->pkru != next->pkru) in x86_pkru_load() 388 wrpkru(next->pkru); in x86_pkru_load()
|
H A D | process.c | 218 p->thread.pkru = pkru_get_init_value(); in copy_thread() 228 p->thread.pkru = read_pkru(); in copy_thread()
|
/linux/tools/testing/selftests/mm/ |
H A D | pkey_sighandler_tests.c | 310 unsigned long pkru = 0x45454544; in test_pkru_preserved_after_sigusr1() local 323 __write_pkey_reg(pkru); in test_pkru_preserved_after_sigusr1() 333 ksft_test_result(pkru == __read_pkey_reg() && in test_pkru_preserved_after_sigusr1()
|
/linux/arch/x86/include/asm/fpu/ |
H A D | signal.h | 32 extern bool copy_fpstate_to_sigframe(void __user *buf, void __user *fp, int size, u32 pkru);
|
H A D | api.h | 164 unsigned int size, u64 xfeatures, u32 pkru);
|
H A D | types.h | 255 u32 pkru; member
|
/linux/arch/x86/kvm/ |
H A D | mmu.h | 211 pkru_bits = (vcpu->arch.pkru >> (pte_pkey * 2)) & 3; in permission_fault()
|
H A D | x86.c | 1219 vcpu->arch.pkru != vcpu->arch.host_pkru && in kvm_load_guest_xsave_state() 1222 write_pkru(vcpu->arch.pkru); in kvm_load_guest_xsave_state() 1234 vcpu->arch.pkru = rdpkru(); in kvm_load_host_xsave_state() 1235 if (vcpu->arch.pkru != vcpu->arch.host_pkru) in kvm_load_host_xsave_state() 5612 supported_xcr0, vcpu->arch.pkru); in kvm_vcpu_ioctl_x86_get_xsave2() 5632 &vcpu->arch.pkru); in kvm_vcpu_ioctl_x86_set_xsave()
|
/linux/tools/testing/selftests/kvm/include/x86_64/ |
H A D | processor.h | 592 static inline void wrpkru(u32 pkru) in wrpkru() argument 596 : : "a" (pkru), "c"(0), "d"(0)); in wrpkru()
|
/linux/arch/x86/kvm/svm/ |
H A D | sev.c | 849 save->pkru = svm->vcpu.arch.pkru; in sev_es_sync_vmsa() 4597 hostsa->pkru = read_pkru(); in sev_es_prepare_switch_to_guest()
|