Commit bfd51a4d authored by Kees Cook's avatar Kees Cook Committed by Greg Kroah-Hartman

KPTI: Report when enabled

Make sure dmesg reports when KPTI is enabled.
Signed-off-by: default avatarKees Cook <keescook@chromium.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3e1457d6
...@@ -11,6 +11,9 @@ ...@@ -11,6 +11,9 @@
#include <linux/uaccess.h> #include <linux/uaccess.h>
#include <linux/ftrace.h> #include <linux/ftrace.h>
#undef pr_fmt
#define pr_fmt(fmt) "Kernel/User page tables isolation: " fmt
#include <asm/kaiser.h> #include <asm/kaiser.h>
#include <asm/tlbflush.h> /* to verify its kaiser declarations */ #include <asm/tlbflush.h> /* to verify its kaiser declarations */
#include <asm/pgtable.h> #include <asm/pgtable.h>
...@@ -293,7 +296,7 @@ void __init kaiser_check_boottime_disable(void) ...@@ -293,7 +296,7 @@ void __init kaiser_check_boottime_disable(void)
return; return;
disable: disable:
pr_info("Kernel/User page tables isolation: disabled\n"); pr_info("disabled\n");
silent_disable: silent_disable:
kaiser_enabled = 0; kaiser_enabled = 0;
...@@ -353,6 +356,8 @@ void __init kaiser_init(void) ...@@ -353,6 +356,8 @@ void __init kaiser_init(void)
kaiser_add_user_map_early(&debug_idt_table, kaiser_add_user_map_early(&debug_idt_table,
sizeof(gate_desc) * NR_VECTORS, sizeof(gate_desc) * NR_VECTORS,
__PAGE_KERNEL); __PAGE_KERNEL);
pr_info("enabled\n");
} }
/* Add a mapping to the shadow mapping, and synchronize the mappings */ /* Add a mapping to the shadow mapping, and synchronize the mappings */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment