public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <horms@verge.net.au>
To: Vivek Goyal <vgoyal@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Muli Ben-Yehuda <muli@il.ibm.com>, Chandru <chandru@in.ibm.com>,
	kexec@lists.infradead.org, linux-kernel@vger.kernel.org,
	Ingo Molnar <mingo@elte.hu>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Terry Loftin <terry.loftin@hp.com>,
	Tony Luck <tony.luck@intel.com>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	linux-ia64@vger.kernel.org
Subject: Re: [patch] crashdump: fix undefined reference to `elfcorehdr_addr'
Date: Tue, 29 Jul 2008 00:33:50 +0000	[thread overview]
Message-ID: <20080729003348.GG10434@verge.net.au> (raw)
In-Reply-To: <20080728133110.GC25963@redhat.com>

On Mon, Jul 28, 2008 at 09:31:10AM -0400, Vivek Goyal wrote:
> On Mon, Jul 28, 2008 at 11:51:19AM +1000, Simon Horman wrote:
> > [ Updated Vivek's email address to his vgoyal@redhat.com in CC list 
> >   Added Terry Loftin, Tony Luck, Erik Biedermann and linux-ia64 to CC list ]

[snip]

> > 1) Always parse the elfcorehdr kernel command line option
> >    and set elfcorehdr_addr accordingly - currently this is only
> >    done if CONFIG_PROC_VMCORE is set.
> > 
> >    This is nice as it won't need any modifications to kexec-tools
> >    nor any command line bloat.
> > 
> >    A minor difficulty is working out where to initialise elfcorehdr_addr.
> >    Sometimes in include/linux/crash_dump.h and sometimes in
> >    fs/proc/vmcore.c seems horrible to me.
> > 
> >    Another problem is that would be alive and well in
> >    code that really only uses it to check if kdump was activated or not
> >    - a minor naming issue.
> > 
> 
> Hi Simon,
> 
> There are some kernel bits (like iommu initialization patch), which need to
> take special action if they are booting after a kexec on panic (Generally we
> are referring it to booting into kdump kernel) and that's why the notion
> is_kdump_kernel().
> 
> To me, is_kdump_kernel() symbolizes whether I  am booting after kexec on
> panic and not just the fact if CONFIG_CRASH_DUMP is enabled or not in this
> kernel.
> 
> So I would think that lets not rename it to kernel_has_vmcore(), instead
> lets write few lines of comments before function is_kdump_kernel() to
> clarify its meaning.
> 
> Secondly, we are using elfcorehdr_addr to determine whether this kernel
> is booting after a panic so elfcorehdr_addr is not just limited to
> CONFIG_PROC_VMCORE now and we should probably pull it out of
> fs/proc/vmcore.c. How about declaring and initializing this variable in
> kernel/kexec.c under CONFIG_CRASH_DUMP and always parse elfcorehdr_addr
> irrespective of the setting of CONFIG_PROC_VMCORE?

Agreed. Like Eric I think that this is a reasonable solution given
the current state of things. I'll reply to your patches after looking
at them a bit more closely.

> > 2) Add a new kernel command line option, perhaps in_kdump
> > 
> >    This is bloat to get around elfcorehdr_addr initialisation and
> >    naming awkwardness above.
> > 
> > 3) Make select CONFIG_PROC_VMCORE when CONFIG_CRASH_DUMP is selected,
> >    or perhaps even just remove CONFIG_PROC_VMCORE and only use
> >    CONFIG_CRASH_DUMP instead. The effect would be the same either way.
> > 
> >    Pro: One less thing to be confused about
> > 
> >    Con: Bloat for people who want kdump without vmcore.
> >         I wonder what usage case that is.
> 
> Argument was people can use /dev/oldmem and not use /proc/vmcore. So far
> I don't know anybody who uses /dev/oldmem to capture dump and not
> /proc/vmcore.

What I was getting at is that frangly the three variables
CONFIG_KEXEC, CONFIG_CRASH_DUMP and CONFIG_PROC_VMCORE seem to
confuse people. I've seen them used incorrectly several times now.
So if there is a way to simplyfy things, even slightly, I think
that would be a good idea. But if there isn't, so be it.

-- 
Horms


      reply	other threads:[~2008-07-29  0:33 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20080727234529.GM6175@verge.net.au>
2008-07-28  1:51 ` [patch] crashdump: fix undefined reference to `elfcorehdr_addr' Simon Horman
2008-07-28  2:45   ` Simon Horman
2008-07-28  3:40     ` Simon Horman
2008-07-28 12:48       ` Ingo Molnar
2008-07-29  0:35         ` Simon Horman
2008-07-28 21:10       ` [PATCH 1/5] Move elfcorehdr_addr out of vmcore.c (Was: Re: [patch] Vivek Goyal
2008-07-28 21:11         ` [PATCH 2/5] x86: Define elfcorehdr_addr in arch dependent section Vivek Goyal
2008-07-28 21:13           ` [PATCH 3/5] ia64: " Vivek Goyal
2008-07-28 21:14             ` [PATCH 4/5] powerpc: Define elfcorehdr_addr in arch dependent Vivek Goyal
2008-07-28 21:15               ` [PATCH 5/5] sh: Define elfcorehdr_addr in arch dependent section Vivek Goyal
2008-07-29 14:18                 ` Paul Mundt
2008-07-29  4:42             ` [PATCH 3/5] ia64: Define elfcorehdr_addr in arch dependent Simon Horman
2008-07-29 13:53               ` Vivek Goyal
2008-07-31 15:29           ` [PATCH 2/5] x86: " Ingo Molnar
2008-07-28 22:37         ` [PATCH 1/5] Move elfcorehdr_addr out of vmcore.c (Was: Re: [patch] crashdump: fix undefined refe Eric W. Biederman
2008-07-28 22:47         ` Eric W. Biederman
2008-07-29  1:22           ` [PATCH 1/5] Move elfcorehdr_addr out of vmcore.c (Was: Simon Horman
2008-07-29  2:28             ` Vivek Goyal
2008-07-29  3:26               ` Simon Horman
2008-07-28  5:39   ` [patch] crashdump: fix undefined reference to `elfcorehdr_addr' Eric W. Biederman
2008-07-28  6:24     ` Muli Ben-Yehuda
2008-07-28 13:44       ` Vivek Goyal
2008-07-28 19:12         ` Eric W. Biederman
2008-07-28 13:31   ` Vivek Goyal
2008-07-29  0:33     ` Simon Horman [this message]

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=20080729003348.GG10434@verge.net.au \
    --to=horms@verge.net.au \
    --cc=akpm@linux-foundation.org \
    --cc=chandru@in.ibm.com \
    --cc=ebiederm@xmission.com \
    --cc=kexec@lists.infradead.org \
    --cc=linux-ia64@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=muli@il.ibm.com \
    --cc=terry.loftin@hp.com \
    --cc=tony.luck@intel.com \
    --cc=torvalds@linux-foundation.org \
    --cc=vgoyal@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox