diff options
author | alc <alc@FreeBSD.org> | 2004-04-24 03:46:44 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2004-04-24 03:46:44 +0000 |
commit | ff037b922053b9017606ca7f367e03a0b15b0436 (patch) | |
tree | 5e4c7fcfc99f16405827827ff0cce7258c744397 /sys/vm/vm_map.h | |
parent | 37a55c7ec422afd8d71d38197362659be6a4a63b (diff) | |
download | FreeBSD-src-ff037b922053b9017606ca7f367e03a0b15b0436.zip FreeBSD-src-ff037b922053b9017606ca7f367e03a0b15b0436.tar.gz |
In cases where a file was resident in memory mmap(..., PROT_NONE, ...)
would actually map the file with read access enabled. According to
http://www.opengroup.org/onlinepubs/007904975/functions/mmap.html this is
an error. Similarly, an madvise(..., MADV_WILLNEED) would enable read
access on a virtual address range that was PROT_NONE.
The solution implemented herein is (1) to pass a vm_prot_t to
vm_map_pmap_enter() describing the allowed access and (2) to make
vm_map_pmap_enter() responsible for understanding the limitations of
pmap_enter_quick().
Submitted by: "Mark W. Krentel" <krentel@dreamscape.com>
PR: kern/64573
Diffstat (limited to 'sys/vm/vm_map.h')
-rw-r--r-- | sys/vm/vm_map.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/vm/vm_map.h b/sys/vm/vm_map.h index 51e66ca..502b5b9 100644 --- a/sys/vm/vm_map.h +++ b/sys/vm/vm_map.h @@ -333,7 +333,7 @@ int vm_map_lookup (vm_map_t *, vm_offset_t, vm_prot_t, vm_map_entry_t *, vm_obje vm_pindex_t *, vm_prot_t *, boolean_t *); void vm_map_lookup_done (vm_map_t, vm_map_entry_t); boolean_t vm_map_lookup_entry (vm_map_t, vm_offset_t, vm_map_entry_t *); -void vm_map_pmap_enter(vm_map_t map, vm_offset_t addr, +void vm_map_pmap_enter(vm_map_t map, vm_offset_t addr, vm_prot_t prot, vm_object_t object, vm_pindex_t pindex, vm_size_t size, int flags); int vm_map_protect (vm_map_t, vm_offset_t, vm_offset_t, vm_prot_t, boolean_t); int vm_map_remove (vm_map_t, vm_offset_t, vm_offset_t); |