stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: stable@vger.kernel.org
Subject: [PATCH] Sparc
Date: Mon, 20 Nov 2017 20:53:31 +0900 (KST)	[thread overview]
Message-ID: <20171120.205331.1759913103870322256.davem@davemloft.net> (raw)

[-- Attachment #1: Type: Text/Plain, Size: 71 bytes --]


Please queue up the following bug fix for 4.14.x -stable.

Thank you.

[-- Attachment #2: 0001-sparc64-Fix-page-table-walk-for-PUD-hugepages.patch --]
[-- Type: Text/X-Patch, Size: 1361 bytes --]

>From fac33aa62841b69cd0e19a29b0e2ac96e4e8cf32 Mon Sep 17 00:00:00 2001
From: Nitin Gupta <nitin.m.gupta@oracle.com>
Date: Fri, 3 Nov 2017 12:26:06 -0700
Subject: [PATCH] sparc64: Fix page table walk for PUD hugepages

[ Upstream commit 70f3c8b7c2e7ebcdde8354da004872e7c9184e97 ]

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>
---
 arch/sparc/include/asm/tsb.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/sparc/include/asm/tsb.h b/arch/sparc/include/asm/tsb.h
index 25b6abdb3908..522a677e050d 100644
--- a/arch/sparc/include/asm/tsb.h
+++ b/arch/sparc/include/asm/tsb.h
@@ -217,7 +217,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.6


             reply	other threads:[~2017-11-20 11:53 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-20 11:53 David Miller [this message]
2017-11-20 20:08 ` [PATCH] Sparc Greg KH
  -- strict thread matches above, loose matches on Subject: below --
2020-02-05 14:11 David Miller
2020-02-06  4:54 ` Sasha Levin
2020-02-06  6:49   ` Greg KH
2019-06-03 20:38 David Miller
2019-06-04  7:48 ` Greg KH
2018-05-22 17:51 David Miller
2018-05-22 18:13 ` Greg KH
2018-04-13 17:23 David Miller
2018-04-13 17:38 ` David Miller
2018-04-14 14:05   ` Greg KH
2018-01-01  3:36 David Miller
2018-01-01 10:06 ` Greg KH
2017-08-24  3:25 David Miller
2017-08-25  0:41 ` Greg KH
2017-05-11  2:42 David Miller
2017-05-11  8:36 ` Greg KH
2015-07-03 22:32 [PATCH] SPARC David Miller
2015-07-04  2:57 ` Greg KH
2015-07-09 13:40 ` Luis Henriques

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171120.205331.1759913103870322256.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).