public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@elte.hu>,
	Andrew Morton <akpm@linux-foundation.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Peter Zijlstra <peterz@infradead.org>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Andi Kleen <andi@firstfloor.org>,
	"H. Peter Anvin" <hpa@linux.intel.com>,
	Paul Turner <pjt@google.com>
Subject: Re: [RFC][PATCH 5/5 v2] x86: Allow NMIs to hit breakpoints in i386
Date: Wed, 14 Dec 2011 08:44:13 -0500	[thread overview]
Message-ID: <20111214134412.GC2882@Krystal> (raw)
In-Reply-To: <1323870059.23971.23.camel@gandalf.stny.rr.com>

* Steven Rostedt (rostedt@goodmis.org) wrote:
> On Wed, 2011-12-14 at 08:30 -0500, Mathieu Desnoyers wrote:
> 
> > Just to make sure I understand: if an NMI nests over do_nmi between
> > nmi_postprocess() and the following iret (in which case the CPU is in
> > state NMI_NOT_RUNNING), we will end up with two NMI handlers nested on
> > the stack, right ? Given that there is no upper-bound on the nesting
> > level of this situation (although nesting like this more than once is
> > extremely unlikely), is this side-effect something we should care about
> > in terms of stack space usage ?
> 
> At that point, there's very little on the stack to begin with. Just the
> one irq frame, and saved regs, plus the stack frame of this function. If
> we are hitting that many NMIs to cause a stack overflow, then I believe
> there's more issues than the overflow itself. Say, a livelock of NMIs?

Yep, if it's small then it's fine I guess.

> 
> >  Also, is the stack dump OOPS handler
> > aware of this stack layout that was until now impossible ?
> 
> Since NMIs on i386 doesn't change the stack when interrupting the
> kernel, the OOPs handler never was aware of the NMI stack layout.

Makes sense, sounds good,

Thanks!

Mathieu

> 
> -- Steve
> 
> 
> 

-- 
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com

  reply	other threads:[~2011-12-14 13:44 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-14  2:52 [RFC][PATCH 0/5 v2] x86: Find a way to allow breakpoints in NMIs Steven Rostedt
2011-12-14  2:52 ` [RFC][PATCH 1/5 v2] x86: Do not schedule while still in NMI context Steven Rostedt
2011-12-14  2:52 ` [RFC][PATCH 2/5 v2] x86: Document the NMI handler about not using paranoid_exit Steven Rostedt
2011-12-14  2:52 ` [RFC][PATCH 3/5 v2] x86: Add workaround to NMI iret woes Steven Rostedt
2011-12-14  2:52 ` [RFC][PATCH 4/5 v2] x86: Keep current stack in NMI breakpoints Steven Rostedt
2011-12-14 13:43   ` Mathieu Desnoyers
2011-12-14 16:19     ` Steven Rostedt
2011-12-15 19:15     ` Steven Rostedt
2012-01-08  8:59       ` [tip:perf/core] x86: Add counter when debug stack is used with interrupts enabled tip-bot for Steven Rostedt
2011-12-14  2:52 ` [RFC][PATCH 5/5 v2] x86: Allow NMIs to hit breakpoints in i386 Steven Rostedt
2011-12-14 13:30   ` Mathieu Desnoyers
2011-12-14 13:40     ` Steven Rostedt
2011-12-14 13:44       ` Mathieu Desnoyers [this message]
2011-12-14 18:26   ` H. Peter Anvin
2011-12-14 19:33     ` 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=20111214134412.GC2882@Krystal \
    --to=mathieu.desnoyers@efficios.com \
    --cc=akpm@linux-foundation.org \
    --cc=andi@firstfloor.org \
    --cc=fweisbec@gmail.com \
    --cc=hpa@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    --cc=pjt@google.com \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.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