From: Vivek Goyal <vgoyal@in.ibm.com>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: fastboot@osdl.org, Jan Kratochvil <lace@jankratochvil.net>,
linux-kernel@vger.kernel.org, Linda Wang <lwang@redhat.com>,
Horms <horms@verge.net.au>, "H. Peter Anvin" <hpa@zytor.com>,
linuxppc64-dev@ozlabs.org
Subject: Re: [CFT] ELF Relocatable x86 and x86_64 bzImages
Date: Fri, 25 Aug 2006 16:16:17 -0400 [thread overview]
Message-ID: <20060825201617.GC8909@in.ibm.com> (raw)
In-Reply-To: <m1u04x4uiv.fsf_-_@ebiederm.dsl.xmission.com>
On Mon, Jul 31, 2006 at 10:19:04AM -0600, Eric W. Biederman wrote:
>
> I have spent some time and have gotten my relocatable kernel patches
> working against the latest kernels. I intend to push this upstream
> shortly.
>
> Could all of the people who care take a look and test this out
> to make certain that it doesn't just work on my test box?
>
> My approach is to extend bzImage so that it is an ET_DYN ELF executable
> (we have what used to be a bootsector where we can put the header).
> Boot loaders are explicitly not expected to process relocations.
>
> The x86_64 kernel is simply built to live at a fixed virtual address
> and the boot page tables are relocated. The i386 kernel is built
> to process relocates generated with --embedded-relocs (after vmlinux.lds.S)
> has been fixed up to sort out static and dynamic relocations.
>
> Currently there are 33 patches in my tree to do this.
>
> The weirdest symptom I have had so far is that page faults did not
> trigger the early exception handler on x86_64 (instead I got a reboot).
>
> The code should be available shortly at:
> git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/linux-2.6-reloc.git#reloc-v2.6.18-rc3
>
> If all goes well with the testing I will push the patches to Andrew in the next couple
> of days.
It breaks powerpc build as poewrpc does not seem to be defining symbol
_text which is used by arch independent kallsyms.c. Attached is the one
line fix.
Thanks
Vivek
o ppc64 does not seem to be defining symbol _text which is used by
kernel/kallsyms.c for relocatable kernel patches. Instead of absolute
symbol addresses now it is stored as offset from symbol _text
(_text + offset) so that relocations entries for this section are
generated, if need be. (currently i386 will be the only user once
the relocatable kernel patches are merged).
Signed-off-by: Vivek Goyal <vgoyal@in.ibm.com>
---
arch/powerpc/kernel/vmlinux.lds.S | 1 +
1 file changed, 1 insertion(+)
diff -puN arch/powerpc/kernel/vmlinux.lds.S~ppc64-compilation-fix arch/powerpc/kernel/vmlinux.lds.S
--- linux-2.6.18-rc3-1M/arch/powerpc/kernel/vmlinux.lds.S~ppc64-compilation-fix 2006-08-24 16:16:17.000000000 -0400
+++ linux-2.6.18-rc3-1M-root/arch/powerpc/kernel/vmlinux.lds.S 2006-08-24 16:26:33.000000000 -0400
@@ -33,6 +33,7 @@ SECTIONS
/* Text and gots */
.text : {
+ _text = .;
*(.text .text.*)
SCHED_TEXT
LOCK_TEXT
_
WARNING: multiple messages have this Message-ID (diff)
From: Vivek Goyal <vgoyal@in.ibm.com>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: fastboot@osdl.org, Jan Kratochvil <lace@jankratochvil.net>,
Magnus Damm <magnus.damm@gmail.com>, Horms <horms@verge.net.au>,
Linda Wang <lwang@redhat.com>,
linux-kernel@vger.kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
linuxppc64-dev@ozlabs.org
Subject: Re: [CFT] ELF Relocatable x86 and x86_64 bzImages
Date: Fri, 25 Aug 2006 16:16:17 -0400 [thread overview]
Message-ID: <20060825201617.GC8909@in.ibm.com> (raw)
In-Reply-To: <m1u04x4uiv.fsf_-_@ebiederm.dsl.xmission.com>
On Mon, Jul 31, 2006 at 10:19:04AM -0600, Eric W. Biederman wrote:
>
> I have spent some time and have gotten my relocatable kernel patches
> working against the latest kernels. I intend to push this upstream
> shortly.
>
> Could all of the people who care take a look and test this out
> to make certain that it doesn't just work on my test box?
>
> My approach is to extend bzImage so that it is an ET_DYN ELF executable
> (we have what used to be a bootsector where we can put the header).
> Boot loaders are explicitly not expected to process relocations.
>
> The x86_64 kernel is simply built to live at a fixed virtual address
> and the boot page tables are relocated. The i386 kernel is built
> to process relocates generated with --embedded-relocs (after vmlinux.lds.S)
> has been fixed up to sort out static and dynamic relocations.
>
> Currently there are 33 patches in my tree to do this.
>
> The weirdest symptom I have had so far is that page faults did not
> trigger the early exception handler on x86_64 (instead I got a reboot).
>
> The code should be available shortly at:
> git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/linux-2.6-reloc.git#reloc-v2.6.18-rc3
>
> If all goes well with the testing I will push the patches to Andrew in the next couple
> of days.
It breaks powerpc build as poewrpc does not seem to be defining symbol
_text which is used by arch independent kallsyms.c. Attached is the one
line fix.
Thanks
Vivek
o ppc64 does not seem to be defining symbol _text which is used by
kernel/kallsyms.c for relocatable kernel patches. Instead of absolute
symbol addresses now it is stored as offset from symbol _text
(_text + offset) so that relocations entries for this section are
generated, if need be. (currently i386 will be the only user once
the relocatable kernel patches are merged).
Signed-off-by: Vivek Goyal <vgoyal@in.ibm.com>
---
arch/powerpc/kernel/vmlinux.lds.S | 1 +
1 file changed, 1 insertion(+)
diff -puN arch/powerpc/kernel/vmlinux.lds.S~ppc64-compilation-fix arch/powerpc/kernel/vmlinux.lds.S
--- linux-2.6.18-rc3-1M/arch/powerpc/kernel/vmlinux.lds.S~ppc64-compilation-fix 2006-08-24 16:16:17.000000000 -0400
+++ linux-2.6.18-rc3-1M-root/arch/powerpc/kernel/vmlinux.lds.S 2006-08-24 16:26:33.000000000 -0400
@@ -33,6 +33,7 @@ SECTIONS
/* Text and gots */
.text : {
+ _text = .;
*(.text .text.*)
SCHED_TEXT
LOCK_TEXT
_
next prev parent reply other threads:[~2006-08-25 20:16 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <aec7e5c30606300145p441d8d0xd89fab5e87de5a22@mail.gmail.com>
[not found] ` <20060705222448.GC992@in.ibm.com>
[not found] ` <aec7e5c30607051932r49bbcc7eh2c190daa06859dcc@mail.gmail.com>
[not found] ` <20060706081520.GB28225@host0.dyn.jankratochvil.net>
[not found] ` <aec7e5c30607070147g657d2624qa93a145dd4515484@mail.gmail.com>
[not found] ` <20060707133518.GA15810@in.ibm.com>
[not found] ` <20060707143519.GB13097@host0.dyn.jankratochvil.net>
[not found] ` <20060710233219.GF16215@in.ibm.com>
[not found] ` <20060711010815.GB1021@host0.dyn.jankratochvil.net>
[not found] ` <m1d5c92yv4.fsf@ebiederm.dsl.xmission.com>
2006-07-31 16:19 ` [CFT] ELF Relocatable x86 and x86_64 bzImages Eric W. Biederman
2006-07-31 20:25 ` Vivek Goyal
2006-07-31 21:00 ` [Fastboot] " Vivek Goyal
2006-08-01 2:31 ` Eric W. Biederman
2006-08-01 2:34 ` H. Peter Anvin
2006-08-01 3:44 ` Eric W. Biederman
2006-08-01 4:25 ` Jan Kratochvil
2006-08-01 9:09 ` Eric W. Biederman
2006-08-01 9:43 ` Jan Kratochvil
2006-08-01 11:28 ` Eric W. Biederman
2006-08-04 21:08 ` Don Zickus
2006-08-04 21:25 ` Eric W. Biederman
2006-08-04 23:43 ` Don Zickus
2006-08-05 7:49 ` Eric W. Biederman
2006-08-05 16:07 ` Eric W. Biederman
2006-08-07 17:44 ` Don Zickus
2006-08-07 18:08 ` Eric W. Biederman
2006-08-07 23:57 ` Don Zickus
2006-08-08 5:01 ` Eric W. Biederman
2006-08-08 19:36 ` Don Zickus
2006-08-09 20:06 ` Don Zickus
2006-08-10 6:09 ` Eric W. Biederman
2006-08-10 13:13 ` Vivek Goyal
2006-08-10 17:05 ` Eric W. Biederman
2006-08-10 18:18 ` Vivek Goyal
2006-08-10 20:09 ` Eric W. Biederman
2006-08-11 21:25 ` Don Zickus
2006-08-12 7:20 ` Eric W. Biederman
2006-08-12 15:25 ` Don Zickus
2006-08-12 19:41 ` Eric W. Biederman
2006-08-13 20:06 ` Andi Kleen
2006-08-13 21:44 ` Eric W. Biederman
2006-08-14 16:51 ` [Fastboot] " Vivek Goyal
2006-08-14 17:04 ` H. Peter Anvin
2006-08-14 18:11 ` Vivek Goyal
2006-08-14 19:32 ` H. Peter Anvin
2006-08-14 19:42 ` Vivek Goyal
2006-08-14 19:45 ` H. Peter Anvin
2006-08-14 19:57 ` Vivek Goyal
2006-08-14 20:10 ` Eric W. Biederman
2006-08-14 20:59 ` Vivek Goyal
2006-08-14 21:15 ` Eric W. Biederman
2006-08-14 20:00 ` Eric W. Biederman
2006-08-08 23:36 ` Andi Kleen
2006-08-25 20:16 ` Vivek Goyal [this message]
2006-08-25 20:16 ` Vivek Goyal
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=20060825201617.GC8909@in.ibm.com \
--to=vgoyal@in.ibm.com \
--cc=ebiederm@xmission.com \
--cc=fastboot@osdl.org \
--cc=horms@verge.net.au \
--cc=hpa@zytor.com \
--cc=lace@jankratochvil.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc64-dev@ozlabs.org \
--cc=lwang@redhat.com \
/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.