mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] sparc64: Fix page table walk for PUD hugepages
@ 2017-11-03 19:26 Nitin Gupta
  0 siblings, 0 replies; only message in thread
From: Nitin Gupta @ 2017-11-03 19:26 UTC (permalink / raw)
  To: David S. Miller
  Cc: Al Viro, Nitin Gupta, David S. Miller, Liam R. Howlett,
	Vijay Kumar, Bob Picco, Allen Pais, sparclinux, linux-kernel

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>

diff --git a/arch/sparc/include/asm/tsb.h b/arch/sparc/include/asm/tsb.h
index acf55063aa3d..ca0de1646f1e 100644
--- a/arch/sparc/include/asm/tsb.h
+++ b/arch/sparc/include/asm/tsb.h
@@ -216,7 +216,7 @@ extern struct tsb_phys_patch_entry __tsb_phys_patch, __tsb_phys_patch_end;
 	sllx		REG2, 32, REG2;			\
 	andcc		REG1, REG2, %g0;		\
 	be,pt		%xcc, 700f;			\
-	 sethi		%hi(0x1ffc0000), REG2;		\
+	 sethi		%hi(0xffe00000), REG2;		\
 	sllx		REG2, 1, REG2;			\
 	brgez,pn	REG1, FAIL_LABEL;		\
 	 andn		REG1, REG2, REG1;		\
-- 
2.13.1

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-11-03 19:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-03 19:26 [PATCH] sparc64: Fix page table walk for PUD hugepages Nitin Gupta

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®