Messages in this thread | | | Date | Fri, 21 Nov 2014 11:34:03 -0800 | Subject | Re: frequent lockups in 3.18rc4 | From | Linus Torvalds <> |
| |
On Fri, Nov 21, 2014 at 11:23 AM, Steven Rostedt <rostedt@goodmis.org> wrote: > > Should we at least check to see if it is present? > > if (!(pgd_entry & 1)) > return -1;
Maybe. But what other entry could there be?
But yes, returning -1 is "safe", since it basically says "I'm not doing a vmalloc thing, oops if this is a bad access". So that kind of argues for being as aggressive as possible in returning 1.
So for the first one (!pgd_entry), instead of returning -1 only for a completely empty entry, returning it for any non-present case is probably right.
And for the second one (where we check whether there is anything at all in the destination), returning -1 for "anything but zero" is probably the right thing to do.
But in the end, if you have a corrupted top-level kernel page table, it sounds to me like you're just royally screwed anyway. So I don't think it matters *that* much.
So I kind of agree, but it wouldn't be my primary worry. My primary worry is actually paravirt doing something insane.
Linus
| |