]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
KPTI: Report when enabled
authorKees Cook <keescook@chromium.org>
Wed, 3 Jan 2018 18:43:32 +0000 (10:43 -0800)
committerKirtikar Kashyap <kirtikar.kashyap@oracle.com>
Fri, 12 Jan 2018 18:20:10 +0000 (10:20 -0800)
Make sure dmesg reports when KPTI is enabled.

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit bfd51a4d715b6ef44bd01b9fbfc13da936f93d76)
Orabug: 27333760
CVE: CVE-2017-5754
Signed-off-by: Pavel Tatashin <pasha.tatashin@oracle.com>
Conflicts:
arch/x86/mm/kaiser.c

Signed-off-by: Kirtikar Kashyap <kirtikar.kashyap@oracle.com>
arch/x86/mm/kaiser.c

index 50783ad4861dff7a3507baf7b84f7d8e1a6f2831..f77dbc99fefcf3ed559b3e0b09eeb0b59e95ce93 100644 (file)
@@ -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>
@@ -290,7 +293,7 @@ enable:
        return;
 
 disable:
-       pr_info("Kernel/User page tables isolation: disabled\n");
+       pr_info("disabled\n");
        kaiser_enabled = 0;
        setup_clear_cpu_cap(X86_FEATURE_KAISER);
 }
@@ -348,6 +351,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 */