mmap: accept non-PROT_WRITE MAP_SHARED mappings
Currently we don't accept writable file mmap()s, as there is no system in place to guarantee dirty buffers would make it back to disk. But we can actually accept MAP_SHARED for PROT_READ mappings, meaning the ranges aren't writable at all (and no private copy is made as with MAP_PRIVATE), as it turns out a fairly large class of usage. . fail writable MAP_SHARED mappings at runtime . reduces some minix-specific patches . lets binutils gold build on minix without further patching Change-Id: If2896c0a555328ac5b324afa706063fc6d86519e
This commit is contained in:
@@ -68,9 +68,7 @@ typedef __off_t off_t; /* file offset */
|
||||
* Flags contain sharing type and options.
|
||||
* Sharing types; choose one.
|
||||
*/
|
||||
#if !defined(__minix)
|
||||
#define MAP_SHARED 0x0001 /* share changes */
|
||||
#endif /* !defined(__minix) */
|
||||
#define MAP_PRIVATE 0x0002 /* changes are private */
|
||||
|
||||
#ifdef _KERNEL
|
||||
|
||||
Reference in New Issue
Block a user