• David S. Miller's avatar
    sparc64: Add basic validations to {pud,pmd}_bad(). · 26cf4325
    David S. Miller authored
    Instead of returning false we should at least check the most basic
    things, otherwise page table corruptions will be very difficult to
    debug.
    
    PMD and PTE tables are of size PAGE_SIZE, so none of the sub-PAGE_SIZE
    bits should be set.
    
    We also complement this with a check that the physical address the
    pud/pmd points to is valid memory.
    
    PowerPC was used as a guide while implementating this.
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    26cf4325
pgtable_64.h 28.2 KB