From: Ryan Cumming <bodnar42@phalynx.dhs.org>
To: Rock Gordon <rockgordon@yahoo.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Executing binaries on new filesystem
Date: Mon, 19 Nov 2001 15:45:20 -0800 [thread overview]
Message-ID: <E165y6K-00012D-00@localhost> (raw)
In-Reply-To: <20011119163455.11507.qmail@web14804.mail.yahoo.com>
In-Reply-To: <20011119163455.11507.qmail@web14804.mail.yahoo.com>
On November 19, 2001 08:34, Rock Gordon wrote:
> I don't think mmap is the problem; you don't need it
> in order to run binaries ...
Er... and what brings you to that assertion? Try cat'ing /proc/<pid>/maps on
any program, and you'll see the program's binary in the maps list multiple
times, including one executable map of the .code section. To use my current
mail client as an example:
bodnar42:~$ pidof kmail
3905
bodnar42:~$ cat /proc/3905/maps
08048000-081b0000 r-xp 00000000 03:05 1209118 /usr/bin/kmail
081b0000-081bb000 rw-p 00167000 03:05 1209118 /usr/bin/kmail
081bb000-0863a000 rwxp 00000000 00:00 0
40000000-40014000 r-xp 00000000 03:05 1154 /lib/ld-2.2.4.so
40014000-40015000 rw-p 00013000 03:05 1154 /lib/ld-2.2.4.so
40015000-40016000 rwxp 00000000 00:00 0
40016000-4001c000 rw-p 00000000 00:00 0
4001d000-4001e000 rw-p 00007000 00:00 0
40022000-40203000 r-xp 00000000 03:05 442168 /usr/lib/libkhtml.so.3.0.0
40203000-40235000 rw-p 001e0000 03:05 442168 /usr/lib/libkhtml.so.3.0.0
...
Any sane ELF loader will use mmap() to both execute binaries and load shared
libraries, and Linux's ELF loader is certainly no exception. I remember users
not being able to run binaries (both Win32 and Linux/ELF) off of NTFS
partitions, because the Linux NTFS driver did not implement mmap(). You'll
probably have much better luck once you implement it on yours.
-Ryan
next prev parent reply other threads:[~2001-11-19 23:46 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-11-17 22:18 Executing binaries on new filesystem Rock Gordon
2001-11-17 22:24 ` Mike Fedyk
2001-11-18 0:08 ` Eric W. Biederman
2001-11-18 0:54 ` Jeff Dike
2001-11-18 15:13 ` Terje Eggestad
2001-11-19 16:34 ` Rock Gordon
2001-11-19 23:45 ` Ryan Cumming [this message]
2001-11-20 3:39 ` Eric W. Biederman
2001-11-20 9:34 ` Terje Eggestad
2001-11-28 1:43 ` Rock Gordon
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=E165y6K-00012D-00@localhost \
--to=bodnar42@phalynx.dhs.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rockgordon@yahoo.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox