From 2084b95b807f999a25b4e2655cb59c6db6c43e01 Mon Sep 17 00:00:00 2001 From: Jeremy Evans Date: Mon, 20 Jul 2015 18:58:54 +0000 Subject: Allow the sched_yield, __thrsleep, __thrwakeup, and __threxit syscalls when using tame(2). This allows threaded programs to work. OK deraadt@ --- sys/kern/kern_tame.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'sys/kern') diff --git a/sys/kern/kern_tame.c b/sys/kern/kern_tame.c index 3ef4b117af7..9fc57ba1ad2 100644 --- a/sys/kern/kern_tame.c +++ b/sys/kern/kern_tame.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_tame.c,v 1.9 2015/07/20 18:04:05 schwarze Exp $ */ +/* $OpenBSD: kern_tame.c,v 1.10 2015/07/20 18:58:53 jeremy Exp $ */ /* * Copyright (c) 2015 Nicholas Marriott @@ -77,6 +77,12 @@ const u_int tame_syscalls[SYS_MAXSYSCALL] = { [SYS_fchdir] = _TM_SELF, /* careful of directory fd inside jails */ + /* needed by threaded programs */ + [SYS_sched_yield] = _TM_SELF, + [SYS___thrsleep] = _TM_SELF, + [SYS___thrwakeup] = _TM_SELF, + [SYS___threxit] = _TM_SELF, + [SYS_sendsyslog] = _TM_SELF, [SYS_nanosleep] = _TM_SELF, [SYS_sigprocmask] = _TM_SELF, -- cgit v1.2.3