From: Richard Mortimer <richm@oldelvet.org.uk>
To: sparclinux@vger.kernel.org
Subject: Re: mmap breakage
Date: Wed, 08 Dec 2004 00:54:11 +0000 [thread overview]
Message-ID: <1102467250.3704.37.camel@duncow> (raw)
In-Reply-To: <Pine.LNX.4.61.0412032354010.1963@bobcat>
On Tue, 2004-12-07 at 06:00, Jurij Smakov wrote:
> On the sparclinux@vger list we have been recently discussing an issue of
> ld-linux.so.2 failing with SIGILL when executed directly with the
> executable name as an argument [0]. This problem was traced to the mmap
> call overwriting portions of ld-linux.so.2 itself.
...
>
> > We could put ld-linux.so.2 somewhere else, that's not too hard. I
> > would suggest putting it at that 0xfffff80000000000 address I quoted
> > above since that is where the rest of the shared objects are going
> > to end up anyways.
Just thinking about the nasty way that this fails (ld-linux.so.2
overwrites itself presumably causing seemingly random failures depending
on what it overwrites with). How about adding a check prior to mapping
to detect when the situation arises and then fail gracefully.
It would probably require adding a few symbols at the start and end of
each executable section (text, data, bss). Then rounding them to page
aligned values and just checking that you aren't overwriting them. Then
again I don't know the code so it might not turn out to be quite that
easy.
Richard
--
richm@oldelvet.org.uk
next prev parent reply other threads:[~2004-12-08 0:54 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-04 5:22 mmap breakage Jurij Smakov
2004-12-04 23:13 ` Richard Mortimer
2004-12-04 23:16 ` Richard Mortimer
2004-12-06 4:30 ` Jurij Smakov
2004-12-06 5:23 ` David S. Miller
2004-12-07 6:00 ` Jurij Smakov
2004-12-07 6:06 ` David S. Miller
2004-12-07 6:11 ` Keith M Wesolowski
2004-12-07 6:20 ` David S. Miller
2004-12-07 6:31 ` Jurij Smakov
2004-12-07 7:47 ` David S. Miller
2004-12-07 8:24 ` Jakub Jelinek
2004-12-07 15:38 ` Jurij Smakov
2004-12-08 0:54 ` Richard Mortimer [this message]
2004-12-09 5:24 ` David S. Miller
2004-12-09 7:34 ` David S. Miller
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=1102467250.3704.37.camel@duncow \
--to=richm@oldelvet.org.uk \
--cc=sparclinux@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 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.