linux/arch/x86/kernel/acpi
Kees Cook 7a3136666b x86, suspend: Restore MISC_ENABLE MSR in realmode wakeup
Some BIOSes will reset the Intel MISC_ENABLE MSR (specifically the
XD_DISABLE bit) when resuming from S3, which can interact poorly with
ebba638ae7. In 32bit PAE mode, this can
lead to a fault when EFER is restored by the kernel wakeup routines,
due to it setting the NX bit for a CPU that (thanks to the BIOS reset)
now incorrectly thinks it lacks the NX feature. (64bit is not affected
because it uses a common CPU bring-up that specifically handles the
XD_DISABLE bit.)

The need for MISC_ENABLE being restored so early is specific to the S3
resume path. Normally, MISC_ENABLE is saved in save_processor_state(),
but this happens after the resume header is created, so just reproduce
the logic here. (acpi_suspend_lowlevel() creates the header, calls
do_suspend_lowlevel, which calls save_processor_state(), so the saved
processor context isn't available during resume header creation.)

[ hpa: Consider for stable if OK in mainline ]

Signed-off-by: Kees Cook <kees.cook@canonical.com>
Link: http://lkml.kernel.org/r/20110707011034.GA8523@outflux.net
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: Rafael J. Wysocki <rjw@sisk.pl>
Cc: <stable@kernel.org> 2.6.38+
2011-07-06 20:09:34 -07:00
..
realmode x86, suspend: Restore MISC_ENABLE MSR in realmode wakeup 2011-07-06 20:09:34 -07:00
boot.c x86, ioapic: Consolidate mp_ioapics[] into 'struct ioapic' 2011-05-20 13:40:59 +02:00
cstate.c Merge branch 'x86-idle-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2010-10-21 13:45:38 -07:00
Makefile ACPI: processor: unify arch_acpi_processor_cleanup_pdc 2009-12-22 03:24:14 -05:00
sleep.c x86, suspend: Restore MISC_ENABLE MSR in realmode wakeup 2011-07-06 20:09:34 -07:00
sleep.h Merge branch 'linus' into release 2011-03-23 02:34:54 -04:00
wakeup_32.S Rename .text.page_aligned to .text..page_aligned. 2010-03-03 11:26:00 +01:00
wakeup_64.S Merge branches 'x86/acpi', 'x86/apic', 'x86/asm', 'x86/cleanups', 'x86/mm', 'x86/signal' and 'x86/urgent'; commit 'v2.6.29-rc6' into x86/core 2009-02-24 21:50:43 +01:00
wakeup_rm.S x86: Fix binutils-2.21 symbol related build failures 2011-03-09 10:25:45 +01:00