Page MenuHomeFreeBSD

D25966.id75448.diff
No OneTemporary

D25966.id75448.diff

Index: sys/vm/vm_map.h
===================================================================
--- sys/vm/vm_map.h
+++ sys/vm/vm_map.h
@@ -223,6 +223,7 @@
#define MAP_IS_SUB_MAP 0x04 /* has parent */
#define MAP_ASLR 0x08 /* enabled ASLR */
#define MAP_ASLR_IGNSTART 0x10
+#define MAP_FORK_FLAGS (MAP_ASLR | MAP_ASLR_IGNSTART)
#ifdef _KERNEL
#if defined(KLD_MODULE) && !defined(KLD_TIED)
Index: sys/vm/vm_map.c
===================================================================
--- sys/vm/vm_map.c
+++ sys/vm/vm_map.c
@@ -4099,6 +4099,8 @@
locked = vm_map_trylock(new_map); /* trylock to silence WITNESS */
KASSERT(locked, ("vmspace_fork: lock failed"));
+ new_map->flags |= (old_map->flags & MAP_FORK_FLAGS);
+
error = pmap_vmspace_copy(new_map->pmap, old_map->pmap);
if (error != 0) {
sx_xunlock(&old_map->lock);

File Metadata

Mime Type
text/plain
Expires
Wed, Apr 8, 12:55 AM (5 h, 19 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31060934
Default Alt Text
D25966.id75448.diff (835 B)

Event Timeline