Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
Commit e4f2eef2 authored by David S. Miller's avatar David S. Miller Committed by Greg Kroah-Hartman
Browse files

sparc64: Add basic validations to {pud,pmd}_bad().

[ Upstream commit 26cf4325

 ]

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>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent eb8ab873
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment