• Hugh Dickins's avatar
    x86: strengthen 64-bit p?d_bad() · a8375bd8
    Hugh Dickins authored
    The x86_64 pgd_bad(), pud_bad(), pmd_bad() inlines have differed from
    their x86_32 counterparts in a couple of ways: they've been unnecessarily
    weak (e.g. letting 0 or 1 count as good), and were typed as unsigned long.
    Strengthen them and return int.
    
    The PAE pmd_bad was too weak before, allowing any junk in the upper half;
    but got strengthened by the patch correcting its ~PAGE_MASK to ~PTE_MASK.
    The PAE pud_bad already said ~PTE_MASK; and since it folds into pgd_bad,
    and we don't set the protection bits at that level, it'll do as is.
    Signed-off-by: default avatarHugh Dickins <hugh@veritas.com>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    a8375bd8
pgtable_64.h 7.86 KB