Kexec Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Corey Minyard <minyard@acm.org>
To: Kexec Mailing List <kexec@lists.infradead.org>
Subject: Handling an elf kernel dump with a randomized base
Date: Tue, 09 Feb 2016 09:37:33 -0600	[thread overview]
Message-ID: <56BA07BD.3090009@acm.org> (raw)

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

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

             reply	other threads:[~2016-02-09 15:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-09 15:37 Corey Minyard [this message]
2016-02-09 17:39 ` Handling an elf kernel dump with a randomized base Corey Minyard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56BA07BD.3090009@acm.org \
    --to=minyard@acm.org \
    --cc=kexec@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox