public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Stas Sergeev <stsp@aknet.ru>
To: Linux kernel <linux-kernel@vger.kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Zachary Amsden <zach@vmware.com>,
	Chuck Ebbert <76306.1226@compuserve.com>
Subject: [patch] small fix to espfix code
Date: Mon, 23 Feb 2009 19:13:07 +0300	[thread overview]
Message-ID: <49A2CB13.4080708@aknet.ru> (raw)

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

Hi.

The attached patch fixes a tiny
bug introduced by this patch:
http://lkml.org/lkml/2006/9/30/134
The patch was changing the espfix
stack to be 32bit instead of 16bit,
but this place seems to have been
overlooked.
The code was like this:
---
  	pushl %esp
  	movzwl %sp, %esp
  	addw $4, (%esp)
---
and the patch did:
---
  	pushl %esp
  	CFI_ADJUST_CFA_OFFSET 4
-	movzwl %sp, %esp
  	addw $4, (%esp)
---
but the addw was forgotten to adjust.

The bug is mostly theoretical, I can't
really test the effect of this patch.
So, it is completely untested.

---
Fix tiny bug in the espfix NMI handling
code. The bug was inroduced by this patch:
http://lkml.org/lkml/2006/9/30/134
and can practically never be triggered.

Signed-off-by: Stas Sergeev <stsp@aknet.ru>
CC: Zachary Amsden <zach@vmware.com>
CC: Chuck Ebbert <76306.1226@compuserve.com>

[-- Attachment #2: espfix.diff --]
[-- Type: text/x-patch, Size: 326 bytes --]

--- a/arch/x86/kernel/entry_32.S	2009-01-10 21:03:16.000000000 +0300
+++ b/arch/x86/kernel/entry_32.S	2009-02-15 22:34:23.000000000 +0300
@@ -881,7 +881,7 @@
 	CFI_ADJUST_CFA_OFFSET 4
 	pushl %esp
 	CFI_ADJUST_CFA_OFFSET 4
-	addw $4, (%esp)
+	addl $4, (%esp)
 	/* copy the iret frame of 12 bytes */
 	.rept 3
 	pushl 16(%esp)

             reply	other threads:[~2009-02-23 16:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-23 16:13 Stas Sergeev [this message]
2009-02-23 18:32 ` [patch] small fix to espfix code H. Peter Anvin

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=49A2CB13.4080708@aknet.ru \
    --to=stsp@aknet.ru \
    --cc=76306.1226@compuserve.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zach@vmware.com \
    /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