Re: pud_bad vs pud_bad

From: Hugh Dickins
Date: Thu Feb 05 2009 - 15:13:48 EST


On Thu, 5 Feb 2009, Ingo Molnar wrote:
> * Hugh Dickins <hugh@xxxxxxxxxxx> wrote:
> >
> > Simpler and more compact, but not as strict: in particular, a value of
> > 0 or 1 is identified as bad by that 64-bit test, but not by the 32-bit.
>
> yes, indeed you are right - the 64-bit test does not allow the KERNPG_TABLE
> bits to go zero.
>
> Those are the present, rw, accessed and dirty bits. Do they really matter
> that much? If a toplevel entry goes !present or readonly, we notice that
> _fast_, without any checks. If it goes !access or !dirty - does that matter?

I've not given it a great deal of thought, why this or that bit.
These p??_bad checks originate from 2.4 or earlier, and by mistake
got weakened somewhere along the way, and last time it was discussed
we agreed to strenghthen them (and IIRC Jeremy himself did so).

>
> These checks are done all the time, and even a single instruction can count.
> The bits that are checked are enough to notice random memory corruption.

Well, I am surprised that you would be arguing for weakening such
a very simple check.

Hugh
--
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/