Saveoops: Making Kexec purgatory position-independent?

H. Peter Anvin hpa at
Sat Feb 26 16:38:22 EST 2011

On 02/26/2011 08:20 AM, Ahmed S. Darwish wrote:
> Hi,
> I'm continuing work on 'Saveoops', saving both early and normal Linux
> oops log to disk upon panic [*], using Kexec and bootloaders this time.
> Purgatory, the transitional mini-kernel used by kexec, is a relocatable
> ELF file. Userspace kexec-tools finds the final load address of such
> code (by parsing /proc/iomem, etc) and then applies the relocations
> itself before passing the now-ready executable image to kernel.
> Since capturing early oopses is the major goal, doing such relocation
> in userspace won't fit my purposes. Two options remain:
>    - relocate purgatory entries in the kernel early boot path
>    - or compile purgatory as position-independent, thus simplifying
>      the kernel load logic
> The former will add extra logic in a sensitive path (early boot), while
> the latter will require changes inside the purgatory code itself,
> especially i386 assembly files.
> Any preferable option from our kexec and x86 maintainers?
> thanks!
> [*]<20110125134748.GA10051@laptop>

I can't see any sane reason to *not* make kexec purgatory
position-independent.  It is the obvious thing to do.


H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.

More information about the kexec mailing list