linux/arch/x86/kernel
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
..
acpi x86, suspend: Restore MISC_ENABLE MSR in realmode wakeup 2011-07-06 20:09:34 -07:00
apic Merge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6 2011-06-14 11:25:32 -07:00
cpu Merge branch 'idle-release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-idle-2.6 2011-05-29 11:18:09 -07:00
.gitignore
alternative.c
amd_gart_64.c
amd_iommu.c x86/amd-iommu: Fix boot crash with hidden PCI devices 2011-06-07 10:06:59 +02:00
amd_iommu_init.c x86/amd-iommu: Fix 3 possible endless loops 2011-06-06 16:10:15 +02:00
amd_nb.c
apb_timer.c
aperture_64.c
apm_32.c Merge branch 'idle-release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-idle-2.6 2011-05-29 11:18:09 -07:00
asm-offsets.c
asm-offsets_32.c
asm-offsets_64.c
audit_64.c
bootflag.c
check.c
cpuid.c
crash.c
crash_dump_32.c
crash_dump_64.c
devicetree.c x86: devicetree: Add missing early_init_dt_setup_initrd_arch stub 2011-06-09 15:39:43 +02:00
doublefault_32.c
dumpstack.c
dumpstack_32.c
dumpstack_64.c
e820.c
early-quirks.c
early_printk.c
entry_32.S
entry_64.S
ftrace.c
head.c
head32.c
head64.c
head_32.S
head_64.S
hpet.c
hw_breakpoint.c
i386_ksyms_32.c
i387.c
i8237.c
i8253.c
i8259.c
init_task.c
io_delay.c
ioport.c
irq.c
irq_32.c
irq_64.c
irq_work.c
irqinit.c
jump_label.c
kdebugfs.c
kgdb.c
kprobes.c
kvm.c
kvmclock.c
ldt.c
machine_kexec_32.c
machine_kexec_64.c
Makefile
mca_32.c
microcode_amd.c
microcode_core.c
microcode_intel.c
mmconf-fam10h_64.c
module.c
mpparse.c
msr.c
paravirt-spinlocks.c
paravirt.c
paravirt_patch_32.c
paravirt_patch_64.c
pci-calgary_64.c
pci-dma.c
pci-iommu_table.c
pci-nommu.c
pci-swiotlb.c
pcspeaker.c
probe_roms.c
process.c x86 idle: APM requires pm_idle/default_idle unconditionally when a module 2011-06-14 13:42:20 -07:00
process_32.c exec: delay address limit change until point of no return 2011-06-09 12:50:05 -07:00
process_64.c exec: delay address limit change until point of no return 2011-06-09 12:50:05 -07:00
ptrace.c
pvclock.c
quirks.c
reboot.c x86, reboot: Acer Aspire One A110 reboot quirk 2011-07-05 19:43:23 -07:00
reboot_32.S
reboot_fixups_32.c
relocate_kernel_32.S
relocate_kernel_64.S
resource.c
rtc.c
setup.c
setup_percpu.c
signal.c
smp.c
smpboot.c x86: cpu-hotplug: Prevent softirq wakeup on wrong CPU 2011-06-08 11:21:19 +02:00
stacktrace.c
step.c
sys_i386_32.c
sys_x86_64.c
syscall_64.c
syscall_table_32.S
tboot.c
tce_64.c
test_nx.c
test_rodata.c
time.c
tls.c
tls.h
topology.c
trampoline.c
trampoline_32.S
trampoline_64.S
traps.c
tsc.c
tsc_sync.c
verify_cpu.S
vm86_32.c
vmlinux.lds.S
vread_tsc_64.c
vsmp_64.c
vsyscall_64.c
x86_init.c
x8664_ksyms_64.c
xsave.c