summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_map.h
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2009-04-10 10:16:03 +0000
committerkib <kib@FreeBSD.org>2009-04-10 10:16:03 +0000
commit81638d98846e99a6bfcf7398057a650533aa1390 (patch)
treed2a9dfe34e82f1ea1ab3cbe791593b31fbee1dd2 /sys/vm/vm_map.h
parent5a12c5d70e83806a92145c478867d74073203a09 (diff)
downloadFreeBSD-src-81638d98846e99a6bfcf7398057a650533aa1390.zip
FreeBSD-src-81638d98846e99a6bfcf7398057a650533aa1390.tar.gz
When vm_map_wire(9) is allowed to skip holes in the wired region, skip
the mappings without any of read and execution rights, in particular, the PROT_NONE entries. This makes mlockall(2) work for the process address space that has such mappings. Since protection mode of the entry may change between setting MAP_ENTRY_IN_TRANSITION and final pass over the region that records the wire status of the entries, allocate new map entry flag MAP_ENTRY_WIRE_SKIPPED to mark the skipped PROT_NONE entries. Reported and tested by: Hans Ottevanger <fbsdhackers beasties demon nl> Reviewed by: alc MFC after: 3 weeks
Diffstat (limited to 'sys/vm/vm_map.h')
-rw-r--r--sys/vm/vm_map.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/vm/vm_map.h b/sys/vm/vm_map.h
index 34b183b..70c3a0b 100644
--- a/sys/vm/vm_map.h
+++ b/sys/vm/vm_map.h
@@ -137,6 +137,8 @@ struct vm_map_entry {
#define MAP_ENTRY_GROWS_DOWN 0x1000 /* Top-down stacks */
#define MAP_ENTRY_GROWS_UP 0x2000 /* Bottom-up stacks */
+#define MAP_ENTRY_WIRE_SKIPPED 0x4000
+
#ifdef _KERNEL
static __inline u_char
vm_map_entry_behavior(vm_map_entry_t entry)
OpenPOWER on IntegriCloud