From: "Chris Friesen" <cfriesen@nortel.com>
To: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: linux-kernel@vger.kernel.org, Andi Kleen <ak@suse.de>,
Andrew Morton <akpm@osdl.org>,
James Bottomley <James.Bottomley@steeleye.com>,
bapper@piratehaven.org, aaw@google.com
Subject: Re: RFC: bug in load_elf_binary?
Date: Thu, 13 Sep 2007 17:25:24 -0600 [thread overview]
Message-ID: <46E9C6E4.5080102@nortel.com> (raw)
In-Reply-To: <46E9B30E.1080402@goop.org>
Jeremy Fitzhardinge wrote:
> Chris Friesen wrote:
>
>>The elf spec says that PT_LOAD segments must be ordered by vaddr. We
>>want to have a segment at a relatively low fixed vaddr. The exact
>>address is not important, except that it's lower than the standard elf
>>headers and so it must be the first segment in the elf file.
>
>
> So you want a zero mapping at a particular address? So the vaddr and
> the memsz are set, but offset and filesz are zero?
I believe that's correct. It's basically the equivalent of BSS, but
used for an emulated OS (the app in question is an emulator).
> Well, you could make the p_offset the same as the first segment with a
> non-zero filesz. That should satisfy the elf loader, though it might
> still confuse things.
Interesting idea. Worth a try.
However, this doesn't address the kernel side of things. Am I correct
in thinking that the kernel is making an invalid assumption that it can
find the load_addr based on the first segment?
> Why can't you create this mapping at runtime?
Our emulated OS wants to put stuff at fixed addresses in this range, so
we're trying to keep the loader from allocating stuff there before our
program gets a chance to start up.
Chris
next prev parent reply other threads:[~2007-09-13 23:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-10 21:28 RFC: possible bug in load_elf_binary Chris Friesen
2007-09-12 18:36 ` RFC: bug in load_elf_binary? Chris Friesen
2007-09-13 22:00 ` Jeremy Fitzhardinge
2007-09-13 23:25 ` Chris Friesen [this message]
2007-09-14 18:21 ` Jeremy Fitzhardinge
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=46E9C6E4.5080102@nortel.com \
--to=cfriesen@nortel.com \
--cc=James.Bottomley@steeleye.com \
--cc=aaw@google.com \
--cc=ak@suse.de \
--cc=akpm@osdl.org \
--cc=bapper@piratehaven.org \
--cc=jeremy@goop.org \
--cc=linux-kernel@vger.kernel.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