Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Jan 2021 07:16:05 GMT
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 9402bb44f137 - main - vmspace_fork: preserve wx settings in the child vm map after fork
Message-ID:  <202101120716.10C7G55H046149@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=9402bb44f137eec9c844210ee8436bfee58ac165

commit 9402bb44f137eec9c844210ee8436bfee58ac165
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2021-01-12 06:09:59 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2021-01-12 06:09:59 +0000

    vmspace_fork: preserve wx settings in the child vm map after fork
    
    Noted by:       markj
    Sponsored by:   The FreeBSD Foundation
---
 sys/vm/vm_map.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c
index bea776480391..9746d07713d3 100644
--- a/sys/vm/vm_map.c
+++ b/sys/vm/vm_map.c
@@ -4303,7 +4303,8 @@ vmspace_fork(struct vmspace *vm1, vm_ooffset_t *fork_charge)
 	}
 
 	new_map->anon_loc = old_map->anon_loc;
-	new_map->flags |= old_map->flags & (MAP_ASLR | MAP_ASLR_IGNSTART);
+	new_map->flags |= old_map->flags & (MAP_ASLR | MAP_ASLR_IGNSTART |
+	    MAP_WXORX);
 
 	VM_MAP_ENTRY_FOREACH(old_entry, old_map) {
 		if ((old_entry->eflags & MAP_ENTRY_IS_SUB_MAP) != 0)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202101120716.10C7G55H046149>