Loading arch/x86/include/asm/mmu_context.h +0 −10 Original line number Diff line number Diff line Loading @@ -288,16 +288,6 @@ static inline void arch_unmap(struct mm_struct *mm, struct vm_area_struct *vma, mpx_notify_unmap(mm, vma, start, end); } #ifdef CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS static inline int vma_pkey(struct vm_area_struct *vma) { unsigned long vma_pkey_mask = VM_PKEY_BIT0 | VM_PKEY_BIT1 | VM_PKEY_BIT2 | VM_PKEY_BIT3; return (vma->vm_flags & vma_pkey_mask) >> VM_PKEY_SHIFT; } #endif /* * We only want to enforce protection keys on the current process * because we effectively have no access to PKRU for other Loading arch/x86/include/asm/pkeys.h +8 −0 Original line number Diff line number Diff line Loading @@ -106,4 +106,12 @@ extern int __arch_set_user_pkey_access(struct task_struct *tsk, int pkey, unsigned long init_val); extern void copy_init_pkru_to_fpregs(void); static inline int vma_pkey(struct vm_area_struct *vma) { unsigned long vma_pkey_mask = VM_PKEY_BIT0 | VM_PKEY_BIT1 | VM_PKEY_BIT2 | VM_PKEY_BIT3; return (vma->vm_flags & vma_pkey_mask) >> VM_PKEY_SHIFT; } #endif /*_ASM_X86_PKEYS_H */ include/linux/pkeys.h +1 −1 Original line number Diff line number Diff line Loading @@ -2,7 +2,7 @@ #ifndef _LINUX_PKEYS_H #define _LINUX_PKEYS_H #include <linux/mm_types.h> #include <linux/mm.h> #ifdef CONFIG_ARCH_HAS_PKEYS #include <asm/pkeys.h> Loading Loading
arch/x86/include/asm/mmu_context.h +0 −10 Original line number Diff line number Diff line Loading @@ -288,16 +288,6 @@ static inline void arch_unmap(struct mm_struct *mm, struct vm_area_struct *vma, mpx_notify_unmap(mm, vma, start, end); } #ifdef CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS static inline int vma_pkey(struct vm_area_struct *vma) { unsigned long vma_pkey_mask = VM_PKEY_BIT0 | VM_PKEY_BIT1 | VM_PKEY_BIT2 | VM_PKEY_BIT3; return (vma->vm_flags & vma_pkey_mask) >> VM_PKEY_SHIFT; } #endif /* * We only want to enforce protection keys on the current process * because we effectively have no access to PKRU for other Loading
arch/x86/include/asm/pkeys.h +8 −0 Original line number Diff line number Diff line Loading @@ -106,4 +106,12 @@ extern int __arch_set_user_pkey_access(struct task_struct *tsk, int pkey, unsigned long init_val); extern void copy_init_pkru_to_fpregs(void); static inline int vma_pkey(struct vm_area_struct *vma) { unsigned long vma_pkey_mask = VM_PKEY_BIT0 | VM_PKEY_BIT1 | VM_PKEY_BIT2 | VM_PKEY_BIT3; return (vma->vm_flags & vma_pkey_mask) >> VM_PKEY_SHIFT; } #endif /*_ASM_X86_PKEYS_H */
include/linux/pkeys.h +1 −1 Original line number Diff line number Diff line Loading @@ -2,7 +2,7 @@ #ifndef _LINUX_PKEYS_H #define _LINUX_PKEYS_H #include <linux/mm_types.h> #include <linux/mm.h> #ifdef CONFIG_ARCH_HAS_PKEYS #include <asm/pkeys.h> Loading