summaryrefslogtreecommitdiffstats
path: root/fs/proc/task_mmu.c
diff options
context:
space:
mode:
authorRam Pai <linuxram@us.ibm.com>2018-03-27 11:09:27 +0200
committerMichael Ellerman <mpe@ellerman.id.au>2018-05-09 03:50:27 +0200
commit2c9e0a6fa2bb75697981825153128f43b32f6d08 (patch)
tree663f1f94021b3c9bd6638a8ff6f83ad2d47c6868 /fs/proc/task_mmu.c
parentmm, powerpc, x86: define VM_PKEY_BITx bits if CONFIG_ARCH_HAS_PKEYS is enabled (diff)
downloadlinux-2c9e0a6fa2bb75697981825153128f43b32f6d08.tar.xz
linux-2c9e0a6fa2bb75697981825153128f43b32f6d08.zip
mm, powerpc, x86: introduce an additional vma bit for powerpc pkey
Currently only 4bits are allocated in the vma flags to hold 16 keys. This is sufficient for x86. PowerPC supports 32 keys, which needs 5bits. This patch allocates an additional bit. Reviewed-by: Ingo Molnar <mingo@kernel.org> Acked-by: Balbir Singh <bsingharora@gmail.com> Signed-off-by: Ram Pai <linuxram@us.ibm.com> [mpe: Fold in #if VM_PKEY_BIT4 as noticed by Dave Hansen] Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'fs/proc/task_mmu.c')
-rw-r--r--fs/proc/task_mmu.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
index 541392a62608..c2163606e6fb 100644
--- a/fs/proc/task_mmu.c
+++ b/fs/proc/task_mmu.c
@@ -679,6 +679,9 @@ static void show_smap_vma_flags(struct seq_file *m, struct vm_area_struct *vma)
[ilog2(VM_PKEY_BIT1)] = "",
[ilog2(VM_PKEY_BIT2)] = "",
[ilog2(VM_PKEY_BIT3)] = "",
+#if VM_PKEY_BIT4
+ [ilog2(VM_PKEY_BIT4)] = "",
+#endif
#endif /* CONFIG_ARCH_HAS_PKEYS */
};
size_t i;