Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ea6cd39d authored by Kees Cook's avatar Kees Cook Committed by Greg Kroah-Hartman
Browse files

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 e71fac01
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -10,6 +10,9 @@
#include <linux/mm.h>
#include <linux/uaccess.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>
@@ -292,7 +295,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;
@@ -352,6 +355,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 */