From: Kees Cook Date: Wed, 3 Jan 2018 18:43:32 +0000 (-0800) Subject: KPTI: Report when enabled X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=bfd51a4d715b6ef44bd01b9fbfc13da936f93d76;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.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 d86d56f5e82e..bf6a915f60e7 100644 --- a/arch/x86/mm/kaiser.c +++ b/arch/x86/mm/kaiser.c @@ -11,6 +11,9 @@ #include #include +#undef pr_fmt +#define pr_fmt(fmt) "Kernel/User page tables isolation: " fmt + #include #include /* to verify its kaiser declarations */ #include @@ -293,7 +296,7 @@ enable: 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 */