[Crash-utility] handling missing kdump pages in diskdump format

Bob Montgomery bob.montgomery at hp.com
Mon Mar 5 23:53:40 UTC 2007


On Mon, 2007-03-05 at 20:18 +0900, Ken'ichi Ohmichi wrote:
> Hi Bob,
> 

> In the above patch, a user cannot distinguish between the original
> unaccessable pages and the excluded pages.
> I think that the crash utility should display the warning message
> to mean "These pages are excluded by partial dump" when it accesses 
> the excluded pages.

I'm not sure how to do this.  I think it will require modifying memory.c
in crash to accept another type of return value from read_diskdump,
maybe?


> I think it is good that disk_dump_header.header_version will be changed
> from 0 into 1. The existing crash doesn't check header_version.
> If the existing crash tries to read a new dumpfile (header_version==1),
> it considers the excluded pages as the zero-filled pages and it can
> read a new dumpfile, and a new crash can distinguish the excluded pages.

That sounds like a great way to fix the compatibility issue.
> 
> For the above, I created the attached patch (for makedumpfile-1.1.1).
> Could you say the opinion ?

I didn't even think of pointing multiple page descriptors at a single
zero page.  That looks a lot cleaner than dropping in compressed zero
pages like I was doing.  I like it.  Good idea!

I have one minor comment with your method.  I think it might be better
to memset the data buffer to zero just before writing it, instead of
using calloc to allocate it up front and counting on it to still be zero
when you get to the DL_EXCLUDE_ZERO if block.  Some future programmer
might use buf in between the calloc and the write_cache. 

I attached a small patch that applies *after* your patch to 1.1.1 that
shows this.

Thanks,
Bob Montgomery
-------------- next part --------------
A non-text attachment was scrubbed...
Name: memset_zero.patch
Type: text/x-patch
Size: 719 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/crash-utility/attachments/20070305/52477e78/attachment.bin>


More information about the Crash-utility mailing list