Messages in this thread | | | Date | Tue, 10 Nov 2009 12:25:39 -0800 | From | "H. Peter Anvin" <> | Subject | Re: [PATCH v4] [x86] detect and report lack of NX protections |
| |
The more I stare at the underlying code, the more I'm convinced that the fundamental problem is that the underlying code is insane, with multiple levels of detection for what amounts to cpu_has_nx, each effectively checking what the previous code has done.
check_efer(), for example, screws with EFER, but EFER is simply set in head_64.S from CPUID (unless Xen does something insane -- but if so, Xen should clear X86_FEATURE_NX instead.)
The 32-bit startup code also sets NX, but yet on 32 bits we wiggle EFER as if it had never been. This code is screaming for cleanup and unification.
-hpa
| |