* x86: Allow vmalloc faults from NMI context
@ 2014-04-10 14:40 Peter Zijlstra
2014-04-10 19:40 ` Steven Rostedt
0 siblings, 1 reply; 2+ messages in thread
From: Peter Zijlstra @ 2014-04-10 14:40 UTC (permalink / raw)
To: Jiri Olsa, Frederic Weisbecker, Ingo Molnar, Thomas Gleixner,
H. Peter Anvin, Steven Rostedt
Cc: linux-kernel
Jiri reported he hit vmalloc_faults()'s:
WARN_ON_ONCE(in_nmi());
The patch that added this ebc8827f75954 ("x86: Barf when vmalloc and
kmemcheck faults happen in NMI") explains that this was done in order to
avoid faults from NMI to cause nested NMIs.
We have, however, completely fixed this issue and can now safely take
faults from NMI context.
Therefore remove this warning. We must still leave the kmemcheck warn in
place since kmemcheck itself can't deal with NMI context yet.
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
---
arch/x86/mm/fault.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c
index 8e5722992677..d0234cdf70f1 100644
--- a/arch/x86/mm/fault.c
+++ b/arch/x86/mm/fault.c
@@ -271,8 +271,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.
@@ -369,8 +367,6 @@ static noinline __kprobes int vmalloc_fault(unsigned long address)
if (!(address >= VMALLOC_START && address < VMALLOC_END))
return -1;
- WARN_ON_ONCE(in_nmi());
-
/*
* Copy kernel mappings over when needed. This can also
* happen within a race in page table update. In the later
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: x86: Allow vmalloc faults from NMI context
2014-04-10 14:40 x86: Allow vmalloc faults from NMI context Peter Zijlstra
@ 2014-04-10 19:40 ` Steven Rostedt
0 siblings, 0 replies; 2+ messages in thread
From: Steven Rostedt @ 2014-04-10 19:40 UTC (permalink / raw)
To: Peter Zijlstra
Cc: Jiri Olsa, Frederic Weisbecker, Ingo Molnar, Thomas Gleixner,
H. Peter Anvin, linux-kernel
On Thu, 10 Apr 2014 16:40:03 +0200
Peter Zijlstra <peterz@infradead.org> wrote:
> Jiri reported he hit vmalloc_faults()'s:
>
> WARN_ON_ONCE(in_nmi());
>
> The patch that added this ebc8827f75954 ("x86: Barf when vmalloc and
> kmemcheck faults happen in NMI") explains that this was done in order to
> avoid faults from NMI to cause nested NMIs.
>
> We have, however, completely fixed this issue and can now safely take
> faults from NMI context.
>
> Therefore remove this warning. We must still leave the kmemcheck warn in
> place since kmemcheck itself can't deal with NMI context yet.
>
Yay, finally....
Link: http://lkml.kernel.org/p/20131015163906.342d8ffa@gandalf.local.home
-- Steve
> Signed-off-by: Peter Zijlstra <peterz@infradead.org>
> ---
> arch/x86/mm/fault.c | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c
> index 8e5722992677..d0234cdf70f1 100644
> --- a/arch/x86/mm/fault.c
> +++ b/arch/x86/mm/fault.c
> @@ -271,8 +271,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.
> @@ -369,8 +367,6 @@ static noinline __kprobes int vmalloc_fault(unsigned long address)
> if (!(address >= VMALLOC_START && address < VMALLOC_END))
> return -1;
>
> - WARN_ON_ONCE(in_nmi());
> -
> /*
> * Copy kernel mappings over when needed. This can also
> * happen within a race in page table update. In the later
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-04-10 19:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-10 14:40 x86: Allow vmalloc faults from NMI context Peter Zijlstra
2014-04-10 19:40 ` Steven Rostedt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox