diff options
author | Kees Cook <kees.cook@canonical.com> | 2010-11-10 13:35:53 -0500 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2010-11-10 18:43:09 -0500 |
commit | ebba638ae723d8a8fc2f7abce5ec18b688b791d7 (patch) | |
tree | 774eebadd4ca78e988e8ad029bca0d5e0e43f81c /arch/x86/kernel/head_32.S | |
parent | ae84739c27b6b3725993202fe02ff35ab86468e1 (diff) |
x86, cpu: Call verify_cpu during 32bit CPU startup
The XD_DISABLE-clearing side-effect needs to happen for both 32bit
and 64bit, but the 32bit init routines were not calling verify_cpu()
yet. This adds that call to gain the side-effect.
The longmode/SSE tests being performed in verify_cpu() need to happen very
early for 64bit but not for 32bit. Instead of including it in two places
for 32bit, we can just include it once in arch/x86/kernel/head_32.S.
Signed-off-by: Kees Cook <kees.cook@canonical.com>
LKML-Reference: <1289414154-7829-4-git-send-email-kees.cook@canonical.com>
Acked-by: Pekka Enberg <penberg@kernel.org>
Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'arch/x86/kernel/head_32.S')
-rw-r--r-- | arch/x86/kernel/head_32.S | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/x86/kernel/head_32.S b/arch/x86/kernel/head_32.S index bcece91dd311..fdaea523ac8f 100644 --- a/arch/x86/kernel/head_32.S +++ b/arch/x86/kernel/head_32.S | |||
@@ -314,6 +314,10 @@ ENTRY(startup_32_smp) | |||
314 | subl $0x80000001, %eax | 314 | subl $0x80000001, %eax |
315 | cmpl $(0x8000ffff-0x80000001), %eax | 315 | cmpl $(0x8000ffff-0x80000001), %eax |
316 | ja 6f | 316 | ja 6f |
317 | |||
318 | /* Clear bogus XD_DISABLE bits */ | ||
319 | call verify_cpu | ||
320 | |||
317 | mov $0x80000001, %eax | 321 | mov $0x80000001, %eax |
318 | cpuid | 322 | cpuid |
319 | /* Execute Disable bit supported? */ | 323 | /* Execute Disable bit supported? */ |
@@ -609,6 +613,8 @@ ignore_int: | |||
609 | #endif | 613 | #endif |
610 | iret | 614 | iret |
611 | 615 | ||
616 | #include "verify_cpu.S" | ||
617 | |||
612 | __REFDATA | 618 | __REFDATA |
613 | .align 4 | 619 | .align 4 |
614 | ENTRY(initial_code) | 620 | ENTRY(initial_code) |