Re: Testing PROT_NONE and other protections, and a surprise

Kyle Moffett
2004-07-01T03:44:51Z

On Jun 30, 2004, at 23:26, Jamie Lokier wrote:
### i386 ###
> Requested PROT | --- R-- -W- RW- --X R-X -WX RWX
> =======================================================================
> =
> MAP_SHARED | --- r-x !w! rwx r-x r-x rwx rwx
> MAP_PRIVATE | --- r-x !w! rwx r-x r-x rwx rwx

### ppc32 ### Appears to be the same
Requested PROT | --- R-- -W- RW- --X R-X -WX RWX
========================================================================
MAP_SHARED | --- r-x !w! rwx r-x r-x rwx rwx
MAP_PRIVATE | --- r-x !w! rwx r-x r-x rwx rwx

Just for kicks, I ran this on Mac OS X too :-D Interesting results!
Requested PROT | --- R-- -W- RW- --X R-X -WX RWX
========================================================================
MAP_SHARED | --- r-x --- rwx --- r-x --- rwx
MAP_PRIVATE | --- r-x --- rwx --- r-x --- rwx

Cheers,
Kyle Moffett