Date: Sun, 4 Nov 2012 16:18:19 GMT From: Robert Watson <rwatson@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 219567 for review Message-ID: <201211041618.qA4GIJip045657@skunkworks.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/@@219567?ac=10 Change 219567 by rwatson@rwatson_svr_ctsrd_mipsbuild on 2012/11/04 16:17:47 CSetTag does not behave the same way as other CHERI register field assignment instructions, in that it "modifies in place". Put it later in the capability setup sequence so that the target is tagged as a capability before we start. Affected files ... .. //depot/projects/ctsrd/cheribsd/src/sys/mips/cheri/cheri.c#4 edit Differences ... ==== //depot/projects/ctsrd/cheribsd/src/sys/mips/cheri/cheri.c#4 (text+ko) ==== @@ -79,10 +79,10 @@ * temporary preserved during kernel execution to avoid this. */ s = intr_disable(); - CHERI_CSETTYPE(CHERI_CR_KR1C, CHERI_CR_KDC, (register_t)otypep); - CHERI_CINCBASE(CHERI_CR_KR1C, CHERI_CR_KR1C, (register_t)basep); + CHERI_CINCBASE(CHERI_CR_KR1C, CHERI_CR_KDC, (register_t)basep); CHERI_CSETLEN(CHERI_CR_KR1C, CHERI_CR_KR1C, (register_t)length); CHERI_CANDPERM(CHERI_CR_KR1C, CHERI_CR_KR1C, (register_t)perms); + CHERI_CSETTYPE(CHERI_CR_KR1C, CHERI_CR_KR1C, (register_t)otypep); CHERI_CSC(CHERI_CR_KR1C, CHERI_CR_KDC, (register_t)cp, 0); intr_restore(s); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201211041618.qA4GIJip045657>