From: "H. Peter Anvin" <hpa@zytor.com>
To: linux-kernel@vger.kernel.org
Subject: Re: can we make anonymous memory non-EXECUTABLE?
Date: 8 Jan 2002 18:44:55 -0800 [thread overview]
Message-ID: <a1gar7$12t$1@cesium.transmeta.com> (raw)
In-Reply-To: <200201080025.QAA26731@napali.hpl.hp.com> <20020107.220208.23012783.davem@redhat.com> <15419.17581.990574.160248@napali.hpl.hp.com>
Followup to: <15419.17581.990574.160248@napali.hpl.hp.com>
By author: David Mosberger <davidm@napali.hpl.hp.com>
In newsgroup: linux.dev.kernel
>
> I don't consider SIGSEGV to be a silent failure. Also, I think
> all the evidence is that it's unlikely to break many existing
> apps:
>
> o The bug I described has been present for *years* on
> Alpha and probably all other platforms other than x86;
> even on ia64 it took almost two years before someone
> noticed. It's possible that nobody noticed because
> the code generators were part of a larger program,
> but it's very likely that anyone writing a test program
> would have allocated the non-executable memory, so you'd
> expect *someone* to have run into it at some point.
>
> o Certain libraries such as the Boehm Garbage Collector
> already turn off execute permission by default. While
> there may not be that many apps that use it in a production
> environment, it is my impression that many developers are
> using it as a memory-leak detector (e.g., Mozilla does that).
>
>
> DaveM> Secondly, I do not see any
> DaveM> real gain from any of this and my ports are those that have
> DaveM> I-cache coherency issues :-)
>
> I think that's fine. If the consensus is that apps *should* use
> mprotect() to get executable permission (Linus implied as much) and
> it's an architecture specific choice as to whether this is enforced,
> I'm happy. My belief is that we could make this change on ia64
> without undue burden on programmers. If not, I'm sure I'll find out
> about it and I'm willing to take the responsibility.
>
One way to do this would be to create a newbrk() syscall which takes a
permission argument (for new pages.)
-hpa
--
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!
"Unix gives you enough rope to shoot yourself in the foot."
http://www.zytor.com/~hpa/puzzle.txt <amsp@zytor.com>
next prev parent reply other threads:[~2002-01-09 2:45 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-01-08 0:25 can we make anonymous memory non-EXECUTABLE? David Mosberger
2002-01-08 6:02 ` David S. Miller
2002-01-08 19:12 ` David Mosberger
2002-01-08 19:32 ` Albert D. Cahalan
2002-01-09 2:44 ` H. Peter Anvin [this message]
2002-01-09 2:49 ` Rik van Riel
2002-01-09 2:52 ` H. Peter Anvin
2002-01-09 11:32 ` Rob Landley
2002-01-09 19:47 ` Doug McNaught
2002-01-09 3:11 ` Alan Cox
2002-01-09 9:40 ` Erik Andersen
2002-01-08 13:23 ` Alan Cox
2002-01-08 19:15 ` [Linux-ia64] " David Mosberger
2002-01-11 5:49 ` David Mosberger
2002-01-10 1:04 ` Paul Mackerras
2002-01-10 3:40 ` David Mosberger
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='a1gar7$12t$1@cesium.transmeta.com' \
--to=hpa@zytor.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