Re: [PATCH] Fix a typo for getting the offset "page.index" (Re: crash version 4.0-4.9 is availlable)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ken'ichi Ohmichi wrote:
Hi Dave,

Dave Anderson wrote:

- Fix for the "kmem -p" command in kernels configured with
 CONFIG_SPARSEMEM, i.e., not CONFIG_SPARSEMEM_EXTREME.  Without
 the patch, the page structure address for each physical page
 was erroneous.  (oomichi@xxxxxxxxxxxxxxxxx)


- Fix for "kmem -p" on i386 CONFIG_SPARSEMEM kernels with greater than
 4GB of memory.  Without the patch, the physical address value wraps
 back to zero after physical page ffff0000.
 (oomichi@xxxxxxxxxxxxxxxxx)


Thank you for merging my patches.

I tested the latest crash utility (crash-4.0-4.9), and I found a problem
that "kmem -p" fails like the following:

  crash> kmem -p

  kmem: invalid structure member offset: page_index
        FILE: memory.c  LINE: 4116  FUNCTION: dump_mem_map_SPARSEMEM()

  [/usr/bin/crash] error trace: 80a0a75 => 80a3020 => 80a1e25 => 8136ce7
    PAGE    PHYSICAL   MAPPING    INDEX CNT FLAGS
  /usr/bin/nm: /usr/bin/crash: no symbols
  /usr/bin/nm: /usr/bin/crash: no symbols
  /usr/bin/nm: /usr/bin/crash: no symbols
  /usr/bin/nm: /usr/bin/crash: no symbols

  WARNING: Because this kernel was compiled with gcc version 4.1.2, certain
           commands or command options may fail unless crash is invoked with
           the  "--readnow" command line option.

  kmem: invalid structure member offset: page_index
        FILE: memory.c  LINE: 4116  FUNCTION: dump_mem_map_SPARSEMEM()

  crash>

To solve it, this patch fixes a typo for getting the offset "page.index".


Damn.  I introduced this bug when adding the page.index anonymous
member calculation to avoid the "dashing-out" of the mapping
and index values.  This regression warrants an immediate
fix -- I'll post an updated 4.0-4.10 today.

Ken'ichi, thanks for catching this,
  Dave




Thanks
Ken'ichi Ohmichi

Signed-off-by: Ken'ichi Ohmichi <oomichi@xxxxxxxxxxxxxxxxx>
---
diff -rpuN crash-4.0-4.9.org/memory.c crash-4.0-4.9/memory.c
--- crash-4.0-4.9.org/memory.c	2007-11-21 10:48:38.000000000 +0900
+++ crash-4.0-4.9/memory.c	2007-11-21 11:17:15.000000000 +0900
@@ -286,7 +286,7 @@ vm_init(void)
 			STRUCT_SIZE("atomic_t") + sizeof(ulong);
         MEMBER_OFFSET_INIT(page_index, "page", "index");
 	if (INVALID_MEMBER(page_index))
-		ANON_MEMBER_OFFSET_INIT(page_mapping, "page", "index");
+		ANON_MEMBER_OFFSET_INIT(page_index, "page", "index");
         MEMBER_OFFSET_INIT(page_buffers, "page", "buffers");
 	MEMBER_OFFSET_INIT(page_lru, "page", "lru");
 	MEMBER_OFFSET_INIT(page_pte, "page", "pte");
_


--
Crash-utility mailing list
Crash-utility@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/crash-utility


--
Crash-utility mailing list
Crash-utility@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/crash-utility

[Index of Archives]     [Fedora Development]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]

 

Powered by Linux