nx-emu: standardize boottime message prefix
authorKees Cook <kees.cook@canonical.com>
Fri, 5 Nov 2010 18:55:00 +0000 (11:55 -0700)
committerLeann Ogasawara <leann.ogasawara@canonical.com>
Mon, 28 Mar 2011 13:50:17 +0000 (06:50 -0700)
The state of NX in the booted kernel is easier to find in dmesg if
all the possible modes start with the same bit of text. There's no
good reason to have the NX-emulation message have a different format.

Signed-off-by: Kees Cook <kees.cook@canonical.com>
Signed-off-by: Andy Whitcroft <apw@canonical.com>

arch/x86/mm/setup_nx.c

index 2dfd8d0..db006c1 100644 (file)
@@ -41,12 +41,18 @@ void __cpuinit x86_configure_nx(void)
 void __init x86_report_nx(void)
 {
        if (!cpu_has_nx) {
+#ifdef CONFIG_X86_32
                if (disable_nx)
-                       printk(KERN_INFO "Using x86 segment limits to approximate NX protection\n");
+                       printk(KERN_INFO "NX (Execute Disable) protection: "
+                              "approximated by x86 segment limits\n");
                else
-
+                       printk(KERN_INFO "NX (Execute Disable) protection: "
+                              "approximation disabled by kernel command "
+                              "line option\n");
+#else
                printk(KERN_NOTICE "Notice: NX (Execute Disable) protection "
                       "missing in CPU!\n");
+#endif
        } else {
 #if defined(CONFIG_X86_64) || defined(CONFIG_X86_PAE)
                if (disable_nx) {