public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] [GIT PULL][3.6] x86: cr2 and cmpxchg issues of NMI
@ 2012-06-08 13:52 Steven Rostedt
  2012-06-08 13:52 ` [PATCH 1/3] x86: Save cr2 in NMI in case NMIs take a page fault Steven Rostedt
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Steven Rostedt @ 2012-06-08 13:52 UTC (permalink / raw)
  To: linux-kernel; +Cc: Ingo Molnar, Andrew Morton, Thomas Gleixner, H. Peter Anvin

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


Ingo,

As Avi brought to attention, there may be issues with NMIs and page faults
as if a NMI takes a page fault it can corrupt the cr2 for a page fault
handler that it preempted. The first and third patch fixes this for x86_64
and i386 respectively.

The second patch is to fix the cmpxchg issue brought up by someone on LWN.
The NMI handler for i386 uses cmpxchg to handle nested NMIs. But some
older i386 boxes do not have a true cmpxchg and this will fail for them.
Luckily, there is a simple fix that also makes the code cleaner.

Please pull the latest tip/x86/core tree, which can be found at:

  git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git
tip/x86/core

Head SHA1: 7fefda3109021f98926d76a13f90d0b116ce3db5


Steven Rostedt (3):
      x86: Save cr2 in NMI in case NMIs take a page fault
      x86: Remove cmpxchg from i386 NMI nesting code
      x86: Save cr2 in NMI in case NMIs take a page fault (for i386)

----
 arch/x86/kernel/entry_64.S |   20 +++++++++++++++++
 arch/x86/kernel/nmi.c      |   51 +++++++++++++++++++++++++++++++-------------
 2 files changed, 56 insertions(+), 15 deletions(-)

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2012-06-11  3:31 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-08 13:52 [PATCH 0/3] [GIT PULL][3.6] x86: cr2 and cmpxchg issues of NMI Steven Rostedt
2012-06-08 13:52 ` [PATCH 1/3] x86: Save cr2 in NMI in case NMIs take a page fault Steven Rostedt
2012-06-08 13:52 ` [PATCH 2/3] x86: Remove cmpxchg from i386 NMI nesting code Steven Rostedt
2012-06-08 16:10   ` H. Peter Anvin
2012-06-08 16:41     ` Steven Rostedt
2012-06-08 17:28       ` H. Peter Anvin
2012-06-08 17:36         ` Steven Rostedt
2012-06-08 17:39           ` H. Peter Anvin
2012-06-08 17:52             ` Steven Rostedt
2012-06-08 18:04               ` H. Peter Anvin
2012-06-08 18:09               ` Borislav Petkov
2012-06-11  0:25               ` Maciej W. Rozycki
2012-06-11  2:23                 ` H. Peter Anvin
2012-06-11  3:14                   ` Maciej W. Rozycki
2012-06-11  3:17                     ` H. Peter Anvin
2012-06-08 13:52 ` [PATCH 3/3] x86: Save cr2 in NMI in case NMIs take a page fault (for i386) Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox