mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: "Steven Rostedt" <rostedt@goodmis.org>
Cc: <mingo@elte.hu>, "Peter Zijlstra" <peterz@infradead.org>,
	<linux-kernel@vger.kernel.org>, <hpa@zytor.com>
Subject: Re: recent x86-64 nested NMI adjustments
Date: Mon, 12 Mar 2012 13:31:31 +0000	[thread overview]
Message-ID: <4F5E08C30200007800077ACC@nat28.tlf.novell.com> (raw)
In-Reply-To: <1331558201.25686.629.camel@gandalf.stny.rr.com>

>>> On 12.03.12 at 14:16, Steven Rostedt <rostedt@goodmis.org> wrote:
> On Mon, 2012-03-12 at 12:10 +0000, Jan Beulich wrote:
>> Hi Steven,
>> 
>> the explanation of 45d5a1683c04be28abdf5c04c27b1417e0374486
>> seems bogus to me: When arriving from user mode, %rsp won't point
>> to the user stack anymore, as it gets switched away from during the
>> processing of the exception (the more that the IDT entry specifies a
>> separate stack anyway, which even guarantees this for kernel mode
>> entries).
> 
> No it is real, and I had a test program that exploited it. I'm not
> worried about the current %rsp, I'm worried about what %rsp is saved on
> the stack. Two things are used to check if the incoming NMI is nested or
> not.
> 
> 1) if the on-stack "in-nmi" variable is set
> 
> 2) if the saved %rsp is pointing to the NMI stack.

Ah, right - the way the new check got placed I (wrongly) implied
it to guard the immediately succeeding check of the "special
variable", whereas it really guards (only) test_in_nmi.

Thanks for the explanation, and sorry for the noise then.

Jan


  reply	other threads:[~2012-03-12 13:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-12 12:10 Jan Beulich
2012-03-12 13:16 ` Steven Rostedt
2012-03-12 13:31   ` Jan Beulich [this message]
2012-03-12 14:21     ` Steven Rostedt

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=4F5E08C30200007800077ACC@nat28.tlf.novell.com \
    --to=jbeulich@suse.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.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

all inboxes | Powered by JetHome®