Re: frequent lockups in 3.18rc4
From: Linus Torvalds
Date: Fri Nov 21 2014 - 11:49:04 EST
On Fri, Nov 21, 2014 at 8:38 AM, Andy Lutomirski <luto@xxxxxxxxxxxxxx> wrote:
>
> If you move the vmalloc fixup before exception_enter() and return if
> the fault was from vmalloc, then you can't recurse. You need to be
> careful not to touch anything that uses RCU before exception_enter,
> though.
This is probably the right thing to do anyway.
The vmalloc fixup is purely about filling in hardware structures, so
there really shouldn't be any need for RCU or anything else. It should
probably be done first, before *anything* else (like the whole
kmemcheck/kmmio fault etc handling)
That said, the whole vmalloc_fault fixup routine does some odd things,
over and beyond just filling in the page tables. So I'm not 100% sure
that is safe as-is. The 32-bit version looks fine, but the x86-64
version is very very dubious.
The x86-64 version does crazy things like:
- uses "current->active_mm", which is very dubious
- flush lazy mmu mode
- walk down further in the page tables
and those are just bugs, imnsho. Get rid of that crap. The 32-bit code
does it right.
(The 64-bit mode also has a "WARN_ON_ONCE(in_nmi())", which I guess is
good - but it's good because the 64-bit version is written the way it
is).
Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/