There is fail when excute "kmem -i" on ARM64+kernel-5.10 vmcore:

crash> kmem -i
kmem: invalid kernel virtual address: ffffffff0be00030  type: "page_type"

The slab page is determined by the PG_slab bit of page flag on this vmcore,
when traverse the pages of sparse memory, page_slab() fails to readmem
page_type for a invalid page. Fix this by enhance the determination of slab 
page.

Signed-off-by: qiwu.chen <qiwu.c...@transsion.com>
---
 memory.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/memory.c b/memory.c
index 8c01ed0..e4a058a 100644
--- a/memory.c
+++ b/memory.c
@@ -374,6 +374,8 @@ static bool page_slab(ulong page, ulong flags)
        if (vt->flags & SLAB_PAGEFLAGS) {
                if ((flags >> vt->PG_slab) & 1)
                        return TRUE;
+               else
+                       return FALSE;
        }

        if (VALID_MEMBER(page_page_type)) {
--
2.25.1
--
Crash-utility mailing list -- devel@lists.crash-utility.osci.io
To unsubscribe send an email to devel-le...@lists.crash-utility.osci.io
https://${domain_name}/admin/lists/devel.lists.crash-utility.osci.io/
Contribution Guidelines: https://github.com/crash-utility/crash/wiki

Reply via email to