projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
x86/mm/pkeys: Dump pkey from VMA in /proc/pid/smaps
[cascardo/linux.git]
/
arch
/
x86
/
kernel
/
setup.c
diff --git
a/arch/x86/kernel/setup.c
b/arch/x86/kernel/setup.c
index
d3d80e6
..
7260f99
100644
(file)
--- a/
arch/x86/kernel/setup.c
+++ b/
arch/x86/kernel/setup.c
@@
-112,6
+112,7
@@
#include <asm/alternative.h>
#include <asm/prom.h>
#include <asm/microcode.h>
#include <asm/alternative.h>
#include <asm/prom.h>
#include <asm/microcode.h>
+#include <asm/mmu_context.h>
/*
* max_low_pfn_mapped: highest direct mapped pfn under 4GB
/*
* max_low_pfn_mapped: highest direct mapped pfn under 4GB
@@
-1282,3
+1283,11
@@
static int __init register_kernel_offset_dumper(void)
return 0;
}
__initcall(register_kernel_offset_dumper);
return 0;
}
__initcall(register_kernel_offset_dumper);
+
+void arch_show_smap(struct seq_file *m, struct vm_area_struct *vma)
+{
+ if (!boot_cpu_has(X86_FEATURE_OSPKE))
+ return;
+
+ seq_printf(m, "ProtectionKey: %8u\n", vma_pkey(vma));
+}