Kexec Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Vivek Goyal <vgoyal@redhat.com>
To: Corey Minyard <minyard@acm.org>
Cc: kexec@lists.infradead.org
Subject: Re: Tool for creating full vmcore
Date: Wed, 12 Feb 2014 16:42:57 -0500	[thread overview]
Message-ID: <20140212214257.GF16470@redhat.com> (raw)
In-Reply-To: <52FBD7C3.4060304@acm.org>

On Wed, Feb 12, 2014 at 02:21:23PM -0600, Corey Minyard wrote:
> Hello,
> 
> I've written a tool that takes an coredump of physical kernel memory and
> converts it to a coredump of virtual kernel memory that can be directly
> used by gdb to debug a kernel.

I am wondering where is it useful. So you find using gdb on kernel
core give you better experience as compared to crash which is fully
tailored to kernel debugging only?

What about dump filtering? Now a days we use makedumpfile by default
and makedumpfile has its own format for dump files which crash
understands.

I guess gdb will not work with makedumpfile format files. If that's the
case, that means this tool will work with unfiltered core files and
generate unfiltered core files. I think working with unfiltered core
files is not very practical now a days given large amount of RAM
machines typically tend to have.

Thanks
Vivek

> 
> I was trying to use /proc/vmcore, but that did not include any of
> vmalloc memory or vmemmap, which made it kind of useless.  I thought
> about adding all that to the vmcore, but that didn't seem like the
> proper way to do things.
> 
> The tool is at https://github.com/cminyard/kdump-tool
> 
> It can create a physical memory coredump (like the kdump tool) and a
> virtual memory coredump (either from a physical memory one, or directly
> from /proc/vmcore and /dev/mem).
> 
> Two kernel patches are in the "kernel-patches" directory of the tool, on
> the master branch:
> 
> One adds the valid physical memory ranges to the notes in the core
> file.  Memory doesn't always start from zero, some systems have more
> than one OS running on the same hardware,  and memory often has holes
> and places that are bad to read from.  It seems prudent to pass in these
> ranges so the coredump is only the memory required.  It also adds the
> physical address of the kernel page directory to the notes, so it can
> parse the page tables.
> 
> The other is MIPS specific.  You need a whole bunch of information about
> the configuration to parse the MIPS page tables.
> 
> One cool thing this should be able to do is create a coredump for
> userspace processes.  You can look into kernel memory to find the page
> table and pass that in to the tool.  It should be able to extract the
> process' resident memory from a physical coredump.  Of course, it will
> only dump resident memory, anything on disk will not be there.
> 
> Is this interesting to the kdump community?  I'd like to include it in
> kexec, if possible.
> 
> Thanks,
> 
> -corey
> 
> _______________________________________________
> kexec mailing list
> kexec@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/kexec

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

  reply	other threads:[~2014-02-12 21:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-12 20:21 Tool for creating full vmcore Corey Minyard
2014-02-12 21:42 ` Vivek Goyal [this message]
     [not found]   ` <CADq4U7+K-Zi2Ckb-mfDWFf50Oq7hbTWR6H92=Jx=STqWSJu89g@mail.gmail.com>
     [not found]     ` <20140213135153.GB30844@redhat.com>
2014-02-13 13:52       ` Vivek Goyal
2014-02-13 16:45         ` Corey Minyard
2014-02-13 17:07           ` Vivek Goyal
2014-02-13  9:26 ` Louis Bouchard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140212214257.GF16470@redhat.com \
    --to=vgoyal@redhat.com \
    --cc=kexec@lists.infradead.org \
    --cc=minyard@acm.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox