From nobody Wed Nov 11 09:58:16 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jPf955V0Gz6yy4L for ; Wed, 11 Nov 2026 09:58:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jPf950Kgmz4kgg for ; Wed, 11 Nov 2026 09:58:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794391097; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/5fFxNv7VfC2bzxJTbdlx8fLDyDlMMgx4jUAJq6Mwpg=; b=JktCoPLiSVcLFE3X8HxH156peF00vLtUWY5WLfwWaH4W09AYhg32/mQGYKKn9KKBL9rkBE bxwbfaGmNHnSAN+bulkYLQ3UbtmI6kMqBGgRxc7AU5lszXtzqW1J6Ifukv2YPxGoevmsiC qxc3PEij53ZOTxSQLtD7tozxOc4ulFkUVSRaFdlRJNLYDKNaYbvCd1WvCHXHTHteEyoC5H 2Au7D24sD6YPjNqgRdfqpVGT1ZSwXf6ajqPYuJKanb72qDKqWCc0/TpnGwFD5qI0pIokxt MmOevoZpJXgKPpmLqiNb83eY1yV/3bATU6uVQWacR7i8IfwJBfK1+JSnzhnQdw== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1794391097; b=baz7X3lIOWjFlcnc+uakXKy4fPxt3spMsJ17553YP7UHg2RSDytIEoL/AnZts7bLFM0y7K fEsZgd2moNNfsPh2acxlRrLfbTFTd5gjwjDjKMxnBfD7Z85IWSfmPCu/3G64/hF1smZnGn ljSaQWOwNXF0ln+3ZBQJlhP0VNKhygNuD6MXWjimhelkXRGgkTixB+IMXCL93ggo9EyoSs nvInhraQkFq8LAbX1kX1QkyJsCXbKiU8cSRnPDHEjIhf0PePNVIA0ecCXljcdj0RqrxB/U OCZp2iZAQnmBNGPO5v1HMWb1fdcBYZmr2wjrqpnzo0baoUr5XaX+I8jPaXC5ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794391097; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/5fFxNv7VfC2bzxJTbdlx8fLDyDlMMgx4jUAJq6Mwpg=; b=DT2kq9JDcJiJowZwvqYAZKQ9sciuleCWj6Mu+krwhKE+u9ZlyJa+mYPsoeKWyMuxpxjl4E OoeLOQL9zqnyc1kqY9jOJv9Y4AwI15kl28XioZorq8F9Lwe1gsqwcm+SKde10d5FHjXVmN bQSj9IXELkhGtzF7uU6BzgcbnwkTF/+c8V+Rdk6c0R9npbHeoe9uzgsqAZagRkoULxrc+d nS+M9fR8MsIAomLfZCAg60H3/uZc20U9u/355+22UiuETfCzVcTJoaTjXYOepf6mX8bI2y Im232kuB/z7aw/ILHdHgeytHTApmXhPGOBR3n8cc9wCkUIfkbxofAHDmMXe0/g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jPf94717rz184f for ; Wed, 11 Nov 2026 09:58:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 12a43 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 11 Nov 2026 09:58:16 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 9acec4c86370 - main - sys_generic.c: add kern_ and user_ implementations List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all X-BeenThere: dev-commits-src-all@freebsd.org List-Id: Commit messages for all branches of the src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9acec4c863702ea4c3713dbde60dc57542133e5c Auto-Submitted: auto-generated Date: Wed, 11 Nov 2026 09:58:16 +0000 Message-Id: <6af43c38.12a43.51814b99@gitrepo.freebsd.org> The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=9acec4c863702ea4c3713dbde60dc57542133e5c commit 9acec4c863702ea4c3713dbde60dc57542133e5c Author: Brooks Davis AuthorDate: 2026-11-11 09:40:41 +0000 Commit: Brooks Davis CommitDate: 2026-11-11 09:40:41 +0000 sys_generic.c: add kern_ and user_ implementations Effort: CHERI upstreaming Sponsored by: Innovate UK Pull Request: https://github.com/freebsd/freebsd-src/pull/2284 --- sys/kern/sys_generic.c | 210 ++++++++++++++++++++++++++++++++++--------------- sys/sys/syscallsubr.h | 25 ++++++ 2 files changed, 173 insertions(+), 62 deletions(-) diff --git a/sys/kern/sys_generic.c b/sys/kern/sys_generic.c index 5d356a26359b..a3b27f9a8e21 100644 --- a/sys/kern/sys_generic.c +++ b/sys/kern/sys_generic.c @@ -194,20 +194,26 @@ struct read_args { #endif int sys_read(struct thread *td, struct read_args *uap) +{ + return (user_read(td, uap->fd, uap->buf, uap->nbyte)); +} + +int +user_read(struct thread *td, int fd, void *buf, size_t nbyte) { struct uio auio; struct iovec aiov; int error; - if (uap->nbyte > IOSIZE_MAX) + if (nbyte > IOSIZE_MAX) return (EXTERROR(EINVAL, "length > iosize_max")); - aiov.iov_base = uap->buf; - aiov.iov_len = uap->nbyte; + aiov.iov_base = buf; + aiov.iov_len = nbyte; auio.uio_iov = &aiov; auio.uio_iovcnt = 1; - auio.uio_resid = uap->nbyte; + auio.uio_resid = nbyte; auio.uio_segflg = UIO_USERSPACE; - error = kern_readv(td, uap->fd, &auio); + error = kern_readv(td, fd, &auio); return (error); } @@ -226,7 +232,6 @@ struct pread_args { int sys_pread(struct thread *td, struct pread_args *uap) { - return (kern_pread(td, uap->fd, uap->buf, uap->nbyte, uap->offset)); } @@ -270,14 +275,21 @@ struct readv_args { #endif int sys_readv(struct thread *td, struct readv_args *uap) +{ + return (user_readv(td, uap->fd, uap->iovp, uap->iovcnt, copyinuio)); +} + +int +user_readv(struct thread *td, int fd, const struct iovec *iovp, u_int iovcnt, + copyinuio_t *copyinuio_f) { struct uio *auio; int error; - error = copyinuio(uap->iovp, uap->iovcnt, &auio); + error = copyinuio_f(iovp, iovcnt, &auio); if (error) return (error); - error = kern_readv(td, uap->fd, auio); + error = kern_readv(td, fd, auio); freeuio(auio); return (error); } @@ -309,14 +321,22 @@ struct preadv_args { #endif int sys_preadv(struct thread *td, struct preadv_args *uap) +{ + return (user_preadv(td, uap->fd, uap->iovp, uap->iovcnt, uap->offset, + copyinuio)); +} + +int +user_preadv(struct thread *td, int fd, struct iovec *iovp, u_int iovcnt, + off_t offset, copyinuio_t *copyinuio_f) { struct uio *auio; int error; - error = copyinuio(uap->iovp, uap->iovcnt, &auio); + error = copyinuio_f(iovp, iovcnt, &auio); if (error) return (error); - error = kern_preadv(td, uap->fd, auio, uap->offset); + error = kern_preadv(td, fd, auio, offset); freeuio(auio); return (error); } @@ -395,20 +415,26 @@ struct write_args { #endif int sys_write(struct thread *td, struct write_args *uap) +{ + return (kern_write(td, uap->fd, uap->buf, uap->nbyte)); +} + +int +kern_write(struct thread *td, int fd, const void *buf, size_t nbyte) { struct uio auio; struct iovec aiov; int error; - if (uap->nbyte > IOSIZE_MAX) + if (nbyte > IOSIZE_MAX) return (EXTERROR(EINVAL, "length > iosize_max")); - aiov.iov_base = (void *)(uintptr_t)uap->buf; - aiov.iov_len = uap->nbyte; + aiov.iov_base = (void *)(uintptr_t)buf; + aiov.iov_len = nbyte; auio.uio_iov = &aiov; auio.uio_iovcnt = 1; - auio.uio_resid = uap->nbyte; + auio.uio_resid = nbyte; auio.uio_segflg = UIO_USERSPACE; - error = kern_writev(td, uap->fd, &auio); + error = kern_writev(td, fd, &auio); return (error); } @@ -427,7 +453,6 @@ struct pwrite_args { int sys_pwrite(struct thread *td, struct pwrite_args *uap) { - return (kern_pwrite(td, uap->fd, uap->buf, uap->nbyte, uap->offset)); } @@ -472,14 +497,21 @@ struct writev_args { #endif int sys_writev(struct thread *td, struct writev_args *uap) +{ + return (user_writev(td, uap->fd, uap->iovp, uap->iovcnt, copyinuio)); +} + +int +user_writev(struct thread *td, int fd, const struct iovec *iovp, u_int iovcnt, + copyinuio_t *copyinuio_f) { struct uio *auio; int error; - error = copyinuio(uap->iovp, uap->iovcnt, &auio); + error = copyinuio_f(iovp, iovcnt, &auio); if (error) return (error); - error = kern_writev(td, uap->fd, auio); + error = kern_writev(td, fd, auio); freeuio(auio); return (error); } @@ -511,14 +543,22 @@ struct pwritev_args { #endif int sys_pwritev(struct thread *td, struct pwritev_args *uap) +{ + return (user_pwritev(td, uap->fd, uap->iovp, uap->iovcnt, uap->offset, + copyinuio)); +} + +int +user_pwritev(struct thread *td, int fd, struct iovec *iovp, u_int iovcnt, + off_t offset, copyinuio_t *copyinuio_f) { struct uio *auio; int error; - error = copyinuio(uap->iovp, uap->iovcnt, &auio); + error = copyinuio_f(iovp, iovcnt, &auio); if (error) return (error); - error = kern_pwritev(td, uap->fd, auio, uap->offset); + error = kern_pwritev(td, fd, auio, offset); freeuio(auio); return (error); } @@ -650,7 +690,6 @@ struct ftruncate_args { int sys_ftruncate(struct thread *td, struct ftruncate_args *uap) { - return (kern_ftruncate(td, uap->fd, uap->length)); } @@ -679,6 +718,12 @@ struct ioctl_args { /* ARGSUSED */ int sys_ioctl(struct thread *td, struct ioctl_args *uap) +{ + return (user_ioctl(td, uap->fd, uap->com, uap->data, &uap->data)); +} + +int +user_ioctl(struct thread *td, int fd, u_long ucom, void *udata, void *datap) { u_char smalldata[SYS_IOCTL_SMALL_SIZE] __aligned(SYS_IOCTL_SMALL_ALIGN); uint32_t com; @@ -687,14 +732,14 @@ sys_ioctl(struct thread *td, struct ioctl_args *uap) caddr_t data; #ifdef INVARIANTS - if (uap->com > 0xffffffff) { + if (ucom > 0xffffffff) { printf( "WARNING pid %d (%s): ioctl sign-extension ioctl %lx\n", - td->td_proc->p_pid, td->td_name, uap->com); + td->td_proc->p_pid, td->td_name, ucom); } #endif - com = (uint32_t)uap->com; + com = (uint32_t)ucom; /* * Interpret high order word to find amount of data to be * copied to/from the user's address space. @@ -713,7 +758,7 @@ sys_ioctl(struct thread *td, struct ioctl_args *uap) if (size > 0) { if (com & IOC_VOID) { /* Integer argument. */ - arg = (intptr_t)uap->data; + arg = (intptr_t)udata; data = (void *)&arg; size = 0; } else { @@ -723,9 +768,9 @@ sys_ioctl(struct thread *td, struct ioctl_args *uap) data = smalldata; } } else - data = (void *)&uap->data; + data = datap; if (com & IOC_IN) { - error = copyin(uap->data, data, (u_int)size); + error = copyin(udata, data, size); if (error != 0) goto out; } else if (com & IOC_OUT) { @@ -736,10 +781,10 @@ sys_ioctl(struct thread *td, struct ioctl_args *uap) bzero(data, size); } - error = kern_ioctl(td, uap->fd, com, data); + error = kern_ioctl(td, fd, com, data); if (error == 0 && (com & IOC_OUT)) - error = copyout(data, uap->data, (u_int)size); + error = copyout(data, udata, (u_int)size); out: if (size > SYS_IOCTL_SMALL_SIZE) @@ -899,18 +944,27 @@ kern_posix_fallocate(struct thread *td, int fd, off_t offset, off_t len) int sys_fspacectl(struct thread *td, struct fspacectl_args *uap) +{ + return (user_fspacectl(td, uap->fd, uap->cmd, uap->rqsr, uap->flags, + uap->rmsr)); +} + +int +user_fspacectl(struct thread *td, int fd, int cmd, + const struct spacectl_range *rqsrp, int flags, + struct spacectl_range *rmsrp) { struct spacectl_range rqsr, rmsr; int error, cerror; - error = copyin(uap->rqsr, &rqsr, sizeof(rqsr)); + error = copyin(rqsrp, &rqsr, sizeof(rqsr)); if (error != 0) return (error); - error = kern_fspacectl(td, uap->fd, uap->cmd, &rqsr, uap->flags, + error = kern_fspacectl(td, fd, cmd, &rqsr, flags, &rmsr); - if (uap->rmsr != NULL) { - cerror = copyout(&rmsr, uap->rmsr, sizeof(rmsr)); + if (rmsrp != NULL) { + cerror = copyout(&rmsr, rmsrp, sizeof(rmsr)); if (error == 0) error = cerror; } @@ -1014,19 +1068,25 @@ kern_specialfd(struct thread *td, int type, void *arg) } int -sys___specialfd(struct thread *td, struct __specialfd_args *args) +sys___specialfd(struct thread *td, struct __specialfd_args *uap) +{ + return (user___specialfd(td, uap->type, uap->req, uap->len)); +} + +int +user___specialfd(struct thread *td, int type, const void *req, size_t len) { int error; - switch (args->type) { + switch (type) { case SPECIALFD_EVENTFD: { struct specialfd_eventfd ae; - if (args->len != sizeof(struct specialfd_eventfd)) { + if (len != sizeof(struct specialfd_eventfd)) { error = EXTERROR(EINVAL, "eventfd params ABI"); break; } - error = copyin(args->req, &ae, sizeof(ae)); + error = copyin(req, &ae, sizeof(ae)); if (error != 0) break; if ((ae.flags & ~(EFD_CLOEXEC | EFD_NONBLOCK | @@ -1034,24 +1094,24 @@ sys___specialfd(struct thread *td, struct __specialfd_args *args) error = EXTERROR(EINVAL, "reserved flag"); break; } - error = kern_specialfd(td, args->type, &ae); + error = kern_specialfd(td, type, &ae); break; } case SPECIALFD_INOTIFY: { struct specialfd_inotify si; - if (args->len != sizeof(si)) { + if (len != sizeof(si)) { error = EINVAL; break; } - error = copyin(args->req, &si, sizeof(si)); + error = copyin(req, &si, sizeof(si)); if (error != 0) break; - error = kern_specialfd(td, args->type, &si); + error = kern_specialfd(td, type, &si); break; } default: - error = EXTERROR(EINVAL, "unknown type", args->type); + error = EXTERROR(EINVAL, "unknown type", type); break; } return (error); @@ -1075,29 +1135,36 @@ poll_no_poll(int events) int sys_pselect(struct thread *td, struct pselect_args *uap) +{ + return (user_pselect(td, uap->nd, uap->in, uap->ou, uap->ex, uap->ts, + uap->sm)); +} + +int +user_pselect(struct thread *td, int nd, fd_set *in, fd_set *ou, fd_set *ex, + const struct timespec *uts, const sigset_t *sm) { struct timespec ts; struct timeval tv, *tvp; sigset_t set, *uset; int error; - if (uap->ts != NULL) { - error = copyin(uap->ts, &ts, sizeof(ts)); + if (uts != NULL) { + error = copyin(uts, &ts, sizeof(ts)); if (error != 0) return (error); TIMESPEC_TO_TIMEVAL(&tv, &ts); tvp = &tv; } else tvp = NULL; - if (uap->sm != NULL) { - error = copyin(uap->sm, &set, sizeof(set)); + if (sm != NULL) { + error = copyin(sm, &set, sizeof(set)); if (error != 0) return (error); uset = &set; } else uset = NULL; - return (kern_pselect(td, uap->nd, uap->in, uap->ou, uap->ex, tvp, - uset, NFDBITS)); + return (kern_pselect(td, nd, in, ou, ex, tvp, uset, NFDBITS)); } int @@ -1144,20 +1211,26 @@ struct select_args { #endif int sys_select(struct thread *td, struct select_args *uap) +{ + return (user_select(td, uap->nd, uap->in, uap->ou, uap->ex, uap->tv)); +} + +int +user_select(struct thread *td, int nd, fd_set *in, fd_set *ou, fd_set *ex, + struct timeval *utv) { struct timeval tv, *tvp; int error; - if (uap->tv != NULL) { - error = copyin(uap->tv, &tv, sizeof(tv)); + if (utv != NULL) { + error = copyin(utv, &tv, sizeof(tv)); if (error) return (error); tvp = &tv; } else tvp = NULL; - return (kern_select(td, uap->nd, uap->in, uap->ou, uap->ex, tvp, - NFDBITS)); + return (kern_select(td, nd, in, ou, ex, tvp, NFDBITS)); } /* @@ -1547,19 +1620,25 @@ selscan(struct thread *td, fd_mask **ibits, fd_mask **obits, int nfd) int sys_poll(struct thread *td, struct poll_args *uap) +{ + return (user_poll(td, uap->fds, uap->nfds, uap->timeout)); +} + +int +user_poll(struct thread *td, struct pollfd *fds, u_int nfds, int timeout) { struct timespec ts, *tsp; - if (uap->timeout != INFTIM) { - if (uap->timeout < 0) + if (timeout != INFTIM) { + if (timeout < 0) return (EXTERROR(EINVAL, "invalid timeout")); - ts.tv_sec = uap->timeout / 1000; - ts.tv_nsec = (uap->timeout % 1000) * 1000000; + ts.tv_sec = timeout / 1000; + ts.tv_nsec = (timeout % 1000) * 1000000; tsp = &ts; } else tsp = NULL; - return (kern_poll(td, uap->fds, uap->nfds, tsp, NULL)); + return (kern_poll(td, fds, nfds, tsp, NULL)); } /* @@ -1646,26 +1725,33 @@ kern_poll_kfds(struct thread *td, struct pollfd *kfds, u_int nfds, int sys_ppoll(struct thread *td, struct ppoll_args *uap) +{ + return (user_ppoll(td, uap->fds, uap->nfds, uap->ts, uap->set)); +} + +int +user_ppoll(struct thread *td, struct pollfd *fds, u_int nfds, + const struct timespec *uts, const sigset_t *uset) { struct timespec ts, *tsp; sigset_t set, *ssp; int error; - if (uap->ts != NULL) { - error = copyin(uap->ts, &ts, sizeof(ts)); + if (uts != NULL) { + error = copyin(uts, &ts, sizeof(ts)); if (error) return (error); tsp = &ts; } else tsp = NULL; - if (uap->set != NULL) { - error = copyin(uap->set, &set, sizeof(set)); + if (uset != NULL) { + error = copyin(uset, &set, sizeof(set)); if (error) return (error); ssp = &set; } else ssp = NULL; - return (kern_poll(td, uap->fds, uap->nfds, tsp, ssp)); + return (kern_poll(td, fds, nfds, tsp, ssp)); } /* diff --git a/sys/sys/syscallsubr.h b/sys/sys/syscallsubr.h index 37093ffb7bd4..f2ef85b9b9a5 100644 --- a/sys/sys/syscallsubr.h +++ b/sys/sys/syscallsubr.h @@ -534,11 +534,14 @@ int kern_wait4(struct thread *td, int pid, int *statusp, int options, struct rusage *rusage); int kern_wait6(struct thread *td, enum idtype idtype, id_t id, int *status, int options, struct __wrusage *wrup, siginfo_t *sip); +int kern_write(struct thread *td, int fd, const void *buf, size_t nbyte); int kern_writev(struct thread *td, int fd, struct uio *auio); int kern_socketpair(struct thread *td, int domain, int type, int protocol, int *rsv); int kern_unmount(struct thread *td, const char *path, uint64_t flags); +int user___specialfd(struct thread *td, int type, const void *req, + size_t len); int user_cap_ioctls_limit(struct thread *td, int fd, const u_long *ucmds, size_t ncmds); int user_cap_rights_limit(struct thread *td, int fd, cap_rights_t *rightsp); @@ -551,15 +554,33 @@ int user_cpuset_getaffinity(struct thread *td, cpulevel_t level, int user_cpuset_setaffinity(struct thread *td, cpulevel_t level, cpuwhich_t which, id_t id, size_t cpusetsize, const cpuset_t *maskp, const struct cpuset_copy_cb *cb); +int user_fspacectl(struct thread *td, int fd, int cmd, + const struct spacectl_range *rqsrp, int flags, + struct spacectl_range *rmsrp); int user_fstat(struct thread *td, int fd, struct stat *sb); int user_getrlimitusage(struct thread *td, u_int which, int flags, rlim_t *ures); +int user_ioctl(struct thread *td, int fd, u_long ucom, void *udata, + void *datap); int user_jail_get(struct thread *td, struct iovec *iovp, unsigned int iovcnt, int flags, copyinuio_t *copyinuio_f, updateiov_t *updateiov_f); int user_jail_set(struct thread *td, struct iovec *iovp, unsigned int iovcnt, int flags, copyinuio_t *copyinuio_f); int user_kldload(struct thread *td, const char *file); +int user_poll(struct thread *td, struct pollfd *fds, u_int nfds, + int timeout); +int user_ppoll(struct thread *td, struct pollfd *fds, u_int nfds, + const struct timespec *uts, const sigset_t *uset); +int user_preadv(struct thread *td, int fd, struct iovec *iovp, + u_int iovcnt, off_t offset, copyinuio_t *copyinuio_f); +int user_pselect(struct thread *td, int nd, fd_set *in, fd_set *ou, + fd_set *ex, const struct timespec *uts, const sigset_t *sm); +int user_pwritev(struct thread *td, int fd, struct iovec *iovp, + u_int iovcnt, off_t offset, copyinuio_t *copyinuio_f); +int user_read(struct thread *td, int fd, void *buf, size_t nbyte); +int user_readv(struct thread *td, int fd, const struct iovec *iovp, + u_int iovcnt, copyinuio_t *copyinuio_f); int user_sched_getparam(struct thread *td, pid_t pid, struct sched_param *param); int user_sched_rr_get_interval(struct thread *td, pid_t pid, @@ -568,6 +589,8 @@ int user_sched_setparam(struct thread *td, pid_t pid, const struct sched_param *param); int user_sched_setscheduler(struct thread *td, pid_t pid, int policy, const struct sched_param *param); +int user_select(struct thread *td, int nd, fd_set *in, fd_set *ou, + fd_set *ex, struct timeval *utv); int user_setgroups(struct thread *td, int gidsetsize, const gid_t *gidset); int user_settimeofday(struct thread *td, const struct timeval *tv, const struct timezone *tz); @@ -584,6 +607,8 @@ int user_uuidgen(struct thread *td, struct uuid *ustore, int count); int user_wait6(struct thread *td, enum idtype idtype, id_t id, int *statusp, int options, struct __wrusage *wrusage, siginfo_t *sip); +int user_writev(struct thread *td, int fd, const struct iovec *iovp, + u_int iovcnt, copyinuio_t *copyinuio_f); /* flags for kern_sigaction */ #define KSA_OSIGSET 0x0001 /* uses osigact_t */