2.4.20 unwind.c to handle multiple struct pt_regs
PATCH 1/1 2.4.20 unwind.c to handle multiple struct pt_regs
This patch has been running inside SGI for 2 months. It handles kernel stacks with multiple struct pt_regs, as found while debugging the kernel. The debugging statements in the unwind code were awkward to use and inconsistent in what was being dumped and when, I ended up changing almost all the unwind debugging code while tracking down this problem.
Patch is against 2.4.20-ia64-021210, it fits 2.4.19 as well.
asm-ia64/unwind.h +1 -0
@@ -60,6 +60,7 @@unsigned long ip;/* instruction pointer value */ unsigned long pr;/* current predicate values */ unsigned long *cfm_loc;/* cfm save location (or NULL) */ +unsigned long pt;/* struct pt_regs location */ struct task_struct *task;struct switch_stack *sw;
ia64/kernel/unwind_i.h +2 -1
@@ -137,7 +137,8 @@UNW_INSN_SETNAT_MEMSTK ,/* s[dst+1].nat.type = MEMSTK; s[dst+1].nat.off = *s.pri_unat - s[dst] */ UNW_INSN_SETNAT_TYPE ,/* s[dst+1].nat.type = val */ -UNW_INSN_LOAD /* s[dst] = *s[val] */ +UNW_INSN_LOAD ,/* s[dst] = *s[val] */ + UNW_INSN_MOVE_SCRATCH, /* s[dst] = scratch reg "val" */ }; struct unw_insn {
ia64/kernel/unwind.c +152 -98
595 lines not on this page · raw message
Hi Keith,
Keith> This patch has been running inside SGI for 2 months. It Keith> handles kernel stacks with multiple struct pt_regs, as found Keith> while debugging the kernel. The debugging statements in the Keith> unwind code were awkward to use and inconsistent in what was Keith> being dumped and when, I ended up changing almost all the Keith> unwind debugging code while tracking down this problem.
The patch basically looks fine to me, except that I'd really like to prefer to have it split up into one patch that does the pt_regs fixes and one that does the debug enhancements. And while you're at it, please use something a bit more concise than UNW_DEBUG_PRINT (something like DPRINT or UNW_DPRINT should be sufficient).
Thanks,
--david