Re: Testing PROT_NONE and other protections, and a surprise

From: Kyle Moffett
Date: Wed Jun 30 2004 - 22:46:03 EST


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


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/