summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Guenther <guenther@cvs.openbsd.org>2015-11-10 04:31:00 +0000
committerPhilip Guenther <guenther@cvs.openbsd.org>2015-11-10 04:31:00 +0000
commitf4c862a2e72bfacff5dcfbc873e4d27a4d848b02 (patch)
tree55ce8d828a416a6311793064b0650abf78062d59
parent2de40dc0593bdf96a17ccf05b725d8b4260ec0e1 (diff)
Split the intra-thread functionality from kill(2) into its own syscall
thrkill(2), rolling the kill(2) syscall number with the ABI change to avoid breaking binaries during during the transition. thrkill(2) includes a 'tcb' argument that eliminates the need for locking in pthread_kill() and simplifies pthread_cancel(). Switch __stack_smash_handler() to use thrkill(2) and explicitly unblock SIGABRT. Minor bump to both libc and libpthread: make sure you install a new kernel! ok semarie@
-rw-r--r--include/signal.h3
-rw-r--r--lib/libc/Symbols.list2
-rw-r--r--lib/libc/gen/raise.c4
-rw-r--r--lib/libc/hidden/signal.h3
-rw-r--r--lib/libc/shlib_version2
-rw-r--r--lib/libc/sys/Makefile.inc6
-rw-r--r--lib/libc/sys/stack_protector.c9
-rw-r--r--lib/libc/sys/thrkill.2105
-rw-r--r--lib/librthread/rthread.c48
-rw-r--r--lib/librthread/rthread.h4
-rw-r--r--lib/librthread/shlib_version2
-rw-r--r--sys/kern/kern_pledge.c6
-rw-r--r--sys/kern/kern_sig.c87
-rw-r--r--sys/kern/syscalls.master8
-rw-r--r--usr.bin/kdump/kdump.c3
15 files changed, 228 insertions, 64 deletions
diff --git a/include/signal.h b/include/signal.h
index ac3d7f9d594..7af669d2dbb 100644
--- a/include/signal.h
+++ b/include/signal.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: signal.h,v 1.22 2014/07/12 02:51:52 guenther Exp $ */
+/* $OpenBSD: signal.h,v 1.23 2015/11/10 04:30:59 guenther Exp $ */
/* $NetBSD: signal.h,v 1.8 1996/02/29 00:04:57 jtc Exp $ */
/*-
@@ -113,6 +113,7 @@ int sigblock(int);
int sigreturn(struct sigcontext *);
int sigsetmask(int);
int sigvec(int, struct sigvec *, struct sigvec *);
+int thrkill(pid_t _tid, int _signum, void *_tcb);
#endif
#endif /* __BSD_VISIBLE || __XPG_VISIBLE >= 420 */
#if __BSD_VISIBLE || __POSIX_VISIBLE >= 199309 || __XPG_VISIBLE >= 500
diff --git a/lib/libc/Symbols.list b/lib/libc/Symbols.list
index 2c9c55189ca..70770229cd1 100644
--- a/lib/libc/Symbols.list
+++ b/lib/libc/Symbols.list
@@ -228,6 +228,7 @@ _thread_sys_symlinkat
_thread_sys_sync
_thread_sys_sysarch
_thread_sys_sysctl
+_thread_sys_thrkill
_thread_sys_truncate
_thread_sys_umask
_thread_sys_unlink
@@ -430,6 +431,7 @@ timer_delete
timer_getoverrun
timer_gettime
timer_settime
+thrkill
truncate
umask
unlink
diff --git a/lib/libc/gen/raise.c b/lib/libc/gen/raise.c
index b477183d141..a0fa5b0f1b0 100644
--- a/lib/libc/gen/raise.c
+++ b/lib/libc/gen/raise.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: raise.c,v 1.7 2015/09/12 16:46:12 guenther Exp $ */
+/* $OpenBSD: raise.c,v 1.8 2015/11/10 04:30:59 guenther Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
@@ -34,6 +34,6 @@
int
raise(int s)
{
- return (kill(getthrid(), s));
+ return (thrkill(0, s, NULL));
}
DEF_STRONG(raise);
diff --git a/lib/libc/hidden/signal.h b/lib/libc/hidden/signal.h
index f23578d725d..5a1f17fb5c1 100644
--- a/lib/libc/hidden/signal.h
+++ b/lib/libc/hidden/signal.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: signal.h,v 1.9 2015/10/25 04:13:59 guenther Exp $ */
+/* $OpenBSD: signal.h,v 1.10 2015/11/10 04:30:59 guenther Exp $ */
/*
* Copyright (c) 2015 Philip Guenther <guenther@openbsd.org>
*
@@ -52,5 +52,6 @@ PROTO_NORMAL(sigreturn);
PROTO_NORMAL(sigsetmask);
/*PROTO_CANCEL(sigsuspend); wrap to hide SIGTHR */
PROTO_DEPRECATED(sigvec);
+PROTO_NORMAL(thrkill);
#endif /* !_LIBC_SIGNAL_H */
diff --git a/lib/libc/shlib_version b/lib/libc/shlib_version
index 4635d2ba64c..fce886b2e0a 100644
--- a/lib/libc/shlib_version
+++ b/lib/libc/shlib_version
@@ -1,4 +1,4 @@
major=84
-minor=0
+minor=1
# note: If changes were made to include/thread_private.h or if system
# calls were added/changed then librthread/shlib_version also be updated.
diff --git a/lib/libc/sys/Makefile.inc b/lib/libc/sys/Makefile.inc
index 9fa5eb947d2..a6cd01ed765 100644
--- a/lib/libc/sys/Makefile.inc
+++ b/lib/libc/sys/Makefile.inc
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.inc,v 1.135 2015/10/23 04:39:24 guenther Exp $
+# $OpenBSD: Makefile.inc,v 1.136 2015/11/10 04:30:59 guenther Exp $
# $NetBSD: Makefile.inc,v 1.35 1995/10/16 23:49:07 jtc Exp $
# @(#)Makefile.inc 8.1 (Berkeley) 6/17/93
@@ -57,7 +57,7 @@ ASM= __get_tcb.o __getcwd.o __semctl.o __set_tcb.o __syscall.o \
settimeofday.o setuid.o shmat.o shmctl.o shmdt.o \
shmget.o shutdown.o sigaltstack.o socket.o \
socketpair.o stat.o statfs.o swapctl.o symlink.o symlinkat.o \
- sync.o sysarch.o sysctl.o umask.o unlink.o unlinkat.o \
+ sync.o sysarch.o sysctl.o thrkill.o umask.o unlink.o unlinkat.o \
unmount.o utimensat.o utimes.o utrace.o wait4.o write.o writev.o
SRCS+= ${SRCS_${MACHINE_CPU}}
@@ -166,7 +166,7 @@ MAN+= __get_tcb.2 __thrsigdivert.2 __thrsleep.2 _exit.2 accept.2 \
shmctl.2 shmget.2 shutdown.2 sigaction.2 sigaltstack.2 sigpending.2 \
sigprocmask.2 sigreturn.2 sigsuspend.2 socket.2 \
socketpair.2 stat.2 statfs.2 swapctl.2 symlink.2 \
- sync.2 sysarch.2 syscall.2 truncate.2 umask.2 unlink.2 \
+ sync.2 sysarch.2 syscall.2 thrkill.2 truncate.2 umask.2 unlink.2 \
utimes.2 utrace.2 vfork.2 wait.2 write.2
MLINKS+=__get_tcb.2 __set_tcb.2
diff --git a/lib/libc/sys/stack_protector.c b/lib/libc/sys/stack_protector.c
index 75c7ef83d79..e61a5f2f82f 100644
--- a/lib/libc/sys/stack_protector.c
+++ b/lib/libc/sys/stack_protector.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: stack_protector.c,v 1.18 2015/11/10 04:14:03 guenther Exp $ */
+/* $OpenBSD: stack_protector.c,v 1.19 2015/11/10 04:30:59 guenther Exp $ */
/*
* Copyright (c) 2002 Hiroaki Etoh, Federico G. Schwindt, and Miodrag Vallat.
@@ -57,18 +57,17 @@ __stack_smash_handler(const char func[], int damaged)
/* Immediately block all signal handlers from running code */
sigfillset(&mask);
sigdelset(&mask, SIGABRT);
- sigprocmask(SIG_BLOCK, &mask, NULL);
+ sigprocmask(SIG_SETMASK, &mask, NULL);
- /* This may fail on a chroot jail... */
syslog_r(LOG_CRIT, &sdata, message, func);
- bzero(&sa, sizeof(struct sigaction));
+ memset(&sa, 0, sizeof(sa));
sigemptyset(&sa.sa_mask);
sa.sa_flags = 0;
sa.sa_handler = SIG_DFL;
sigaction(SIGABRT, &sa, NULL);
- kill(getpid(), SIGABRT);
+ thrkill(0, SIGABRT, NULL);
_exit(127);
}
diff --git a/lib/libc/sys/thrkill.2 b/lib/libc/sys/thrkill.2
new file mode 100644
index 00000000000..88fe1edebe7
--- /dev/null
+++ b/lib/libc/sys/thrkill.2
@@ -0,0 +1,105 @@
+.\" $OpenBSD: thrkill.2,v 1.1 2015/11/10 04:30:59 guenther Exp $
+.\" $NetBSD: kill.2,v 1.7 1995/02/27 12:33:53 cgd Exp $
+.\"
+.\" Copyright (c) 1980, 1991, 1993
+.\" The Regents of the University of California. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. Neither the name of the University nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" @(#)kill.2 8.3 (Berkeley) 4/19/94
+.\"
+.Dd $Mdocdate: November 10 2015 $
+.Dt THRKILL 2
+.Os
+.Sh NAME
+.Nm thrkill
+.Nd send signal to a thread in the same process
+.Sh SYNOPSIS
+.In signal.h
+.Ft int
+.Fn thrkill "pid_t tid" "int sig" "void *tcb"
+.Sh DESCRIPTION
+The
+.Fn thrkill
+function sends the signal given by
+.Fa sig
+to
+.Fa tid ,
+a thread in the same process as the caller.
+.Fn thrkill
+will only succeed if
+.Fa tcb
+is either
+.Dv NULL
+or the address of the thread control block (TCB) of the target thread.
+.Fa sig
+may be one of the signals specified in
+.Xr sigaction 2
+or it may be 0, in which case
+error checking is performed but no
+signal is actually sent.
+.Pp
+If
+.Fa tid
+is zero then the current thread is targeted.
+.Sh RETURN VALUES
+.Rv -std
+.Sh ERRORS
+.Fn thrkill
+will fail and no signal will be sent if:
+.Bl -tag -width Er
+.It Bq Er EINVAL
+.Fa sig
+is not a valid signal number.
+.It Bq Er ESRCH
+The process doesn't have a thread with thread ID
+.Fa tid .
+.It Bq Er ESRCH
+.Fa tcb
+is not
+.Dv NULL
+and not the TCB address of the thread with thread ID
+.Fa tid .
+.El
+.Sh SEE ALSO
+.Xr __get_tcb 2 ,
+.Xr kill 2 ,
+.Xr sigaction 2 ,
+.Xr pthread_kill 3 ,
+.Xr raise 3
+.Sh STANDARDS
+The
+.Fn __thrsigdivert
+function is specific to
+.Ox
+and should not be used in portable applications.
+Use
+.Xr pthread_kill 3
+instead.
+.Sh HISTORY
+The
+.Fn thrkill
+system call appeared in
+.Ox 5.9 .
diff --git a/lib/librthread/rthread.c b/lib/librthread/rthread.c
index 3d8f0e642cc..5a30a608fbb 100644
--- a/lib/librthread/rthread.c
+++ b/lib/librthread/rthread.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rthread.c,v 1.86 2015/11/01 03:52:17 guenther Exp $ */
+/* $OpenBSD: rthread.c,v 1.87 2015/11/10 04:30:59 guenther Exp $ */
/*
* Copyright (c) 2004,2005 Ted Unangst <tedu@openbsd.org>
* All Rights Reserved.
@@ -283,7 +283,7 @@ restart:
_rthread_debug(3, "rthread reaping %p stack %p\n",
(void *)thread, (void *)thread->stack);
_rthread_free_stack(thread->stack);
- _rtld_free_tls(thread->arg,
+ _rtld_free_tls(thread->tcb,
sizeof(struct thread_control_block), sizeof(void *));
free(thread);
goto restart;
@@ -320,11 +320,6 @@ pthread_exit(void *retval)
LIST_REMOVE(thread, threads);
_spinunlock(&_thread_lock);
-#ifdef TCB_GET
- thread->arg = TCB_GET();
-#else
- thread->arg = __get_tcb();
-#endif
_spinlock(&thread->flags_lock);
if (thread->flags & THREAD_DETACHED) {
_spinunlock(&thread->flags_lock);
@@ -440,6 +435,7 @@ pthread_create(pthread_t *threadp, const pthread_attr_t *attr,
goto fail2;
}
TCB_INIT(tcb, thread, &thread->myerrno);
+ thread->tcb = tcb;
param.tf_tcb = tcb;
param.tf_tid = &thread->tid;
@@ -475,27 +471,11 @@ fail1:
int
pthread_kill(pthread_t thread, int sig)
{
- pid_t tid;
- int ret;
-
- /* killing myself? do it without locking */
- if (thread == TCB_THREAD())
- return (kill(thread->tid, sig) == 0 ? 0 : errno);
-
- /* block the other thread from exiting */
- _spinlock(&thread->flags_lock);
- if (thread->flags & THREAD_DYING)
- ret = (thread->flags & THREAD_DETACHED) ? ESRCH : 0;
- else {
- tid = thread->tid;
- if (tid == 0) {
- /* should be impossible without DYING being set */
- ret = ESRCH;
- } else
- ret = kill(tid, sig) == 0 ? 0 : errno;
- }
- _spinunlock(&thread->flags_lock);
- return (ret);
+ if (sig == SIGTHR)
+ return (EINVAL);
+ if (_thread_sys_thrkill(thread->tid, sig, thread->tcb))
+ return (errno);
+ return (0);
}
int
@@ -516,15 +496,9 @@ pthread_cancel(pthread_t thread)
thread->flags |= THREAD_CANCELED;
if (thread->flags & THREAD_CANCEL_ENABLE) {
-
- /* canceling myself? release the lock first */
- if (thread == TCB_THREAD()) {
- _spinunlock(&thread->flags_lock);
- kill(tid, SIGTHR);
- return (0);
- }
-
- kill(tid, SIGTHR);
+ _spinunlock(&thread->flags_lock);
+ _thread_sys_thrkill(tid, SIGTHR, thread->tcb);
+ return (0);
}
}
_spinunlock(&thread->flags_lock);
diff --git a/lib/librthread/rthread.h b/lib/librthread/rthread.h
index 177f31db242..1a73d61e4e0 100644
--- a/lib/librthread/rthread.h
+++ b/lib/librthread/rthread.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: rthread.h,v 1.53 2015/10/18 08:02:58 guenther Exp $ */
+/* $OpenBSD: rthread.h,v 1.54 2015/11/10 04:30:59 guenther Exp $ */
/*
* Copyright (c) 2004,2005 Ted Unangst <tedu@openbsd.org>
* All Rights Reserved.
@@ -162,6 +162,7 @@ struct pthread {
pid_t tid;
unsigned int flags;
struct _spinlock flags_lock;
+ void *tcb;
void *retval;
void *(*fn)(void *);
void *arg;
@@ -241,4 +242,5 @@ int sched_yield(void);
int _thread_sys_sigaction(int, const struct sigaction *,
struct sigaction *);
int _thread_sys_sigprocmask(int, const sigset_t *, sigset_t *);
+int _thread_sys_thrkill(pid_t _tid, int _signum, void *_tcb);
diff --git a/lib/librthread/shlib_version b/lib/librthread/shlib_version
index a5757c1bcc6..dc34974a494 100644
--- a/lib/librthread/shlib_version
+++ b/lib/librthread/shlib_version
@@ -1,2 +1,2 @@
major=20
-minor=0
+minor=1
diff --git a/sys/kern/kern_pledge.c b/sys/kern/kern_pledge.c
index 0e4b320605d..219ab019f84 100644
--- a/sys/kern/kern_pledge.c
+++ b/sys/kern/kern_pledge.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_pledge.c,v 1.105 2015/11/05 15:10:11 semarie Exp $ */
+/* $OpenBSD: kern_pledge.c,v 1.106 2015/11/10 04:30:59 guenther Exp $ */
/*
* Copyright (c) 2015 Nicholas Marriott <nicm@openbsd.org>
@@ -74,6 +74,7 @@ const u_int pledge_syscalls[SYS_MAXSYSCALL] = {
[SYS___get_tcb] = PLEDGE_ALWAYS,
[SYS_pledge] = PLEDGE_ALWAYS,
[SYS_sendsyslog] = PLEDGE_ALWAYS, /* stack protector reporting */
+ [SYS_thrkill] = PLEDGE_ALWAYS, /* raise, abort, stack pro */
/* "getting" information about self is considered safe */
[SYS_getuid] = PLEDGE_STDIO,
@@ -190,6 +191,7 @@ const u_int pledge_syscalls[SYS_MAXSYSCALL] = {
* Can kill self with "stdio". Killing another pid
* requires "proc"
*/
+ [SYS_o58_kill] = PLEDGE_STDIO,
[SYS_kill] = PLEDGE_STDIO,
/*
@@ -1364,7 +1366,7 @@ pledge_kill(struct proc *p, pid_t pid)
return 0;
if (p->p_p->ps_pledge & PLEDGE_PROC)
return 0;
- if (pid == 0 || pid == p->p_p->ps_pid || pid > THREAD_PID_OFFSET)
+ if (pid == 0 || pid == p->p_p->ps_pid)
return 0;
return pledge_fail(p, EPERM, PLEDGE_PROC);
}
diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c
index 909db9fc3a9..731289bf14c 100644
--- a/sys/kern/kern_sig.c
+++ b/sys/kern/kern_sig.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_sig.c,v 1.189 2015/11/02 16:31:55 semarie Exp $ */
+/* $OpenBSD: kern_sig.c,v 1.190 2015/11/10 04:30:59 guenther Exp $ */
/* $NetBSD: kern_sig.c,v 1.54 1996/04/22 01:38:32 christos Exp $ */
/*
@@ -69,6 +69,10 @@
#include <uvm/uvm_extern.h>
+#ifdef __HAVE_MD_TCB
+# include <machine/tcb.h>
+#endif
+
int filt_sigattach(struct knote *kn);
void filt_sigdetach(struct knote *kn);
int filt_signal(struct knote *kn, long hint);
@@ -558,11 +562,10 @@ sys_sigaltstack(struct proc *p, void *v, register_t *retval)
return (0);
}
-/* ARGSUSED */
int
-sys_kill(struct proc *cp, void *v, register_t *retval)
+sys_o58_kill(struct proc *cp, void *v, register_t *retval)
{
- struct sys_kill_args /* {
+ struct sys_o58_kill_args /* {
syscallarg(int) pid;
syscallarg(int) signum;
} */ *uap = v;
@@ -571,7 +574,7 @@ sys_kill(struct proc *cp, void *v, register_t *retval)
int signum = SCARG(uap, signum);
int error;
- if ((error = pledge_kill(cp, pid)) != 0)
+ if (pid <= THREAD_PID_OFFSET && (error = pledge_kill(cp, pid)) != 0)
return (error);
if (((u_int)signum) >= NSIG)
return (EINVAL);
@@ -616,6 +619,80 @@ sys_kill(struct proc *cp, void *v, register_t *retval)
/* NOTREACHED */
}
+int
+sys_kill(struct proc *cp, void *v, register_t *retval)
+{
+ struct sys_kill_args /* {
+ syscallarg(int) pid;
+ syscallarg(int) signum;
+ } */ *uap = v;
+ struct process *pr;
+ int pid = SCARG(uap, pid);
+ int signum = SCARG(uap, signum);
+ int error;
+
+ if ((error = pledge_kill(cp, pid)) != 0)
+ return (error);
+ if (((u_int)signum) >= NSIG)
+ return (EINVAL);
+ if (pid > 0) {
+ if ((pr = prfind(pid)) == NULL)
+ return (ESRCH);
+ if (!cansignal(cp, pr, signum))
+ return (EPERM);
+
+ /* kill single process */
+ if (signum)
+ prsignal(pr, signum);
+ return (0);
+ }
+ switch (pid) {
+ case -1: /* broadcast signal */
+ return (killpg1(cp, signum, 0, 1));
+ case 0: /* signal own process group */
+ return (killpg1(cp, signum, 0, 0));
+ default: /* negative explicit process group */
+ return (killpg1(cp, signum, -pid, 0));
+ }
+}
+
+int
+sys_thrkill(struct proc *cp, void *v, register_t *retval)
+{
+ struct sys_thrkill_args /* {
+ syscallarg(pid_t) tid;
+ syscallarg(int) signum;
+ syscallarg(void *) tcb;
+ } */ *uap = v;
+ struct proc *p;
+ int tid = SCARG(uap, tid);
+ int signum = SCARG(uap, signum);
+ void *tcb;
+
+ if (((u_int)signum) >= NSIG)
+ return (EINVAL);
+ if (tid > THREAD_PID_OFFSET) {
+ if ((p = pfind(tid - THREAD_PID_OFFSET)) == NULL)
+ return (ESRCH);
+
+ /* can only kill threads in the same process */
+ if (p->p_p != cp->p_p)
+ return (ESRCH);
+ } else if (tid == 0)
+ p = cp;
+ else
+ return (EINVAL);
+
+ /* optionally require the target thread to have the given tcb addr */
+ tcb = SCARG(uap, tcb);
+ if (tcb != NULL && tcb != TCB_GET(p))
+ return (ESRCH);
+
+ if (signum)
+ ptsignal(p, signum, STHREAD);
+ return (0);
+}
+
/*
* Common code for kill process group/broadcast kill.
* cp is calling process.
diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master
index b34435f75ad..ce32ac09713 100644
--- a/sys/kern/syscalls.master
+++ b/sys/kern/syscalls.master
@@ -1,4 +1,4 @@
-; $OpenBSD: syscalls.master,v 1.164 2015/10/28 12:03:39 deraadt Exp $
+; $OpenBSD: syscalls.master,v 1.165 2015/11/10 04:30:59 guenther Exp $
; $NetBSD: syscalls.master,v 1.32 1996/04/23 10:24:21 mycroft Exp $
; @(#)syscalls.master 8.2 (Berkeley) 1/13/94
@@ -104,7 +104,7 @@
34 STD { int sys_chflags(const char *path, u_int flags); }
35 STD { int sys_fchflags(int fd, u_int flags); }
36 STD { void sys_sync(void); }
-37 STD { int sys_kill(int pid, int signum); }
+37 STD { int sys_o58_kill(int pid, int signum); }
38 STD { int sys_stat(const char *path, struct stat *ub); }
39 STD { pid_t sys_getppid(void); }
40 STD { int sys_lstat(const char *path, struct stat *ub); }
@@ -241,12 +241,12 @@
117 OBSOL t32_getrusage
118 STD { int sys_getsockopt(int s, int level, int name, \
void *val, socklen_t *avalsize); }
-119 OBSOL resuba
+119 STD { int sys_thrkill(pid_t tid, int signum, void *tcb); }
120 STD { ssize_t sys_readv(int fd, \
const struct iovec *iovp, int iovcnt); }
121 STD { ssize_t sys_writev(int fd, \
const struct iovec *iovp, int iovcnt); }
-122 OBSOL t32_settimeofday
+122 STD { int sys_kill(int pid, int signum); }
123 STD { int sys_fchown(int fd, uid_t uid, gid_t gid); }
124 STD { int sys_fchmod(int fd, mode_t mode); }
125 OBSOL orecvfrom
diff --git a/usr.bin/kdump/kdump.c b/usr.bin/kdump/kdump.c
index 0f6d1ce967b..485a59637a0 100644
--- a/usr.bin/kdump/kdump.c
+++ b/usr.bin/kdump/kdump.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kdump.c,v 1.119 2015/10/28 16:03:06 deraadt Exp $ */
+/* $OpenBSD: kdump.c,v 1.120 2015/11/10 04:30:59 guenther Exp $ */
/*-
* Copyright (c) 1988, 1993
@@ -822,6 +822,7 @@ static const formatter scargs[][8] = {
[SYS_pselect] = { Pcount, Pptr, Pptr, Pptr, Pptr, Pptr },
[SYS_sigsuspend] = { Sigset },
[SYS_getsockopt] = { Pfd, PASS_TWO, Sockoptlevelname, Pptr, Pptr },
+ [SYS_thrkill] = { Ppid_t, Signame, Pptr },
[SYS_readv] = { Pfd, Pptr, Pcount },
[SYS_writev] = { Pfd, Pptr, Pcount },
[SYS_fchown] = { Pfd, Uidname, Gidname },