summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2017-04-20 15:21:54 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2017-04-20 15:21:54 +0000
commit27531f41f227ac23ae1cc8c633b5824f3bfb1d6d (patch)
tree1e197747dccb817927b048a9208102ed226cdd7d /sys
parent8e24143715a3a3d9357dfb5e0c6a3b3f9c6bc04d (diff)
only 32 bits of the pledgecode were passed up via ktrace
from Anton Lindqvist ok semarie
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/kern_pledge.c4
-rw-r--r--sys/sys/ktrace.h8
-rw-r--r--sys/sys/pledge.h4
-rw-r--r--sys/sys/syscall_mi.h5
4 files changed, 11 insertions, 10 deletions
diff --git a/sys/kern/kern_pledge.c b/sys/kern/kern_pledge.c
index b1c5bbcfe13..d99a60d2a1e 100644
--- a/sys/kern/kern_pledge.c
+++ b/sys/kern/kern_pledge.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_pledge.c,v 1.204 2017/04/17 20:22:14 deraadt Exp $ */
+/* $OpenBSD: kern_pledge.c,v 1.205 2017/04/20 15:21:53 deraadt Exp $ */
/*
* Copyright (c) 2015 Nicholas Marriott <nicm@openbsd.org>
@@ -545,7 +545,7 @@ sys_pledge(struct proc *p, void *v, register_t *retval)
}
int
-pledge_syscall(struct proc *p, int code, int *tval)
+pledge_syscall(struct proc *p, int code, uint64_t *tval)
{
p->p_pledge_syscall = code;
*tval = 0;
diff --git a/sys/sys/ktrace.h b/sys/sys/ktrace.h
index c6c7ec5c763..cf47809242c 100644
--- a/sys/sys/ktrace.h
+++ b/sys/sys/ktrace.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ktrace.h,v 1.33 2016/10/08 02:16:43 guenther Exp $ */
+/* $OpenBSD: ktrace.h,v 1.34 2017/04/20 15:21:51 deraadt Exp $ */
/* $NetBSD: ktrace.h,v 1.12 1996/02/04 02:12:29 christos Exp $ */
/*
@@ -158,9 +158,9 @@ struct ktr_user {
*/
#define KTR_PLEDGE 12
struct ktr_pledge {
- int error;
- int syscall;
- int64_t code;
+ int error;
+ int syscall;
+ uint64_t code;
};
/*
diff --git a/sys/sys/pledge.h b/sys/sys/pledge.h
index ca815f316e1..8ced3ae3cb0 100644
--- a/sys/sys/pledge.h
+++ b/sys/sys/pledge.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pledge.h,v 1.30 2017/01/23 04:25:05 deraadt Exp $ */
+/* $OpenBSD: pledge.h,v 1.31 2017/04/20 15:21:51 deraadt Exp $ */
/*
* Copyright (c) 2015 Nicholas Marriott <nicm@openbsd.org>
@@ -111,7 +111,7 @@ static struct {
#ifdef _KERNEL
-int pledge_syscall(struct proc *, int, int *);
+int pledge_syscall(struct proc *, int, uint64_t *);
int pledge_fail(struct proc *, int, uint64_t);
struct mbuf;
diff --git a/sys/sys/syscall_mi.h b/sys/sys/syscall_mi.h
index 24521bdaa2f..bf0a0fff6a6 100644
--- a/sys/sys/syscall_mi.h
+++ b/sys/sys/syscall_mi.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: syscall_mi.h,v 1.17 2017/02/14 10:31:15 mpi Exp $ */
+/* $OpenBSD: syscall_mi.h,v 1.18 2017/04/20 15:21:51 deraadt Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1993
@@ -45,8 +45,9 @@ static inline int
mi_syscall(struct proc *p, register_t code, const struct sysent *callp,
register_t *argp, register_t retval[2])
{
+ uint64_t tval;
int lock = !(callp->sy_flags & SY_NOLOCK);
- int error, pledged, tval;
+ int error, pledged;
/* refresh the thread's cache of the process's creds */
refreshcreds(p);