diff options
| author | Andy Lutomirski <[email protected]> | 2015-07-15 17:29:35 +0000 |
|---|---|---|
| committer | Ingo Molnar <[email protected]> | 2015-07-17 10:50:11 +0000 |
| commit | 9b6e6a8334d56354853f9c255d1395c2ba570e0a (patch) | |
| tree | 61707cea588787036c40980b1a6673b7d968b419 /scripts/asn1_compiler.c | |
| parent | x86/nmi/64: Remove asm code that saves CR2 (diff) | |
| download | kernel-9b6e6a8334d56354853f9c255d1395c2ba570e0a.tar.gz kernel-9b6e6a8334d56354853f9c255d1395c2ba570e0a.zip | |
x86/nmi/64: Switch stacks on userspace NMI entry
Returning to userspace is tricky: IRET can fail, and ESPFIX can
rearrange the stack prior to IRET.
The NMI nesting fixup relies on a precise stack layout and
atomic IRET. Rather than trying to teach the NMI nesting fixup
to handle ESPFIX and failed IRET, punt: run NMIs that came from
user mode on the normal kernel stack.
This will make some nested NMIs visible to C code, but the C
code is okay with that.
As a side effect, this should speed up perf: it eliminates an
RDMSR when NMIs come from user mode.
Signed-off-by: Andy Lutomirski <[email protected]>
Reviewed-by: Steven Rostedt <[email protected]>
Reviewed-by: Borislav Petkov <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: [email protected]
Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'scripts/asn1_compiler.c')
0 files changed, 0 insertions, 0 deletions
