Skip to contentSkip to conversation

i386 NMI pointer comparison fix

PATCH New Jan Beulich 1 participant 1 message Nov 7, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 i386 NMI pointer comparison fix

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

From: Jan Beulich <[email protected]>

(actual patch attached)

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

From: Jan Beulich <[email protected]>

arch/i386/kernel/entry.S renamed from home/jbeulich/tmp/linux-2.6.14/arch/i386/kernel/entry.S +3 -4
@@ -560,11 +560,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