On Fri, Nov 21, 2014 at 11:23 AM, Steven Rostedt <rost...@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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/