Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F97689582
D39845.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
976 B
Referenced Files
None
Subscribers
None
D39845.diff
View Options
diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c
--- a/sys/vm/vm_map.c
+++ b/sys/vm/vm_map.c
@@ -2247,8 +2247,15 @@
rv = vm_map_insert(map, object, offset, *addr, *addr + length,
prot, max, cow);
}
- if (rv == KERN_SUCCESS && update_anon)
- map->anon_loc = *addr + length;
+
+ /*
+ * Update the starting address for clustered anonymous memory mappings
+ * if a starting address was not previously defined or an ASLR restart
+ * placed an anonymous memory mapping at a lower address.
+ */
+ if (update_anon && rv == KERN_SUCCESS && (map->anon_loc == 0 ||
+ *addr < map->anon_loc))
+ map->anon_loc = *addr;
done:
vm_map_unlock(map);
return (rv);
@@ -4041,9 +4048,6 @@
entry->object.vm_object != NULL)
pmap_map_delete(map->pmap, entry->start, entry->end);
- if (entry->end == map->anon_loc)
- map->anon_loc = entry->start;
-
/*
* Delete the entry only after removing all pmap
* entries pointing to its pages. (Otherwise, its
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Oct 1, 7:24 PM (21 h, 46 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
13206904
Default Alt Text
D39845.diff (976 B)
Attached To
Mode
D39845: VM anonymous clustering: be more persistent
Attached
Detach File
Event Timeline
Log In to Comment