Handling an elf kernel dump with a randomized base

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have been working on getting kernels on different architectures with 
randomized
base operational.  One problem I've run into is that kernel dumps taken 
this way are
not debuggable with gdb, the symbols are, of course, all in the wrong 
places.

The way gdb handles relocation is to add an AT_ENTRY value in an auxv 
note.  It holds
the relocated start address and gdb uses that to figure out the 
offsets.  This is
easy enough to add if you have the information, I'm wondering the best 
way to do
this looking at getting it into the mainstream kernel and the crash dump 
tools.

There is some handling of this on x86_64 with KERNELOFFSET, but it 
doesn't work for
gdb.

I can think of two ways to add this:

* Add a vmcoreinfo value with the entry point and have the extraction 
tool create
the elf note.

* Put the entry point in sysfs and have kexec add the note like it does for
vmcoreinfo.

I'd like to avoid any solution that requires putting vmlinux or any 
other large file
on the target system, as this is not always possible for small embedded 
systems.

Thanks,

-corey



[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux