From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: 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>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Andi Kleen <andi@firstfloor.org>
Subject: [RFC][PATCH 0/5 v2] x86: Find a way to allow breakpoints in NMIs
Date: Tue, 13 Dec 2011 21:52:37 -0500 [thread overview]
Message-ID: <20111214025237.457632996@goodmis.org> (raw)
OK, this is getting close. Although I'm labeling this as a RFC patchset,
I've already queued it up into my git repo. I did some code cleanups
since the last version, and I also added the IDT update if an
NMI interrupts a process using the debug stack. This way the
NMI wont corrupt it if it hits a breakpoint too.
I've also added code to handle i386, which was quite trivial, as
NMIs and int3s do not change the stack when preempting privilege mode.
That code was done all in C.
I've hammered this code with running perf on top of ftrace using
the breakpoint conversions, and I've done this on two boxes.
Both are holding up very well. I haven't hit any glitches.
With all that said, please take a final look over these patches and
let me know what you think. After that, I'll be pushing this forward
as it is required for my ftrace series.
Note, the below stats look like I added a lot of code. I've actually
added more comments than code, as this needed it.
Thanks!
-- Steve
git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git
tip/x86/core
Head SHA1: e0b5187d3e29df98ae2b4c71250387d824ac90ae
Linus Torvalds (1):
x86: Do not schedule while still in NMI context
Steven Rostedt (4):
x86: Document the NMI handler about not using paranoid_exit
x86: Add workaround to NMI iret woes
x86: Keep current stack in NMI breakpoints
x86: Allow NMIs to hit breakpoints in i386
----
arch/x86/include/asm/desc.h | 12 ++
arch/x86/include/asm/processor.h | 6 +
arch/x86/kernel/cpu/common.c | 22 ++++
arch/x86/kernel/entry_64.S | 208 ++++++++++++++++++++++++++++++++------
arch/x86/kernel/head_64.S | 4 +
arch/x86/kernel/nmi.c | 101 ++++++++++++++++++
arch/x86/kernel/traps.c | 6 +
7 files changed, 326 insertions(+), 33 deletions(-)
next reply other threads:[~2011-12-14 2:52 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-14 2:52 Steven Rostedt [this message]
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
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=20111214025237.457632996@goodmis.org \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=andi@firstfloor.org \
--cc=fweisbec@gmail.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mingo@elte.hu \
--cc=peterz@infradead.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;
as well as URLs for NNTP newsgroup(s).