[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20111123161417.GA2515@in.ibm.com>
Date: Wed, 23 Nov 2011 21:44:17 +0530
From: "K.Prasad" <prasad@...ux.vnet.ibm.com>
To: Vivek Goyal <vgoyal@...hat.com>
Cc: linux-kernel@...r.kernel.org, Borislav Petkov <bp@...en8.de>,
"Luck, Tony" <tony.luck@...el.com>,
"Eric W. Biederman" <ebiederm@...ssion.com>, anderson@...hat.com,
tachibana@....nes.nec.co.jp, oomichi@....nes.nec.co.jp,
Valdis.Kletnieks@...edu, Nick Bowler <nbowler@...iptictech.com>
Subject: Re: [RFC Patch 1/2][slimdump] Append CRASH_REASON to VMCOREINFO
elf-note
On Mon, Nov 21, 2011 at 10:11:57AM -0500, Vivek Goyal wrote:
> On Mon, Nov 21, 2011 at 03:41:57PM +0530, K.Prasad wrote:
> > Allow various crash paths to append the reason of crash into the
> > VMCOREINFO elf-note through the field CRASH_REASON. We also make the
> > fatal machine check exceptions append "PANIC_MCE" as the crash reason.
> > This string will be recognised by upstream tools like makedumpfile and
> > crash to generate slimdump.
> >
> > With increased usage of the CRASH_REASON field, the crash strings can be
> > encoded for better usage.
> >
[snipped]
> > diff --git a/kernel/kexec.c b/kernel/kexec.c
> > index dc7bc08..a731693 100644
> > --- a/kernel/kexec.c
> > +++ b/kernel/kexec.c
> > @@ -1080,6 +1080,11 @@ asmlinkage long compat_sys_kexec_load(unsigned long entry,
> > }
> > #endif
> >
> > +__weak char *arch_add_crash_reason(void)
> > +{
> > + return (char *)NULL;
> > +}
> > +
> > void crash_kexec(struct pt_regs *regs)
> > {
> > /* Take the kexec_mutex here to prevent sys_kexec_load
> > @@ -1411,6 +1416,7 @@ static void update_vmcoreinfo_note(void)
> > void crash_save_vmcoreinfo(void)
> > {
> > vmcoreinfo_append_str("CRASHTIME=%ld", get_seconds());
> > + vmcoreinfo_append_str("\nCRASH_REASON=%s\n", arch_add_crash_reason());
>
> I think don't even create a CRASH_REASON= entry if arch returns a NULL
> string.
>
Yes, we could do that. I'll change the code accordingly in the next
revision of the patchset.
Thanks,
K.Prasad
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists