All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vivek Goyal <vgoyal@in.ibm.com>
To: Andi Kleen <ak@suse.de>
Cc: Kexec Mailing List <kexec@lists.infradead.org>,
	linux-kernel@vger.kernel.org, Jurriaan <thunder7@xs4all.nl>,
	Helge Hafting <helgehaf@aitel.hist.no>,
	Horms <horms@verge.net.au>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH 1/2] x86_64: Reflect the relocatability of the kernel in the ELF header.
Date: Tue, 1 May 2007 09:25:39 +0530	[thread overview]
Message-ID: <20070501035539.GA15472@in.ibm.com> (raw)
In-Reply-To: <200704301717.08230.ak@suse.de>

On Mon, Apr 30, 2007 at 05:17:07PM +0200, Andi Kleen wrote:
> On Monday 30 April 2007 17:12:39 Eric W. Biederman wrote:
> > 
> > Currently because vmlinux does not reflect that the kernel is relocatable
> > we still have to support CONFIG_PHYSICAL_START.  So this patch adds a small
> > c program to do what we cannot do with a linker script set the elf header
> > type to ET_DYN.
> > 
> > Since last time I have fixed the type to be in my code ET_DYN (oops),
> > and verified this works with kexec.  I realized while testing that we
> > don't have anyway of identifying a kernel vmlinux as linux so we
> > probably want to add an ELF note but that will be another patch.
> 
> The patch is ok for me, but does it pass Vivek's usual testing?

I am facing one issue with this patch. gdb can not analyze the
resulting kernel core file. Looks like gdb treats vmlinux differently if
ELF header type is "ET_DYN". It reads the symbol values incorrectly.

For example, symbol value of "panic_timeout" is 0xffffffff808a1fa8 but
gdb somehow things that it is 0xffffffff008aaebf. Looks like it is
performing some relocation.

I am using GNU gdb Red Hat Linux (6.5-5.fc6rh).

Thanks
Vivek

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

WARNING: multiple messages have this Message-ID (diff)
From: Vivek Goyal <vgoyal@in.ibm.com>
To: Andi Kleen <ak@suse.de>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>,
	Kexec Mailing List <kexec@lists.infradead.org>,
	Jurriaan <thunder7@xs4all.nl>,
	linux-kernel@vger.kernel.org,
	Helge Hafting <helgehaf@aitel.hist.no>,
	Horms <horms@verge.net.au>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH 1/2] x86_64: Reflect the relocatability of the kernel in the ELF header.
Date: Tue, 1 May 2007 09:25:39 +0530	[thread overview]
Message-ID: <20070501035539.GA15472@in.ibm.com> (raw)
In-Reply-To: <200704301717.08230.ak@suse.de>

On Mon, Apr 30, 2007 at 05:17:07PM +0200, Andi Kleen wrote:
> On Monday 30 April 2007 17:12:39 Eric W. Biederman wrote:
> > 
> > Currently because vmlinux does not reflect that the kernel is relocatable
> > we still have to support CONFIG_PHYSICAL_START.  So this patch adds a small
> > c program to do what we cannot do with a linker script set the elf header
> > type to ET_DYN.
> > 
> > Since last time I have fixed the type to be in my code ET_DYN (oops),
> > and verified this works with kexec.  I realized while testing that we
> > don't have anyway of identifying a kernel vmlinux as linux so we
> > probably want to add an ELF note but that will be another patch.
> 
> The patch is ok for me, but does it pass Vivek's usual testing?

I am facing one issue with this patch. gdb can not analyze the
resulting kernel core file. Looks like gdb treats vmlinux differently if
ELF header type is "ET_DYN". It reads the symbol values incorrectly.

For example, symbol value of "panic_timeout" is 0xffffffff808a1fa8 but
gdb somehow things that it is 0xffffffff008aaebf. Looks like it is
performing some relocation.

I am using GNU gdb Red Hat Linux (6.5-5.fc6rh).

Thanks
Vivek

  reply	other threads:[~2007-05-01  3:55 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-30 15:12 [PATCH 1/2] x86_64: Reflect the relocatability of the kernel in the ELF header Eric W. Biederman
2007-04-30 15:12 ` Eric W. Biederman
2007-04-30 15:17 ` Andi Kleen
2007-04-30 15:17   ` Andi Kleen
2007-05-01  3:55   ` Vivek Goyal [this message]
2007-05-01  3:55     ` Vivek Goyal
2007-05-01  4:20     ` Eric W. Biederman
2007-05-01  4:20       ` Eric W. Biederman
2007-05-01  5:06       ` Vivek Goyal
2007-05-01  5:06         ` Vivek Goyal
2007-05-01  5:26         ` Eric W. Biederman
2007-05-01  5:26           ` Eric W. Biederman
2007-05-01  6:25           ` Andi Kleen
2007-05-01  6:25             ` Andi Kleen
2007-05-01  5:54             ` Eric W. Biederman
2007-05-01  5:54               ` Eric W. Biederman
2007-05-01  6:44               ` Vivek Goyal
2007-05-01  6:44                 ` Vivek Goyal
2007-05-28 10:54         ` Bernhard Walle
2007-05-28 10:54           ` Bernhard Walle
2007-05-28 11:09           ` Vivek Goyal
2007-05-28 11:09             ` Vivek Goyal
2007-05-28 14:39             ` Bernhard Walle
2007-05-28 14:39               ` Bernhard Walle
2007-06-01 12:26               ` Bernhard Walle
2007-06-01 12:26                 ` Bernhard Walle
2007-05-28 14:57           ` Andi Kleen
2007-05-28 14:57             ` Andi Kleen
  -- strict thread matches above, loose matches on Subject: below --
2007-03-31  7:53 2.6.21-rc5-mm3 - no boot, "address not 2M aligned" Andrew Morton
2007-04-01  5:29 ` thunder7
2007-04-01  6:15   ` Eric W. Biederman
2007-04-01  6:29     ` Andrew Morton
2007-04-02  7:41       ` Vivek Goyal
2007-04-02  8:43         ` Eric W. Biederman
2007-04-02  9:45           ` Vivek Goyal
2007-04-02 17:26             ` Eric W. Biederman
2007-04-03  4:01               ` Vivek Goyal
2007-04-03  5:23                 ` Eric W. Biederman
2007-04-03 10:03                   ` Vivek Goyal
2007-04-23  5:12                     ` [PATCH 1/2] x86_64: Reflect the relocatability of the kernel in the ELF header Eric W. Biederman
2007-04-23  5:12                       ` Eric W. Biederman
2007-04-24  6:31                       ` Vivek Goyal
2007-04-24  6:31                         ` Vivek Goyal
2007-04-24  7:21                         ` Eric W. Biederman
2007-04-24  7:21                           ` Eric W. Biederman

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=20070501035539.GA15472@in.ibm.com \
    --to=vgoyal@in.ibm.com \
    --cc=ak@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=ebiederm@xmission.com \
    --cc=helgehaf@aitel.hist.no \
    --cc=horms@verge.net.au \
    --cc=kexec@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=thunder7@xs4all.nl \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.