[Crash-utility] [PATCH 0/5] Add support for Xen KDUMP files

Dave Anderson anderson at redhat.com
Thu Sep 24 19:29:11 UTC 2015



----- Original Message -----
> For many years, Xen dumps could only be saved in ELF format. Since
> makedumpfile commit 349a0ed1, it is also possible to save Xen dumps
> in KDUMP format, but it cannot be opened by the crash utility. This
> patch series adds support for these files.

Hi Petr,

I saw this coming down the pike a while ago, and as I recall you made it sound
like there would be major mods to diskdump.c.  But it's not much at all, so
thanks for that.  

I only have a couple minor nits with the patch-set:

I added xen_dom0.h to GENERIC_HFILES in the Makefile so that it would get
included in 'make files' (needed for creating the tar.gz and src.rpm files),
and to cause xen_dom0.c (and everything else for that matter) to get recompiled
if it changes.

And 'make warn' complained about these:

$ make warn
... [ cut ] ...
cc -c -g -DX86_64 -DLZO -DSNAPPY -DGDB_7_6  netdump.c -Wall -O2 -Wstrict-prototypes -Wmissing-prototypes -fstack-protector -Wformat-security 
netdump.c: In function 'dump_Elf32_Nhdr':
netdump.c:1837:13: warning: unused variable 'words' [-Wunused-variable]
netdump.c: In function 'dump_Elf64_Nhdr':
netdump.c:2062:9: warning: unused variable 'up' [-Wunused-variable]
netdump.c:2055:13: warning: unused variable 'words' [-Wunused-variable]
... [ cut ] ...
 -c -g -DX86_64 -DLZO -DSNAPPY -DGDB_7_6  xen_dom0.c -Wall -O2 -Wstrict-prototypes -Wmissing-prototypes -fstack-protector -Wformat-security 
xen_dom0.c: In function 'dump_xen_kdump_data':
xen_dom0.c:52:3: warning: format '%lx' expects argument of type 'long unsigned int', but argument 3 has type 'char *' [-Wformat]
xen_dom0.c:69:3: warning: format '%lx' expects argument of type 'long unsigned int', but argument 3 has type 'ulong *' [-Wformat]
...

I removed the unused variables from netdump.c, and fixed the xen_dom0.c
complaints, which were generated because fprintf() is being used instead
of netdump_print().

I ran a quick set of tests on a set of old xen files I've got hanging
around, and saw no problems.  But for sanity's sake, I'm going to run it
on my full set of dumpfiles overnight.

BTW, are you going to go ballistic on me if I check this in upstream as one patch?

Dave


> 
> Petr Tesarik (5):
>   Move Xen Dom0 handling into xen_dom0.c
>   Move xen p2m map initialization to xen_kdump_p2m
>   Use XEN_MACHINE_ADDR command flag instead of overriding readmem
>   Move Xen ELF note processing to xen_dom0.c
>   Add Xen Dom0 support for kdump compressed files
> 
>  Makefile   |   9 +-
>  diskdump.c |  27 ++++++
>  ia64.c     |  23 +++--
>  netdump.c  | 286
>  +++----------------------------------------------------------
>  netdump.h  |  53 ------------
>  x86.c      |  16 ++--
>  x86_64.c   |  16 ++--
>  xen_dom0.c | 276 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  xen_dom0.h |  75 ++++++++++++++++
>  9 files changed, 422 insertions(+), 359 deletions(-)
>  create mode 100644 xen_dom0.c
>  create mode 100644 xen_dom0.h
> 
> --
> 2.1.4
> 
> --
> Crash-utility mailing list
> Crash-utility at redhat.com
> https://www.redhat.com/mailman/listinfo/crash-utility
> 




More information about the Crash-utility mailing list