Physical address regions above the System RAM size doesn't
have associated page descriptors. In such cases we shouldn't
invoke dump_mem_map().


After the patch :

crash> vtop d1002000
VIRTUAL   PHYSICAL
d1002000  20ec00000

PAGE DIRECTORY: c0578000
  PGD: c0579a20 => c784b000
  PMD: c784b000 => c784b010
  PTE: c784b010 => 20ec0051b
 PAGE: 20ec00000

   PTE     PHYSICAL   FLAGS
20ec0051b  20ec00000  (PRESENT|USER|GUARDED|COHERENT|ACCESSED)

crash>

Signed-off-by: Dave Anderson <[email protected]>
Signed-off-by: Suzuki K. Poulose <[email protected]>
---

 memory.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/memory.c b/memory.c
index 55a184b..84ae1b5 100755
--- a/memory.c
+++ b/memory.c
@@ -2796,7 +2796,7 @@ void
 do_vtop(ulong vaddr, struct task_context *tc, ulong vtop_flags)
 {
        physaddr_t paddr; 
-       ulong vma;
+       ulong vma, page;
        int page_exists;
         struct meminfo meminfo;
         char buf1[BUFSIZE];
@@ -2930,7 +2930,7 @@ do_vtop(ulong vaddr, struct task_context *tc, ulong 
vtop_flags)
 
        fprintf(fp, "\n");
 
-       if (page_exists) { 
+       if (page_exists && phys_to_page(paddr, &page)) { 
                if ((pc->flags & DEVMEM) && (paddr >= VTOP(vt->high_memory)))
                        return;
                BZERO(&meminfo, sizeof(struct meminfo));

--
Crash-utility mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/crash-utility

Reply via email to