Home Home > GIT Browse > stable-xen
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2018-01-03 10:18:01 -0800
committerBen Hutchings <ben@decadent.org.uk>2018-01-07 01:46:54 +0000
commitb0b7893b1cde5b0121a7d9a619426a93f3026e27 (patch)
treee0eb3adb171a9ff17faa4057e89b4fab1a95d76a
parent108ec7a7d73e90db280f14581ccddc6f9c928bff (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.2: adjust context] Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
-rw-r--r--arch/x86/mm/kaiser.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/x86/mm/kaiser.c b/arch/x86/mm/kaiser.c
index 8565ae286dad..a95acd4c71fa 100644
--- a/arch/x86/mm/kaiser.c
+++ b/arch/x86/mm/kaiser.c
@@ -13,6 +13,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>
@@ -300,7 +303,7 @@ enable:
return;
disable:
- pr_info("Kernel/User page tables isolation: disabled\n");
+ pr_info("disabled\n");
silent_disable:
kaiser_enabled = 0;
@@ -352,6 +355,8 @@ void __init kaiser_init(void)
__PAGE_KERNEL_VVAR);
kaiser_add_user_map_early((void *)VSYSCALL_START, PAGE_SIZE,
vsyscall_pgprot);
+
+ pr_info("enabled\n");
}
/* Add a mapping to the shadow mapping, and synchronize the mappings */