]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerJiri Slaby <jslaby@suse.cz>
Fri, 31 Oct 2014 14:09:20 +0000 (15:09 +0100)
commita553c52f811798d5cccdd7867db5728c6dc00cf0
tree2ef6f56efb42409556bc2864c82bb17455098cac
parentf215d50902fea10886d602560413d89e279e880b
sparc64: Add basic validations to {pud,pmd}_bad().

[ Upstream commit 26cf432551d749e7d581db33529507a711c6eaab ]

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/sparc/include/asm/pgtable_64.h