PERFORCE change 213103 for review
Robert Watson
rwatson at FreeBSD.org
Mon Jun 18 22:41:07 UTC 2012
http://p4web.freebsd.org/@@213103?ac=10
Change 213103 by rwatson at 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);
More information about the p4-projects
mailing list