Commit f0b2b06f authored by Kees Cook's avatar Kees Cook Committed by Kleber Sacilotto de Souza

KPTI: Report when enabled

CVE-2017-5754

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>
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
parent c9fa6e32
......@@ -11,6 +11,9 @@
#include <linux/uaccess.h>
#include <linux/ftrace.h>
#undef pr_fmt
#define pr_fmt(fmt) "Kernel/User page tables isolation: " fmt
#include <asm/kaiser.h>
#include <asm/tlbflush.h> /* to verify its kaiser declarations */
#include <asm/pgtable.h>
......@@ -293,7 +296,7 @@ void __init kaiser_check_boottime_disable(void)
return;
disable:
pr_info("Kernel/User page tables isolation: disabled\n");
pr_info("disabled\n");
silent_disable:
kaiser_enabled = 0;
......@@ -353,6 +356,8 @@ void __init kaiser_init(void)
kaiser_add_user_map_early(&debug_idt_table,
sizeof(gate_desc) * NR_VECTORS,
__PAGE_KERNEL);
pr_info("enabled\n");
}
/* 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