Date: Wed, 12 Dec 2012 21:16:53 GMT From: Brooks Davis <brooks@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 219899 for review Message-ID: <201212122116.qBCLGrPp005448@skunkworks.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/@@219899?ac=10 Change 219899 by brooks@brooks_zenith on 2012/12/12 21:16:50 We can't currently copyout to sandboxes due to the use of the wrong CP0 by the kernel so alter the code to return the counter directly. The caller needs to know that the return is actually unsigned. Fortunatly, this can't fail so not having an error indicator is fine. Affected files ... .. //depot/projects/ctsrd/cheribsd/src/sys/mips/mips/sys_machdep.c#4 edit Differences ... ==== //depot/projects/ctsrd/cheribsd/src/sys/mips/mips/sys_machdep.c#4 (text+ko) ==== @@ -56,7 +56,6 @@ sysarch(struct thread *td, struct sysarch_args *uap) { int error; - uint32_t count; void *tlsbase; switch (uap->op) { @@ -68,9 +67,8 @@ error = copyout(&tlsbase, uap->parms, sizeof(tlsbase)); return (error); case MIPS_GET_COUNT: - count = mips_rd_count(); - error = copyout(&count, uap->parms, sizeof(count)); - return (error); + td->td_retval[0] = mips_rd_count(); + return (0); default: break; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201212122116.qBCLGrPp005448>