From: Kees Cook Date: Wed, 3 Jan 2018 18:18:01 +0000 (-0800) Subject: KPTI: Report when enabled X-Git-Tag: v4.9.75~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ea6cd39d230f71e27facc0667c1986504e5b0f54;p=platform%2Fkernel%2Flinux-amlogic.git KPTI: Report when enabled Make sure dmesg reports when KPTI is enabled. Signed-off-by: Kees Cook Signed-off-by: Greg Kroah-Hartman --- diff --git a/arch/x86/mm/kaiser.c b/arch/x86/mm/kaiser.c index d43f36912219..b6b0f3aa4f77 100644 --- a/arch/x86/mm/kaiser.c +++ b/arch/x86/mm/kaiser.c @@ -10,6 +10,9 @@ #include #include +#undef pr_fmt +#define pr_fmt(fmt) "Kernel/User page tables isolation: " fmt + #include #include /* to verify its kaiser declarations */ #include @@ -292,7 +295,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) 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 */