Re: Query: Kdump: Core Image ELF Format

Vivek Goyal
2005-03-23T10:36:49Z

On Wed, 2005-03-23 at 13:26 +0900, Fernando Luis Vazquez Cao wrote:
> Hi all.
>
> On Tue, 2005-03-08 at 18:20 +0530, vivek goyal wrote:
> > Core image ELF headers are prepared before crash and stored at a safe
> > place in memory. These headers are retrieved over a kexec boot and final
> > elf core image is prepared for analysis.
>
> Regarding the preparation of the ELF headers, I think we should also
> take into consideration hot-plug memory and create appropriate
> mechanisms to deal with it.
>
> Assuming that both insertion and removal of memory trigger a hotplug
> event that is subsequently handled by the relevant hotplug agent(*), the
> latter could be modified so that, on successful memory onlining,
> additional PT_LOAD headers are created and tucked in a safe place
> together with the others.

I think, re-loading the panic kernel in such event should be an easier
solution. Current kexec system call interface does not allow to read
back already stored segments, which is necessary to append new PT_LOAD
headers to the existing program header list and update ELF header.

>
> Since ELF headers are to be prepared by kexec a new option could be
> added to it, so that we can call kexec from a hotplug script to carry
> out the aforementioned tasks.
>
> Any thoughts or suggestions on this?
>
> (*) The last patches posted by Dave Hansen already support memory
> onlining from an /etc/hotplug script.
>
> Fernando
>
>
>