Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F135453154
D19194.id53918.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1023 B
Referenced Files
None
Subscribers
None
D19194.id53918.diff
View Options
Index: sys/vm/vm_map.c
===================================================================
--- sys/vm/vm_map.c
+++ sys/vm/vm_map.c
@@ -1487,7 +1487,22 @@
static int cluster_anon = 1;
SYSCTL_INT(_vm, OID_AUTO, cluster_anon, CTLFLAG_RW,
&cluster_anon, 0,
- "Cluster anonymous mappings");
+ "Cluster anonymous mappings: 0 = no, 1 = yes if no hint, 2 = always");
+
+static bool
+clustering_anon_allowed(vm_offset_t addr)
+{
+
+ switch (cluster_anon) {
+ case 0:
+ return (false);
+ case 1:
+ return (addr == 0);
+ case 2:
+ default:
+ return (true);
+ }
+}
static long aslr_restarts;
SYSCTL_LONG(_vm, OID_AUTO, aslr_restarts, CTLFLAG_RD,
@@ -1593,7 +1608,7 @@
} else
alignment = 0;
en_aslr = (map->flags & MAP_ASLR) != 0;
- update_anon = cluster = cluster_anon != 0 &&
+ update_anon = cluster = clustering_anon_allowed(*addr) &&
(map->flags & MAP_IS_SUB_MAP) == 0 && max_addr == 0 &&
find_space != VMFS_NO_SPACE && object == NULL &&
(cow & (MAP_INHERIT_SHARE | MAP_STACK_GROWS_UP |
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Nov 11, 12:07 AM (13 h, 8 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
25128474
Default Alt Text
D19194.id53918.diff (1023 B)
Attached To
Mode
D19194: Make anon clustering more compatible.
Attached
Detach File
Event Timeline
Log In to Comment