[RFC Patch 4/6] PANIC_MCE: Introduce a new panic flag for fatal MCE, capture related information
Eric W. Biederman
ebiederm at xmission.com
Fri May 27 14:09:44 EDT 2011
"K.Prasad" <prasad at 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 at linux.vnet.ibm.com>
Nacked-by: "Eric W. Biederman" <ebiederm at 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
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.
> + else
> + buf = append_elf_note(buf, VMCOREINFO_NOTE_NAME, 0,
> + vmcoreinfo_data, vmcoreinfo_size);
More information about the kexec