diff options
author | Philip Guenther <guenther@cvs.openbsd.org> | 2015-07-28 05:50:42 +0000 |
---|---|---|
committer | Philip Guenther <guenther@cvs.openbsd.org> | 2015-07-28 05:50:42 +0000 |
commit | c67cae83f2d2195755c878f06167e62029d2a77f (patch) | |
tree | 833656cb8e5b61190028d305b8a5f6d8fbce5507 /sys/kern/sys_generic.c | |
parent | de3cec76aeca2ff758e9d4bfea9a37dd66130bb1 (diff) |
Add ktracing of structs iovec, msghdr, and cmsghdr for {,p}{read,write}v(),
sendmsg(), and recvmsg(). For cmsghdr, the len, level, and type are always
shown, and for SOL_SOCKET,SCM_RIGHTS the fd numbers being passed are shown.
ok millert@ deraadt@
Diffstat (limited to 'sys/kern/sys_generic.c')
-rw-r--r-- | sys/kern/sys_generic.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/kern/sys_generic.c b/sys/kern/sys_generic.c index b6752bb5c40..d1c89d52c98 100644 --- a/sys/kern/sys_generic.c +++ b/sys/kern/sys_generic.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sys_generic.c,v 1.99 2015/07/19 02:35:35 deraadt Exp $ */ +/* $OpenBSD: sys_generic.c,v 1.100 2015/07/28 05:50:41 guenther Exp $ */ /* $NetBSD: sys_generic.c,v 1.24 1996/03/29 00:25:32 cgd Exp $ */ /* @@ -161,6 +161,10 @@ dofilereadv(struct proc *p, int fd, struct file *fp, const struct iovec *iovp, } if ((error = copyin(iovp, iov, iovlen))) goto done; +#ifdef KTRACE + if (KTRPOINT(p, KTR_STRUCT)) + ktriovec(p, iov, iovcnt); +#endif } else { iov = (struct iovec *)iovp; /* de-constify */ } @@ -309,6 +313,10 @@ dofilewritev(struct proc *p, int fd, struct file *fp, const struct iovec *iovp, } if ((error = copyin(iovp, iov, iovlen))) goto done; +#ifdef KTRACE + if (KTRPOINT(p, KTR_STRUCT)) + ktriovec(p, iov, iovcnt); +#endif } else { iov = (struct iovec *)iovp; /* de-constify */ } |