]> git.baikalelectronics.ru Git - kernel.git/commit
sparc64: Add basic validations to {pud,pmd}_bad().
authorDavid S. Miller <davem@davemloft.net>
Tue, 29 Apr 2014 20:03:27 +0000 (13:03 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 4 May 2014 05:56:14 +0000 (22:56 -0700)
commitf1927a9c67fa6270ed9c86f3554b976267d1579a
tree2a877a04947ec6ef487a7fe5c60f1c432a67bf94
parent73d8f622adcdb5576fe4955d920c76858260572c
sparc64: Add basic validations to {pud,pmd}_bad().

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: David S. Miller <davem@davemloft.net>
arch/sparc/include/asm/pgtable_64.h