Not logged in
Log in now
Create an account
Subscribe to LWN
Pencil, Pencil, and Pencil
Dividing the Linux desktop
LWN.net Weekly Edition for June 13, 2013
A report from pgCon 2013
Little things that matter in language design
Why not double-mmap a region created with shm_open() and ftruncate()?
Virtual Machines and Memory Protections
Posted Nov 22, 2006 19:29 UTC (Wed) by bluefoxicy (guest, #25366)
Posted Nov 22, 2006 21:59 UTC (Wed) by cventers (subscriber, #31465)
Posted Nov 23, 2006 19:27 UTC (Thu) by bluefoxicy (guest, #25366)
> 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.
Posted Nov 23, 2006 21:42 UTC (Thu) by cventers (subscriber, #31465)
Well, I think SysV shared memory is crap. POSIX shared memory is much
better. shm_open() says nothing about execute permissions in the manual
page. I haven't checked the kernel's implementation, but I thought that
might indicate that it does nothing special there.
Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds