Date: Mon, 18 Jun 2012 22:41:06 GMT From: Robert Watson <rwatson@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 213103 for review Message-ID: <201206182241.q5IMf6M3020250@skunkworks.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/@@213103?ac=10 Change 213103 by rwatson@rwatson_svr_ctsrd_mipsbuild on 2012/06/18 22:40:01 Annotate a bug in FreeBSD/mips in-kernel stack walking: pcb_regs is used instead of pcb_context. However, if I drop in pcb_context, then I get a crash walking kernel stacks, so the existing stack walker appears inadequately robust. Rather than fix these bugs now, make a note for later. Affected files ... .. //depot/projects/ctsrd/beribsd/src/sys/mips/mips/stack_machdep.c#2 edit Differences ... ==== //depot/projects/ctsrd/beribsd/src/sys/mips/mips/stack_machdep.c#2 (text+ko) ==== @@ -57,6 +57,7 @@ stack_zero(st); + /* XXXRW: appears to be inadequately robust? */ for (;;) { stacksize = 0; if (pc <= (u_register_t)(intptr_t)btext) @@ -137,6 +138,7 @@ if (TD_IS_RUNNING(td)) panic("stack_save_td: running"); + /* XXXRW: Should be pcb_context? */ pc = td->td_pcb->pcb_regs.pc; sp = td->td_pcb->pcb_regs.sp; stack_capture(st, pc, sp); @@ -150,6 +152,7 @@ if (curthread == NULL) panic("stack_save: curthread == NULL)"); + /* XXXRW: Should be pcb_context? */ pc = curthread->td_pcb->pcb_regs.pc; sp = curthread->td_pcb->pcb_regs.sp; stack_capture(st, pc, sp);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201206182241.q5IMf6M3020250>