lkml.org 
[lkml]   [2005]   [May]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patches in this message
/
Date
From
Subject[PATCH] i386 NMI on debug stack check correction
(Note: Patch also attached because the inline version is certain to get
line wrapped.)

Stack pointer comparisons for the NMI on debug stack check/fixup were
incorrect.

Signed-off-by: Jan Beulich <jbeulich@novell.com>

--- linux-2.6.12-rc4.base/arch/i386/kernel/entry.S 2005-05-11 17:27:52.217255616 +0200
+++ linux-2.6.12-rc4/arch/i386/kernel/entry.S 2005-05-11 17:50:36.239892656 +0200
@@ -557,11 +557,10 @@ nmi_stack_fixup:
nmi_debug_stack_check:
cmpw $__KERNEL_CS,16(%esp)
jne nmi_stack_correct
- cmpl $debug - 1,(%esp)
- jle nmi_stack_correct
+ cmpl $debug,(%esp)
+ jb nmi_stack_correct
cmpl $debug_esp_fix_insn,(%esp)
- jle nmi_debug_stack_fixup
-nmi_debug_stack_fixup:
+ ja nmi_stack_correct
FIX_STACK(24,nmi_stack_correct, 1)
jmp nmi_stack_correct


(Note: Patch also attached because the inline version is certain to get
line wrapped.)

Stack pointer comparisons for the NMI on debug stack check/fixup were
incorrect.

Signed-off-by: Jan Beulich <jbeulich@novell.com>

--- linux-2.6.12-rc4.base/arch/i386/kernel/entry.S 2005-05-11 17:27:52.217255616 +0200
+++ linux-2.6.12-rc4/arch/i386/kernel/entry.S 2005-05-11 17:50:36.239892656 +0200
@@ -557,11 +557,10 @@ nmi_stack_fixup:
nmi_debug_stack_check:
cmpw $__KERNEL_CS,16(%esp)
jne nmi_stack_correct
- cmpl $debug - 1,(%esp)
- jle nmi_stack_correct
+ cmpl $debug,(%esp)
+ jb nmi_stack_correct
cmpl $debug_esp_fix_insn,(%esp)
- jle nmi_debug_stack_fixup
-nmi_debug_stack_fixup:
+ ja nmi_stack_correct
FIX_STACK(24,nmi_stack_correct, 1)
jmp nmi_stack_correct
\
 
 \ /
  Last update: 2005-05-12 10:17    [W:0.499 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site