diff options
author | Kees Cook <keescook@chromium.org> | 2018-01-03 10:18:01 -0800 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2018-01-09 00:35:20 +0000 |
commit | 6ea3e97f1db2adeb219fcdc451ab6ec85f6eb0ad (patch) | |
tree | de21daca3d2b7329e4bc5d75fc5a45ac5621a78e | |
parent | 88c38c3fedd878e608e0eb6a90a74d3ee11ae696 (diff) |
KPTI: Report when enabled
Make sure dmesg reports when KPTI is enabled.
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[bwh: Backported to 3.16: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
-rw-r--r-- | arch/x86/mm/kaiser.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/x86/mm/kaiser.c b/arch/x86/mm/kaiser.c index ad83b6197285..8d1019d176e2 100644 --- a/arch/x86/mm/kaiser.c +++ b/arch/x86/mm/kaiser.c @@ -12,6 +12,9 @@ #include <linux/ftrace.h> #include <xen/xen.h> +#undef pr_fmt +#define pr_fmt(fmt) "Kernel/User page tables isolation: " fmt + extern struct mm_struct init_mm; #include <asm/kaiser.h> @@ -303,7 +306,7 @@ enable: return; disable: - pr_info("Kernel/User page tables isolation: disabled\n"); + pr_info("disabled\n"); silent_disable: kaiser_enabled = 0; @@ -367,6 +370,8 @@ void __init kaiser_init(void) if (vsyscall_enabled()) kaiser_add_user_map_early((void *)VSYSCALL_ADDR, PAGE_SIZE, vsyscall_pgprot); + + pr_info("enabled\n"); } /* Add a mapping to the shadow mapping, and synchronize the mappings */ |