I forgot to copy the msyscall interlock flag to forked processes, so
authorderaadt <deraadt@openbsd.org>
Sat, 11 Feb 2023 21:11:37 +0000 (21:11 +0000)
committerderaadt <deraadt@openbsd.org>
Sat, 11 Feb 2023 21:11:37 +0000 (21:11 +0000)
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

sys/uvm/uvm_map.c

index 9ee15ea..7ee39c7 100644 (file)
@@ -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);