PERFORCE change 219899 for review

Brooks Davis brooks at FreeBSD.org
Wed Dec 12 21:16:54 UTC 2012


http://p4web.freebsd.org/@@219899?ac=10

Change 219899 by brooks at 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;
 	}


More information about the p4-projects mailing list