mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: ebiederm@xmission.com (Eric W. Biederman)
To: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Rusty Russell <rusty@rustcorp.com.au>,
	"H. Peter Anvin" <hpa@zytor.com>, Andi Kleen <ak@suse.de>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] i386: always clear bss
Date: Fri, 04 May 2007 09:45:43 -0600	[thread overview]
Message-ID: <m1vef8r3rs.fsf@ebiederm.dsl.xmission.com> (raw)
In-Reply-To: <463B508A.2030307@goop.org> (Jeremy Fitzhardinge's message of "Fri, 04 May 2007 08:26:02 -0700")

Jeremy Fitzhardinge <jeremy@goop.org> writes:

> Eric W. Biederman wrote:
>> Using 0x40 as a stack would be ok.
>>   
>
> OK.
>
>> There are issues with CONFIG_RELOCATABLE and V!=P that I'm not
>> comfortable with yet, because we can't tell the difference.
>
> But it doesn't matter in this case, does it?  It just needs to find the
> current address, whether it be virtual or physical, of the bss.  It
> doesn't assume any particular offset.

For the bss that sounds correct.

> When does the relocation happen?   Does the bzImage loader do it as part
> of decompression?  Or does the kernel do it to itself?  (Not that it
> makes any difference here.)

Currently right after compression just before we jump to startup_32.
But if the usage of vmlinux continues to increase we should really
move it to just after startup_32.  Which is where we run into problems
with supporting virtual addresses at our normal kernel entry point.

The relocation doesn't live just after startup_32 now because it is
hard to put there.

The practical challenge is that we need to compute the delta between
where we are at and where we were compiled for, and with possibility of
virtual address and physical address I don't know how we would compute
where we are at, in a way we could compare to our compile time physical
or virtual addresses.

Xen when it comes it at a completely isolated entry point is fine
because there is no pretence of code reuse, and we don't have to auto-detect
how we were started.

Eric

  reply	other threads:[~2007-05-04 15:46 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-04  8:21 Jeremy Fitzhardinge
2007-05-04 11:46 ` Eric W. Biederman
2007-05-04 14:57   ` Jeremy Fitzhardinge
2007-05-04 15:22     ` Eric W. Biederman
2007-05-04 15:26       ` Jeremy Fitzhardinge
2007-05-04 15:45         ` Eric W. Biederman [this message]
2007-05-04 15:50     ` H. Peter Anvin
2007-05-04 17:05       ` Eric W. Biederman
2007-05-04 17:08         ` H. Peter Anvin
2007-05-04 17:15           ` Eric W. Biederman
2007-05-04 17:26             ` H. Peter Anvin
2007-05-04 19:00               ` Eric W. Biederman
2007-05-04 19:03                 ` H. Peter Anvin
2007-05-04 23:17                 ` H. Peter Anvin
2007-05-05  1:45                   ` Eric W. Biederman
2007-05-05  1:49                     ` H. Peter Anvin
2007-05-05  2:11                       ` 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=m1vef8r3rs.fsf@ebiederm.dsl.xmission.com \
    --to=ebiederm@xmission.com \
    --cc=ak@suse.de \
    --cc=hpa@zytor.com \
    --cc=jeremy@goop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rusty@rustcorp.com.au \
    /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

all inboxes | Powered by JetHome®