summaryrefslogtreecommitdiffstats
path: root/arch/x86_64/kernel/entry.S
diff options
context:
space:
mode:
authorAndi Kleen <ak@suse.de>2006-02-03 21:50:41 +0100
committerLinus Torvalds <torvalds@g5.osdl.org>2006-02-04 16:43:12 -0800
commiteddb6fb9a54cdc8c7c37e056a2b4bbbc8a128a36 (patch)
treec8b9a0773518f45aa86d861fce959c3c4f946b06 /arch/x86_64/kernel/entry.S
parent2f01942536d8c686a3f6b3b38f1257caa2fb763e (diff)
downloadblackbird-obmc-linux-eddb6fb9a54cdc8c7c37e056a2b4bbbc8a128a36.tar.gz
blackbird-obmc-linux-eddb6fb9a54cdc8c7c37e056a2b4bbbc8a128a36.zip
[PATCH] x86_64: Disallow kprobes on NMI handlers
A kprobe executes IRET early and that could cause NMI recursion and stack corruption. Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/x86_64/kernel/entry.S')
-rw-r--r--arch/x86_64/kernel/entry.S3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86_64/kernel/entry.S b/arch/x86_64/kernel/entry.S
index dbdba56e8faa..cdf9cb1288c1 100644
--- a/arch/x86_64/kernel/entry.S
+++ b/arch/x86_64/kernel/entry.S
@@ -922,7 +922,7 @@ KPROBE_ENTRY(debug)
.previous .text
/* runs on exception stack */
-ENTRY(nmi)
+KPROBE_ENTRY(nmi)
INTR_FRAME
pushq $-1
CFI_ADJUST_CFA_OFFSET 8
@@ -969,6 +969,7 @@ paranoid_schedule:
cli
jmp paranoid_userspace
CFI_ENDPROC
+ .previous .text
KPROBE_ENTRY(int3)
INTR_FRAME
OpenPOWER on IntegriCloud