[Crash-utility] [PATCH] Do not create arch-specific p2m mapping for ELF xen dumps

Petr Tesarik ptesarik at suse.cz
Fri Dec 18 11:23:29 UTC 2015


Hello Dave,

Let me send you a cleanup/fix for Xen DomU dumps.

When opening a Xen DomU dump without auto-translated addresses (e.g.
from an x86_64 PV domain), a mapping between physical and machine
pages is needed. An xc_core dump file does not contain this mapping,
so it must be created by arch-specific code from the dumped data.

This (and only this) is the job of the machdep->xendump_p2m_create
callback, which is called if the XC_CORE_P2M_CREATE flag is set. ELF
files contain the mapping in a separate section (".xen_p2m"), so this
arch-specific code is not needed and should not be run.

On the other hand, XC_CORE_P2M_CREATE also triggers the initialization
of the elf_index_pfn array. I believe this should be in fact controlled
by XC_CORE_PFN_CREATE, because the flag is not used for anything else.

I found this issue thanks to a Xen DomU ELF dump file that contained an
invalid CR3 value, which could not be used to translate kvaddr to maddr.
Without the patch, session initialization fails with these messages:

crash: cannot find mfn 0 (0x0) in page index

crash: cannot read/find pud page

Signed-off-by: Petr Tesarik <ptesarik at suse.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: do-not-create-arch-specific.patch
Type: text/x-patch
Size: 2207 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/crash-utility/attachments/20151218/e1717863/attachment.bin>


More information about the Crash-utility mailing list