Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

sparc64: Fix page table walk for PUD hugepages

For a PUD hugepage entry, we need to propagate bits [32:22]
from virtual address to resolve at 4M granularity. However,
the current code was incorrectly propagating bits [29:19].
This bug can cause incorrect data to be returned for pages
backed with 16G hugepages.

Signed-off-by: Nitin Gupta <nitin.m.gupta@oracle.com>
Reported-by: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Nitin Gupta and committed by
David S. Miller
70f3c8b7 ff029687

+1 -1
+1 -1
arch/sparc/include/asm/tsb.h
··· 216 216 sllx REG2, 32, REG2; \ 217 217 andcc REG1, REG2, %g0; \ 218 218 be,pt %xcc, 700f; \ 219 - sethi %hi(0x1ffc0000), REG2; \ 219 + sethi %hi(0xffe00000), REG2; \ 220 220 sllx REG2, 1, REG2; \ 221 221 brgez,pn REG1, FAIL_LABEL; \ 222 222 andn REG1, REG2, REG1; \