lkml.org 
[lkml]   [2015]   [Jun]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: why do we need vmalloc_sync_all?

* Andy Lutomirski <luto@amacapital.net> wrote:

> On Sun, Jun 14, 2015 at 7:47 PM, Andi Kleen <andi@firstfloor.org> wrote:
> > Oleg Nesterov <oleg@redhat.com> writes:
> >>
> >> But again, the kernel no longer does this? do_page_fault() does
> >> vmalloc_fault() without notify_die(). If it fails, I do not see how/why a
> >> modular DIE_OOPS handler could try to resolve this problem and trigger
> >> another fault.
> >
> > The same problem can happen from NMI handlers or machine check handlers. It's
> > not necessarily tied to page faults only.
>
> AIUI, the point of the one and only vmalloc_sync_all call is to prevent
> infinitely recursive faults when we call a notify_die callback. The only thing
> that it could realistically protect is module text or static non-per-cpu module
> data, since that's the only thing that's reliably already in the init pgd. I'm
> with Oleg: I don't see how that can happen, since do_page_fault fixes up vmalloc
> faults before it calls notify_die.

Yes, but what I meant is that it can happen if due to an unrelated kernel bug and
unlucky timing we have installed this new handler just when that other unrelated
kernel bug triggers: say a #GPF crash in kernel code.

In any case it should all be mooted with the removal of lazy PGD instantiation.

Thanks,

Ingo


\
 
 \ /
  Last update: 2015-06-15 22:41    [W:0.082 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site