Virtual Machines and Memory Protections
Posted Nov 23, 2006 19:27 UTC (Thu) by bluefoxicy
In reply to: Virtual Machines and Memory Protections
Parent article: Virtual Machines and Memory Protections
Read the man page for shmget.
> mode_flags (least significant 9 bits) specifying the permissions granted to the owner, group, and world. These bits have the same format, and the same meaning, as the mode argument of open(2). Presently, the execute permissions are not used by the system.
I may be wrong about POSIX, but Linux disallows shared memory to be executable. Any attempt to use shared memory violating its permissions (i.e. mmap()ing it writable when the caller has only read-only perms) fails.
Yes, shared memory is complex and confusing as crap. Don't feel bad if you don't get it.
to post comments)