linux-stable/arch/x86
Peter Zijlstra e00b12e64b perf/x86: Further optimize copy_from_user_nmi()
Now that we can deal with nested NMI due to IRET re-enabling NMIs and
can deal with faults from NMI by making sure we preserve CR2 over NMIs
we can in fact simply access user-space memory from NMI context.

So rewrite copy_from_user_nmi() to use __copy_from_user_inatomic() and
rework the fault path to do the minimal required work before taking
the in_atomic() fault handler.

In particular avoid perf_sw_event() which would make perf recurse on
itself (it should be harmless as our recursion protections should be
able to deal with this -- but why tempt fate).

Also rename notify_page_fault() to kprobes_fault() as that is a much
better name; there is no notifier in it and its specific to kprobes.

Don measured that his worst case NMI path shrunk from ~300K cycles to
~150K cycles.

Cc: Stephane Eranian <eranian@google.com>
Cc: jmario@redhat.com
Cc: Arnaldo Carvalho de Melo <acme@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: dave.hansen@linux.intel.com
Tested-by: Don Zickus <dzickus@redhat.com>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20131024105206.GM2490@laptop.programming.kicks-ass.net
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2013-10-29 12:02:54 +01:00
..
boot Merge branch 'x86-kaslr-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2013-09-04 09:38:10 -07:00
configs
crypto Reinstate "crypto: crct10dif - Wrap crc_t10dif function all to use crypto transform framework" 2013-09-07 12:56:26 +10:00
ia32 Merge branch 'x86-smap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2013-09-04 11:08:32 -07:00
include compiler/gcc4: Add quirk for 'asm goto' miscompilation bug 2013-10-11 07:39:14 +02:00
kernel Merge branch 'perf/urgent' into perf/core 2013-10-29 11:23:32 +01:00
kvm KVM: nVMX: fix shadow on EPT 2013-10-10 11:39:57 +02:00
lguest lguest: fix GPF in guest when using gdb. 2013-09-06 08:09:28 +09:30
lib perf/x86: Further optimize copy_from_user_nmi() 2013-10-29 12:02:54 +01:00
math-emu
mm perf/x86: Further optimize copy_from_user_nmi() 2013-10-29 12:02:54 +01:00
net net: fix unsafe set_memory_rw from softirq 2013-10-07 15:16:45 -04:00
oprofile oprofilefs_create_...() do not need superblock argument 2013-09-03 22:52:48 -04:00
pci Revert "x86/PCI: MMCONFIG: Check earlier for MMCONFIG region at address zero" 2013-10-04 16:15:29 -06:00
platform x86, efi: Don't map Boot Services on i386 2013-09-18 14:42:33 +01:00
power x86, asmlinkage, power: Make various symbols used by the suspend asm code visible 2013-08-06 14:21:03 -07:00
realmode
syscalls
tools Merge branch 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2013-09-04 08:39:38 -07:00
um um: prctl: Do not include linux/ptrace.h 2013-09-07 10:57:11 +02:00
vdso
video
xen xen: Fix possible user space selector corruption 2013-10-10 14:39:37 +00:00
.gitignore
Kbuild
Kconfig x86/microcode: Correct Kconfig dependencies 2013-10-14 09:24:27 +02:00
Kconfig.cpu
Kconfig.debug
Makefile x86, relocs: Move ELF relocation handling to C 2013-08-07 21:00:04 -07:00
Makefile.um
Makefile_32.cpu