PERFORCE change 219636 for review

Robert Watson rwatson at FreeBSD.org
Wed Nov 7 01:36:49 UTC 2012


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

Change 219636 by rwatson at rwatson_svr_ctsrd_mipsbuild on 2012/11/07 01:36:08

	Improve CPU_CHERI ifdefing for C2E exception handler so that
	BERI, not just CHERI, kernels build.
	
	Print out more information about a userspace C2E exception
	when one occurs -- what program, etc -- consistent with other
	exception messages from the kernel (e.g., page fault).

Affected files ...

.. //depot/projects/ctsrd/cheribsd/src/sys/mips/mips/trap.c#11 edit

Differences ...

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

@@ -129,7 +129,9 @@
 
 static void log_illegal_instruction(const char *, struct trapframe *);
 static void log_bad_page_fault(char *, struct trapframe *, int);
+#ifdef CPU_CHERI
 static void log_c2e_exception(const char *, struct trapframe *, int);
+#endif
 static void log_frame_dump(struct trapframe *frame);
 static void get_mapping_info(vm_offset_t, pd_entry_t **, pt_entry_t **);
 
@@ -1550,6 +1552,11 @@
 #ifdef SMP
 	printf("cpuid = %d\n", PCPU_GET(cpuid));
 #endif
+	log(LOG_ERR, "%s: pid %d tid %ld (%s), uid %d: CP2 fault "
+	    "(type %#x)\n",
+	    msg, curproc->p_pid, (long)curthread->td_tid, curproc->p_comm,
+	    curproc->p_ucred ? curproc->p_ucred->cr_uid : -1,
+	    trap_type);
 
 	/* log registers in trap frame */
 	log_frame_dump(frame);


More information about the p4-projects mailing list