From: paradis@sousa.ako.dec.com (Jim Paradis)
Subject: Re: More Alpha/AXP I cache flushing questions
Date: 12 Oct 1993 19:39:21 -0400 [thread overview]
Message-ID: <29ff79$ej8@sousa.ako.dec.com> (raw)
In-Reply-To: 1993Oct12.181743.10010@beaver.cs.washington.edu
David Keppel (pardo@cs.washington.edu) wrote:
: For my next Alpha question, I get SEGV's (I'm running OSF/1 1.3) when I
: try to `malloc' a region and use it for writing and executing code.
(examples deleted)
The Alpha AXP virtual memory architecture provides for separate
protection bits for read, write, and execute. On many earlier
systems, read permission implied execute permission, but this is
no longer the case for DEC OSF/1 AXP.
Under DEC OSF, the program data, bss, and heap are protected
read/write/noexecute. Thus, any newly malloc'ed region is available
for read and write access, but NOT for execute access. The purpose of
this is that 99% of the time, a branch into user data or heap space is
an errouneous wild branch. It is also assumed that anyone who is
generating code in data space knows what s/he's doing and can muck the
protections accordingly 8-)
The reason it doesn't *always* fail on you is that this protection is
on an 8K page basis. If you malloc a small chunk (say, 2Kb), mprotect
it to permit execution, then malloc *another* small chunk (say, another
2Kb)... then if the second piece is in the same 8K page as the first it
will have execute access too.
--
Jim Paradis (paradis@tallis.enet.dec.com)
The purpose of time is to keep everything from happening at once.
It's not working.
prev parent reply other threads:[~1993-10-12 23:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1993-10-12 18:17 More Alpha/AXP I cache flushing questions David Keppel
1993-10-12 23:39 ` Jim Paradis [this message]
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox