PERFORCE change 219772 for review
Robert Watson
rwatson at FreeBSD.org
Tue Nov 13 21:15:12 UTC 2012
http://p4web.freebsd.org/@@219772?ac=10
Change 219772 by rwatson at rwatson_zenith_cl_cam_ac_uk on 2012/11/13 21:15:00
When initialising the PCB of a new thread, use a CHERI copy
routine so that tags are propagated. This is ineffficient
(we should use a capability-aware copy routine) but may well
work.
Affected files ...
.. //depot/projects/ctsrd/cheribsd/src/sys/mips/mips/vm_machdep.c#6 edit
Differences ...
==== //depot/projects/ctsrd/cheribsd/src/sys/mips/mips/vm_machdep.c#6 (text+ko) ====
@@ -413,6 +413,16 @@
*/
bcopy(td0->td_pcb, pcb2, sizeof(*pcb2));
+#ifdef CPU_CHERI
+ /*
+ * XXXRW: We're copying this memory twice -- once in the bcopy()
+ * above, and once here using capabilities. Once bcopy() is
+ * capability-oblivious, we can lose this.
+ */
+ cheri_context_copy(&pcb2->pcb_cheriframe,
+ &td0->td_pcb->pcb_cheriframe);
+#endif
+
/*
* Set registers for trampoline to user mode.
*/
More information about the p4-projects
mailing list