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 01-01-1970, 01:00 AM
HATAYAMA Daisuke
 
Default kmem, snap: iomem/ioport display and vmcore snapshot support

From: Dave Anderson <anderson@redhat.com>
Subject: Re: [Crash-utility] [PATCH] kmem, snap: iomem/ioport display and vmcore snapshot support
Date: Tue, 13 Mar 2012 10:17:20 -0400 (EDT)

>
>
> ----- Original Message -----
>> Some days ago I was in a situation that I had to convert vmcore in
>> kvmdump format into ELF since some extension module we have locally
>> can be used only on relatively old crash utility, around version 4,
>> but such old crash utility cannot handle kvmdump format.
>
> That's a pretty weak argument -- what did crash version ~4 have
> that the latest version does not? I don't recall ever removing
> any functionality w/respect to extension module without replacing
> it with a better interface. In other words, why can't you fix your
> local extension module? I need a better reason for modifying
> the snap module other than that.
>

I don't know the detail of the local extension module. The man who
requested a help to me explained that his module gets information of
vmcore using crash (gdb) scripts and retrives values from the scripts'
output via pipe. While old crash behaves well, recent ones appear to
hang in the situation where both reading and writing sides wait each
other. Is there any difference of behaviour on communication with gdb?

Anyway it's natural that we should modify the extension module, and
we'll do that soon. The patch for snap command was a workaround, but
there's merit to the patch that it makes it possible to use it as
handy vmcore conversion tool, not just as live kernel dump command, so
I've posted this here. By this, snap command will become able to
convert all the format currently crash supports into ELF. Though I
have yet to test this, this can convert lkcd foramt into ELF, for
example. Someone might want to use this for vmcore not suppoted by
Makedumpfile.

>
> Why reinvent the wheel? The "dev -i" command does all of the above, plus
> gives you the resource structure address:
>
> crash> dev -i
> RESOURCE RANGE NAME
> ffffffff80312080 0000-ffff PCI IO
<cut>

I myself thought it's strange if it's not present. Before making my
patch, I did minimum check by searching crash source code for related
symbols such as ``resource', but I didn't find anything. Now I see
some symbols found with the same keyword. I think I did something
wrong at that time.

Thanks.
HATAYAMA, Daisuke

--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility
 
Old 01-01-1970, 01:00 AM
HATAYAMA Daisuke
 
Default kmem, snap: iomem/ioport display and vmcore snapshot support

From: Dave Anderson <anderson@redhat.com>
Subject: Re: [Crash-utility] [PATCH] kmem, snap: iomem/ioport display and vmcore snapshot support
Date: Wed, 14 Mar 2012 09:16:29 -0400 (EDT)

>
>
> ----- Original Message -----
>> From: Dave Anderson <anderson@redhat.com>
>> Subject: Re: [Crash-utility] [PATCH] kmem, snap: iomem/ioport display
>> and vmcore snapshot support
>> Date: Tue, 13 Mar 2012 10:17:20 -0400 (EDT)
>>

<snip>

>>
>> Anyway it's natural that we should modify the extension module, and
>> we'll do that soon. The patch for snap command was a workaround, but
>> there's merit to the patch that it makes it possible to use it as
>> handy vmcore conversion tool, not just as live kernel dump command, so
>> I've posted this here. By this, snap command will become able to
>> convert all the format currently crash supports into ELF. Though I
>> have yet to test this, this can convert lkcd foramt into ELF, for
>> example. Someone might want to use this for vmcore not suppoted by
>> Makedumpfile.
>
> OK, here's what to do. The snap extension module is just that -- it
> takes a "snapshot" of live physical memory and creates an ELF file.
> I don't want to change that.
>

It appeared to me that it's natural to add the support of vmcore
memory to snap command for a small change of the code; part of getting
memory mapping only.

> However, I suppose the concept of a "conversion-to-ELF" tool makes sense.
> That being the case, please create a standalone extension module, and
> call it "mkelf", or "kvm2elf", or whatever name you want. Then we can
> add it to the collection of modules on the extension module web page.
>

OK. This takes just a little more time than extending snap
command. I'll send the patch next or a few weeks later. I would barrow
most part from the source code of snap command.

Thanks.
HATAYAMA, Daisuke

--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility
 
Old 03-13-2012, 09:21 AM
HATAYAMA Daisuke
 
Default kmem, snap: iomem/ioport display and vmcore snapshot support

Some days ago I was in a situation that I had to convert vmcore in
kvmdump format into ELF since some extension module we have locally
can be used only on relatively old crash utility, around version 4,
but such old crash utility cannot handle kvmdump format.

To do the conversion in handy, I used snap command with some modifications
so that it tries to use iomem information in vmcore instead of host's
/proc/iomem. This patch is its cleaned-up version.

In this development, I naturally got down to also making an interface
for an access to resource objects, and so together with the snap
command's patch, I also extended kmem command for iomem/ioport
support. Actually:

kmem -r displays /proc/iomem

crash> kmem -r
00000000-0000ffff : reserved
00010000-0009dbff : System RAM
0009dc00-0009ffff : reserved
000c0000-000c7fff : Video ROM
...

and kmem -R displays /proc/ioport

crash> kmem -R
0000-001f : dma1
0020-0021 : pic1
0040-0043 : timer0
0050-0053 : timer1
...

Looking into old version of kernel source code back, resource structure
has been unchanged since linux-2.4.0. I borrowed the way of walking on
resouce tree in this patch from the lastest v3.3-rc series, but I
guess the logic is also applicable to old kernels. I expect Dave's
regression testsuite.

Also, there would be another command more sutable for iomem/ioport.
If necessay, I'll repost the patch.
---

HATAYAMA Daisuke (4):
Add vmcore snapshot support
Add kmem -r and -R options
Add dump iomem/ioport functions; a helper for resource objects
Add a helper function for iterating resource objects


defs.h | 9 ++++
extensions/snap.c | 54 ++++++++++++++++++++++-
help.c | 2 +
memory.c | 122 ++++++++++++++++++++++++++++++++++++++++++++++++++ +--
4 files changed, 180 insertions(+), 7 deletions(-)

--
Thanks.
HATAYAMA Daisuke
--
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 04:58 PM.

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