Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 10 Nov 2012 00:32:27 GMT
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 219714 for review
Message-ID:  <201211100032.qAA0WRZI026907@skunkworks.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/@@219714?ac=10

Change 219714 by rwatson@rwatson_svr_ctsrd_mipsbuild on 2012/11/10 00:32:05

	Overload ECAPMODE instead of ENOSYS -- it seems a bit more
	suitable, and prevents confusion about system call
	non-implementation.

Affected files ...

.. //depot/projects/ctsrd/cheribsd/src/sys/mips/cheri/cheri.c#8 edit

Differences ...

==== //depot/projects/ctsrd/cheribsd/src/sys/mips/cheri/cheri.c#8 (text+ko) ====

@@ -294,10 +294,10 @@
 
 	/*
 	 * Check whether userspace holds the rights defined in
-	 * cheri_capability_set_user() in $C0.  We might also consider
-	 * checking $PCC here.
+	 * cheri_capability_set_user() in $C0.  Note that object type is
+	 * We might also consider checking $PCC here.
 	 *
-	 * XXXRW: Possibly ENOSYS should be EPROT or ESANDBOX?
+	 * XXXRW: Possibly ECAPMODE should be EPROT or ESANDBOX?
 	 */
 	intr_disable();
 	CHERI_CLC(CHERI_CR_KR1C, CHERI_CR_KDC,
@@ -307,7 +307,7 @@
 	if (c.c_perms != CHERI_CAP_USER_PERMS ||
 	    c.c_base != CHERI_CAP_USER_BASE ||
 	    c.c_length != CHERI_CAP_USER_LENGTH)
-		return (ENOSYS);
+		return (ECAPMODE);
 	return (0);
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201211100032.qAA0WRZI026907>