Date: Wed, 7 Nov 2012 01:36:48 GMT From: Robert Watson <rwatson@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 219636 for review Message-ID: <201211070136.qA71ame4088728@skunkworks.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/@@219636?ac=10 Change 219636 by rwatson@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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201211070136.qA71ame4088728>