All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sparc64: kern_addr_valid regression
@ 2017-03-10 19:31 Bob Picco
  2017-03-28  4:38 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Bob Picco @ 2017-03-10 19:31 UTC (permalink / raw
  To: sparclinux

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

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>
---
 arch/sparc/mm/init_64.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/sparc/mm/init_64.c b/arch/sparc/mm/init_64.c
index 5d2f91511c60..47ecac5106d3 100644
--- 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);
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] sparc64: kern_addr_valid regression
  2017-03-10 19:31 [PATCH] sparc64: kern_addr_valid regression Bob Picco
@ 2017-03-28  4:38 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2017-03-28  4:38 UTC (permalink / raw
  To: sparclinux

From: Bob Picco <bob.picco@oracle.com>
Date: Fri, 10 Mar 2017 14:31:19 -0500

> From: bob picco <bob.picco@oracle.com>
> 
> 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>

Applied and queued up for -stable, thanks Bob.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-03-28  4:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-10 19:31 [PATCH] sparc64: kern_addr_valid regression Bob Picco
2017-03-28  4:38 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.