Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1633885 > unrolled thread

[PATCH 4.10 02/62] sparc64: kern_addr_valid regression

Started byGreg Kroah-Hartman <gregkh@linuxfoundation.org>
First post2017-05-01 23:40 +0200
Last post2017-05-01 23:40 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 4.10 02/62] sparc64: kern_addr_valid regression Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-01 23:40 +0200

#1633885 — [PATCH 4.10 02/62] sparc64: kern_addr_valid regression

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-05-01 23:40 +0200
Subject[PATCH 4.10 02/62] sparc64: kern_addr_valid regression
Message-ID<tCrcZ-5UI-13@gated-at.bofh.it>
4.10-stable review patch.  If anyone has any objections, please let me know.

------------------

From: bob picco <bob.picco@oracle.com>


[ Upstream commit adfae8a5d833fa2b46577a8081f350e408851f5b ]

I encountered this bug when using /proc/kcore to examine the kernel. Plus a
coworker inquired about debugging tools. We computed pa but did
not use it during the maximum physical address bits test. Instead we used
the identity mapped virtual address which will always fail this test.

I believe the defect came in here:
[bpicco@zareason linus.git]$ git describe --contains bb4e6e85daa52
v3.18-rc1~87^2~4
.

Signed-off-by: Bob Picco <bob.picco@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 arch/sparc/mm/init_64.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/arch/sparc/mm/init_64.c
+++ b/arch/sparc/mm/init_64.c
@@ -1495,7 +1495,7 @@ bool kern_addr_valid(unsigned long addr)
 	if ((long)addr < 0L) {
 		unsigned long pa = __pa(addr);
 
-		if ((addr >> max_phys_bits) != 0UL)
+		if ((pa >> max_phys_bits) != 0UL)
 			return false;
 
 		return pfn_valid(pa >> PAGE_SHIFT);

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web