aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/arch/powerpc/include/asm/mmu_context.h
diff options
context:
space:
mode:
authorRam Pai <linuxram@us.ibm.com>2018-01-18 17:50:34 -0800
committerMichael Ellerman <mpe@ellerman.id.au>2018-01-20 22:59:02 +1100
commit87bbabbed8a77092135f6442b8d5619906a81255 (patch)
treeb4038c51b01c27a1bc0f1e194045a273800df157 /arch/powerpc/include/asm/mmu_context.h
parentpowerpc: ability to associate pkey to a vma (diff)
downloadwireguard-linux-87bbabbed8a77092135f6442b8d5619906a81255.tar.xz
wireguard-linux-87bbabbed8a77092135f6442b8d5619906a81255.zip
powerpc: implementation for arch_override_mprotect_pkey()
arch independent code calls arch_override_mprotect_pkey() to return a pkey that best matches the requested protection. This patch provides the implementation. Signed-off-by: Ram Pai <linuxram@us.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/include/asm/mmu_context.h')
-rw-r--r--arch/powerpc/include/asm/mmu_context.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/mmu_context.h b/arch/powerpc/include/asm/mmu_context.h
index 4d69223d217a..3ba571dfdfd9 100644
--- a/arch/powerpc/include/asm/mmu_context.h
+++ b/arch/powerpc/include/asm/mmu_context.h
@@ -198,6 +198,11 @@ static inline bool arch_vma_access_permitted(struct vm_area_struct *vma,
#define thread_pkey_regs_save(thread)
#define thread_pkey_regs_restore(new_thread, old_thread)
#define thread_pkey_regs_init(thread)
+
+static inline int vma_pkey(struct vm_area_struct *vma)
+{
+ return 0;
+}
#endif /* CONFIG_PPC_MEM_KEYS */
#endif /* __KERNEL__ */