summaryrefslogtreecommitdiffstats
path: root/include/asm-x86_64/mce.h
diff options
context:
space:
mode:
authorAndi Kleen <ak@suse.de>2007-07-22 11:12:32 +0200
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-22 20:03:37 +0200
commit8f4e956b313dcccbc7be6f10808952345e3b638c (patch)
treecc8c93fa1faf5e0b608e3a21330a32bd82fe6f47 /include/asm-x86_64/mce.h
parentx86: Fix alternatives and kprobes to remap write-protected kernel text (diff)
downloadlinux-8f4e956b313dcccbc7be6f10808952345e3b638c.tar.xz
linux-8f4e956b313dcccbc7be6f10808952345e3b638c.zip
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>
Diffstat (limited to 'include/asm-x86_64/mce.h')
-rw-r--r--include/asm-x86_64/mce.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/asm-x86_64/mce.h b/include/asm-x86_64/mce.h
index 556be5563e30..7bc030a1996d 100644
--- a/include/asm-x86_64/mce.h
+++ b/include/asm-x86_64/mce.h
@@ -107,6 +107,9 @@ extern void do_machine_check(struct pt_regs *, long);
extern int mce_notify_user(void);
+extern void stop_mce(void);
+extern void restart_mce(void);
+
#endif
#endif