From: Jakub Jelinek <jakub@redhat.com>
To: John Reiser <jreiser@BitWagon.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>,
linux-kernel@vger.kernel.org
Subject: Re: Potential bug in fs/binfmt_elf.c?
Date: Mon, 8 Mar 2004 03:06:15 -0500 [thread overview]
Message-ID: <20040308080615.GS31589@devserv.devel.redhat.com> (raw)
In-Reply-To: <404C0B57.6030607@BitWagon.com>
On Sun, Mar 07, 2004 at 09:57:43PM -0800, John Reiser wrote:
> >> LOAD 0x001000 0x00400000 0x00400000 0x00000 0x10000000 R
> >> 0x1000
> >
> >
> >What is the purpose of allocating 256MB of read-only zeros?
>
> To prevent the kernel from placing any shared libraries there [via mmap()
> from ld-linux.so.2], especially under the influence of exec-shield.
> This is 'wine', which wants to reserve that address space for mapping
> executables that were built for some other operating system. For this
> purpose, the .p_flags of PF_R instead could be 0 [==> PROT_NONE]; but
> do_brk() still turns either one into 'prw.' which has potential memory
> [over-]commit charges. The expected 'pr--' [or 'p---'] should have
> a memory commit cost of zero.
It should really be p_flags 0 and binfmt_elf.c should be fixed if it doesn't
handle that properly.
glibc ld.so indeed does the right thing with p_flags 0.
Jakub
next prev parent reply other threads:[~2004-03-08 8:06 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-05 17:38 Potential bug in fs/binfmt_elf.c? Mike Hearn
2004-03-05 18:28 ` John Reiser
2004-03-06 18:46 ` Ulrich Drepper
2004-03-06 21:10 ` Mike Hearn
2004-03-07 6:11 ` Ulrich Drepper
2004-03-07 9:58 ` Mike Hearn
2004-03-07 10:46 ` Ulrich Drepper
2004-03-07 11:53 ` Mike Hearn
2004-03-07 21:32 ` Ulrich Drepper
2004-03-07 23:55 ` Eric W. Biederman
2004-03-08 5:57 ` John Reiser
2004-03-08 8:06 ` Jakub Jelinek [this message]
2004-03-11 6:17 ` [PATCH] binfmt_elf.c allow .bss with no access (p---) John Reiser
2004-03-11 14:23 ` Mike Hearn
2004-03-11 19:18 ` John Reiser
2004-03-12 16:42 ` Mike Hearn
[not found] ` <20040412185317.79ac7d7d.akpm@osdl.org>
2004-04-13 17:33 ` John Reiser
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=20040308080615.GS31589@devserv.devel.redhat.com \
--to=jakub@redhat.com \
--cc=ebiederm@xmission.com \
--cc=jreiser@BitWagon.com \
--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