lkml.org 
[lkml]   [2011]   [May]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [RFC Patch 4/6] PANIC_MCE: Introduce a new panic flag for fatal MCE, capture related information
"K.Prasad" <prasad@linux.vnet.ibm.com> writes:

> PANIC_MCE: Introduce a new panic flag for fatal MCE, capture related information
>
> Fatal machine check exceptions (caused due to hardware memory errors) will now
> result in a 'slim' coredump that captures vital information about the MCE. This
> patch introduces a new panic flag, and new parameters to *panic functions
> that can capture more information pertaining to the cause of crash.
>
> Enable a new elf-notes section to store additional information about the crash.
> For MCE, enable a new notes section that captures relevant register status
> (struct mce) to be later read during coredump analysis.
>
> Signed-off-by: K.Prasad <prasad@linux.vnet.ibm.com>

Nacked-by: "Eric W. Biederman" <ebiederm@xmission.com>


> -void crash_save_vmcoreinfo(void)
> +void crash_save_vmcoreinfo(void *arch_info, size_t arch_info_size,
> + enum panic_flags flags)
> {
> u32 *buf;
>
> @@ -1392,9 +1394,12 @@ void crash_save_vmcoreinfo(void)
>
> buf = (u32 *)vmcoreinfo_note;
>
> - buf = append_elf_note(buf, VMCOREINFO_NOTE_NAME, 0, vmcoreinfo_data,
> - vmcoreinfo_size);
> -
> + if (flags & PANIC_MCE)
> + buf = append_elf_note(buf, "PANIC_MCE", NT_MCE, arch_info,
> + arch_info_size);

Ok. This is uglier than I thought. You have this terribly generic
interface than when you go to use it you assume it is an mce. Ugh
no.

Furthermore you short circuit out other pieces of this code.

This patch is a total hack that is massively over engineered.

Saving NT_MCE is fine, in and of itself. The rest of the information
is totally nonsense.

Eric


> + else
> + buf = append_elf_note(buf, VMCOREINFO_NOTE_NAME, 0,
> + vmcoreinfo_data, vmcoreinfo_size);
> final_note(buf);
> }
>


\
 
 \ /
  Last update: 2011-05-27 20:11    [W:0.192 / U:1.664 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site