public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@novell.com>
To: <linux-kernel@vger.kernel.org>
Subject: [PATCH] i386 NMI on debug stack check correction
Date: Thu, 12 May 2005 10:12:46 +0200	[thread overview]
Message-ID: <s2831dfd.009@emea1-mh.id2.novell.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 799 bytes --]

(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
 



[-- Attachment #2: linux-2.6.12-rc4-i386-nmi.patch --]
[-- Type: text/plain, Size: 770 bytes --]

(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
 

                 reply	other threads:[~2005-05-12  8:12 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=s2831dfd.009@emea1-mh.id2.novell.com \
    --to=jbeulich@novell.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox