From: Vivek Goyal <vgoyal@redhat.com>
To: Ken'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>
Cc: Dave Anderson <anderson@redhat.com>,
Andrew Morton <akpm@linux-foundation.org>,
Vivek Goyal <vgoyal@in.ibm.com>,
kexec-ml <kexec@lists.infradead.org>,
"IKEDA, Munehiro" <m-ikeda@ds.jp.nec.com>
Subject: Re: [PATCH] Add the symbol "phys_base" to vmcoreinfo
Date: Wed, 2 Apr 2008 13:39:08 -0400 [thread overview]
Message-ID: <20080402173908.GL668@redhat.com> (raw)
In-Reply-To: <47F0C449.9000204@mxs.nes.nec.co.jp>
On Mon, Mar 31, 2008 at 08:00:25PM +0900, Ken'ichi Ohmichi wrote:
>
> Hi Andrew,
>
> This patch fixes the problem that makedumpfile sometimes fails
> on x86_64 machine. I hope that this patch will be merged to both
> linux-2.6.25 and linux-2.6.24.5.
>
> This patch adds the symbol "phys_base" to a vmcoreinfo data.
> The vmcoreinfo data has the minimum debugging information only
> for dump filtering. makedumpfile (dump filtering command) gets
> it to distinguish unnecessary pages, and makedumpfile creates
> a small dumpfile.
>
> On x86_64 kernel which compiled with CONFIG_PHYSICAL_START=0x0
> and CONFIG_RELOCATABLE=y, makedumpfile fails like the following:
>
> # makedumpfile -d31 /proc/vmcore dumpfile
> The kernel version is not supported.
> The created dumpfile may be incomplete.
> _exclude_free_page: Can't get next online node.
>
> makedumpfile Failed.
> #
>
> The cause is the lack of the symbol "phys_base" in a vmcoreinfo
> data. If the symbol "phys_base" does not exist, makedumpfile
> considers an x86_64 kernel as non relocatable. As the result,
> makedumpfile misunderstands the physical address where the kernel
> is loaded, and it cannot translate a kernel virtual address to
> physical address correctly. To fix this proble, the attached
> patch which adds the symbol "phys_base" to a vmcoreinfo data.
>
>
> Thanks
> Ken'ichi Ohmichi
>
>
> Signed-off-by: Ken'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>
> ---
> diff -rpuN linux-2.6.25-rc7.orig/arch/x86/kernel/machine_kexec_64.c linux-2.6.25-rc7/arch/x86/kernel/machine_kexec_64.c
> --- linux-2.6.25-rc7.orig/arch/x86/kernel/machine_kexec_64.c 2008-03-26 14:55:29.000000000 +0900
> +++ linux-2.6.25-rc7/arch/x86/kernel/machine_kexec_64.c 2008-03-26 14:52:52.000000000 +0900
> @@ -233,6 +233,7 @@ NORET_TYPE void machine_kexec(struct kim
>
> void arch_crash_save_vmcoreinfo(void)
> {
> + VMCOREINFO_SYMBOL(phys_base);
> VMCOREINFO_SYMBOL(init_level4_pgt);
CCing to LKML.
Looks good to me. Given a vmcore file, one needs to know about
the shift between compile address and run time address of kernel
to be able to do filtering. This shift (phys_base) will vary
based on kernel config options and based on where boot loader
has loaded a kernel.
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Thanks
Vivek
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
next prev parent reply other threads:[~2008-04-02 17:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-31 11:00 [PATCH] Add the symbol "phys_base" to vmcoreinfo Ken'ichi Ohmichi
2008-04-02 17:39 ` Vivek Goyal [this message]
2008-04-03 0:00 ` Ken'ichi Ohmichi
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=20080402173908.GL668@redhat.com \
--to=vgoyal@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=anderson@redhat.com \
--cc=kexec@lists.infradead.org \
--cc=m-ikeda@ds.jp.nec.com \
--cc=oomichi@mxs.nes.nec.co.jp \
--cc=vgoyal@in.ibm.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.