From: deraadt Date: Sat, 11 Feb 2023 21:11:37 +0000 (+0000) Subject: I forgot to copy the msyscall interlock flag to forked processes, so X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=6d452f5a5795b40c3088871f87b71df686d51007;p=openbsd I forgot to copy the msyscall interlock flag to forked processes, so only freshly executed processes were actually locked. (This happened because I didn't realize how the uvm_map's contents are copied entry by entry, and other parts are not) ok kettenis --- diff --git a/sys/uvm/uvm_map.c b/sys/uvm/uvm_map.c index 9ee15eaab94..7ee39c71838 100644 --- a/sys/uvm/uvm_map.c +++ b/sys/uvm/uvm_map.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_map.c,v 1.309 2023/01/31 15:18:55 deraadt Exp $ */ +/* $OpenBSD: uvm_map.c,v 1.310 2023/02/11 21:11:37 deraadt Exp $ */ /* $NetBSD: uvm_map.c,v 1.86 2000/11/27 08:40:03 chs Exp $ */ /* @@ -3982,6 +3982,7 @@ uvmspace_fork(struct process *pr) new_map, new_entry->start, new_entry->end); } } + new_map->flags |= old_map->flags & VM_MAP_SYSCALL_ONCE; vm_map_unlock(old_map); vm_map_unlock(new_map);