FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Crash Utility

 
 
LinkBack Thread Tools
 
Old 11-21-2007, 01:45 PM
Dave Anderson
 
Default [Crash-utility] [PATCH] Fix a typo for getting the offset "page.index" ( crash version 4.0-4.9 is availlable)

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@mxs.nes.nec.co.jp)




- 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@mxs.nes.nec.co.jp)



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@mxs.nes.nec.co.jp>
---
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@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility



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

Thread Tools




All times are GMT. The time now is 08:58 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org