Messages in this thread | | | Date | Tue, 10 Nov 2009 10:53:33 -0800 | From | "H. Peter Anvin" <> | Subject | Re: [PATCH v4] [x86] detect and report lack of NX protections |
| |
On 11/10/2009 09:46 AM, Kees Cook wrote: > > The kernel as-is does not set nx_enabled for 64-bit, so this message is > skipped completely: > > if (nx_enabled) > printk(KERN_INFO "NX (Execute Disable) protection: active\n"); > > The only time this printk is shown is on 32-bit with PAE (with NX). > There is no "else" currently. >
The structure you have is:
if (nx_enabled) else if (cpu_has_pae)
The test for cpu_has_pae is unconditional (you only #ifdef the message) -- in fact, this should cause a compile-time error on 64 bits:
#undef cpu_has_pae #define cpu_has_pae ___BUG___
-hpa
| |