summaryrefslogtreecommitdiff
path: root/sys/kern/syscalls.master
diff options
context:
space:
mode:
authorJeremie Courreges-Anglas <jca@cvs.openbsd.org>2022-06-29 12:17:32 +0000
committerJeremie Courreges-Anglas <jca@cvs.openbsd.org>2022-06-29 12:17:32 +0000
commit9050512de11c19ea0fdaad55115620c39f249cd6 (patch)
tree33f748113601f944b3ecf30a5c26953195eb90a6 /sys/kern/syscalls.master
parent2dca4a74d9c9c655562b703e757b61cb0de01266 (diff)
Unlock the pledge(2) system call
Protect the ps_pledge/ps_execpledge fields with ps_mtx. Shuffle the code to call unveil_destroy() outside the critical section. Only writes to those fields are protected. Since we may only remove bits from those fields, garbage values should do no harm even when a read crosses a write on 32 bits systems. Input claudio@ kettenis@ deraadt@, ok deraadt@
Diffstat (limited to 'sys/kern/syscalls.master')
-rw-r--r--sys/kern/syscalls.master4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master
index b02d109ff27..ae187f3fdd4 100644
--- a/sys/kern/syscalls.master
+++ b/sys/kern/syscalls.master
@@ -1,4 +1,4 @@
-; $OpenBSD: syscalls.master,v 1.225 2022/06/27 14:26:05 cheloha Exp $
+; $OpenBSD: syscalls.master,v 1.226 2022/06/29 12:17:31 jca Exp $
; $NetBSD: syscalls.master,v 1.32 1996/04/23 10:24:21 mycroft Exp $
; @(#)syscalls.master 8.2 (Berkeley) 1/13/94
@@ -228,7 +228,7 @@
106 STD { int sys_listen(int s, int backlog); }
107 STD { int sys_chflagsat(int fd, const char *path, \
u_int flags, int atflags); }
-108 STD { int sys_pledge(const char *promises, \
+108 STD NOLOCK { int sys_pledge(const char *promises, \
const char *execpromises); }
109 STD { int sys_ppoll(struct pollfd *fds, \
u_int nfds, const struct timespec *ts, \