public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86: Remove WARN_ON(in_nmi()) from vmalloc_fault
@ 2013-10-15 20:39 Steven Rostedt
  2013-10-16  6:11 ` Ingo Molnar
  2013-10-16 11:40 ` Frederic Weisbecker
  0 siblings, 2 replies; 18+ messages in thread
From: Steven Rostedt @ 2013-10-15 20:39 UTC (permalink / raw)
  To: LKML
  Cc: Ingo Molnar, Thomas Gleixner, H. Peter Anvin, Frederic Weisbecker,
	Andrew Morton, paulmck@linux.vnet.ibm.com, Peter Zijlstra,
	x86@kernel.org, Wang, Xiaoming, Li, Zhuangzhi, Liu, Chuansheng

Since the NMI iretq nesting has been fixed, there's no reason that
an NMI handler can not take a page fault for vmalloc'd code. No locks
are taken in that code path, and the software now handles nested NMIs
when the fault re-enables NMIs on iretq.

Not only that, if the vmalloc_fault() WARN_ON_ONCE() is hit, and that
warn on triggers a vmalloc fault for some reason, then we can go into
an infinite loop (the WARN_ON_ONCE() does the WARN() before updating
the variable to make it happen "once").

Reported-by: "Liu, Chuansheng" <chuansheng.liu@intel.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
 arch/x86/mm/fault.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c
index 3aaeffc..78926c6 100644
--- a/arch/x86/mm/fault.c
+++ b/arch/x86/mm/fault.c
@@ -268,8 +268,6 @@ static noinline __kprobes int vmalloc_fault(unsigned long address)
 	if (!(address >= VMALLOC_START && address < VMALLOC_END))
 		return -1;
 
-	WARN_ON_ONCE(in_nmi());
-
 	/*
 	 * Synchronize this task's top level page-table
 	 * with the 'reference' page table.
-- 
1.8.1.4


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

end of thread, other threads:[~2013-10-18 11:55 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-15 20:39 [PATCH] x86: Remove WARN_ON(in_nmi()) from vmalloc_fault Steven Rostedt
2013-10-16  6:11 ` Ingo Molnar
2013-10-16 12:42   ` Steven Rostedt
2013-10-16 12:51     ` Ingo Molnar
2013-10-16 13:01       ` Borislav Petkov
2013-10-16 13:03       ` Steven Rostedt
2013-10-17  0:29       ` Liu, Chuansheng
2013-10-16 11:40 ` Frederic Weisbecker
2013-10-16 12:45   ` Steven Rostedt
2013-10-16 13:08     ` Frederic Weisbecker
2013-10-16 13:14       ` Steven Rostedt
2013-10-16 13:28         ` Frederic Weisbecker
2013-10-16 13:37           ` Steven Rostedt
2013-10-16 19:39             ` Paul E. McKenney
2013-10-16 19:36       ` Paul E. McKenney
2013-10-16 19:57         ` Steven Rostedt
2013-10-18 11:54           ` Paul E. McKenney
2013-10-17 13:59         ` Frederic Weisbecker

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