]> git.baikalelectronics.ru Git - kernel.git/commit
x86: Stop MCEs and NMIs during code patching
authorAndi Kleen <ak@suse.de>
Sun, 22 Jul 2007 09:12:32 +0000 (11:12 +0200)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Sun, 22 Jul 2007 18:03:37 +0000 (11:03 -0700)
commit8ef199944980802f44885ae1d93d7d9e000d9558
treecc8c93fa1faf5e0b608e3a21330a32bd82fe6f47
parent8628e78639c2393f2d7f8f018e4a48705dc06263
x86: Stop MCEs and NMIs during code patching

When a machine check or NMI occurs while multiple byte code is patched
the CPU could theoretically see an inconsistent instruction and crash.
Prevent this by temporarily disabling MCEs and returning early in the
NMI handler.

Based on discussion with Mathieu Desnoyers.

Cc: Mathieu Desnoyers <compudj@krystal.dyndns.org>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/i386/kernel/alternative.c
arch/i386/kernel/cpu/mcheck/mce.c
arch/i386/kernel/traps.c
arch/x86_64/kernel/mce.c
arch/x86_64/kernel/nmi.c
include/asm-i386/mce.h
include/asm-i386/nmi.h
include/asm-x86_64/mce.h
include/asm-x86_64/nmi.h