]> git.baikalelectronics.ru Git - kernel.git/commit
x86: Barf when vmalloc and kmemcheck faults happen in NMI
authorFrederic Weisbecker <fweisbec@gmail.com>
Mon, 27 Sep 2010 16:50:51 +0000 (18:50 +0200)
committerFrederic Weisbecker <fweisbec@gmail.com>
Thu, 14 Oct 2010 18:43:36 +0000 (20:43 +0200)
commitd927c1d4987c2d9f6d73ab7dffaa78892a4e6898
treecba111948a3451550f5d075454648ae4c8f6bada
parenta8fc6d431f4cb1eef6eda5ef5aa881a54b3156d3
x86: Barf when vmalloc and kmemcheck faults happen in NMI

In x86, faults exit by executing the iret instruction, which then
reenables NMIs if we faulted in NMI context. Then if a fault
happens in NMI, another NMI can nest after the fault exits.

But we don't yet support nested NMIs because we have only one NMI
stack. To prevent from that, check that vmalloc and kmemcheck
faults don't happen in this context. Most of the other kernel faults
in NMIs can be more easily spotted by finding explicit
copy_from,to_user() calls on review.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
arch/x86/mm/fault.c
arch/x86/mm/kmemcheck/kmemcheck.c