2.4.20 unwind.c to handle multiple struct pt_regs
Quoted 7 lines · David Mosberger
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.
Quoted 5 lines
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_regsfixes and one that does the debug enhancements. And while you're at it, please use something a bit more concise thanUNW_DEBUG_PRINT(something like DPRINT orUNW_DPRINTshould be sufficient).
Two patches follow. The first updates include/asm-ia64/unwind.h, arch/ia64/kernel/unwind_i.h, arch/ia64/kernel/unwind.c to handle multiple pt_regs on stack. The second only updates unwind.c, it goes over the first patch to clean up the debug code, using UNW_DPRINT().
asm-ia64/unwind.h +1 -0
@@ -60,6 +60,7 @@ struct unw_frame_info {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 @@ enum unw_insn_opcode {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 +41 -28
147 lines not on this page · raw message
ia64/kernel/unwind.c +112 -72
486 lines not on this page · raw message
Quoted 10 lines · Keith Owens
Quoted 5 lines
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_regsfixes and one that does the debug enhancements. And while you're at it, please use something a bit more concise thanUNW_DEBUG_PRINT(something like DPRINT orUNW_DPRINTshould be sufficient).Two patches follow. The first updates
include/asm-ia64/unwind.h,arch/ia64/kernel/unwind_i.h,arch/ia64/kernel/unwind.cto handle multiplept_regson stack. The second only updatesunwind.c, it goes over the first patch to clean up the debug code, usingUNW_DPRINT().
This patch was not included in the ia64 bundle for 2.4.21-pre5. Are there any problems with the patch? Do I need to send it again? It applies over 2.4.21-pre5 with a 2 line offset on the last hunk.
Quoted 8 lines
Quoted 4 lines
Two patches follow. The first updates
include/asm-ia64/unwind.h,arch/ia64/kernel/unwind_i.h,arch/ia64/kernel/unwind.cto handle multiplept_regson stack. The second only updatesunwind.c, it goes over the first patch to clean up the debug code, usingUNW_DPRINT().This patch was not included in the ia64 bundle for 2.4.21-pre5. Are there any problems with the patch? Do I need to send it again? It applies over 2.4.21-pre5 with a 2 line offset on the last hunk.
Wow, somebody is actually looking at the BK tree :-)
Your patches are still in my "todo" list. I haven't looked at it closely, but my intent is to put it in before the real 2.4.21 patch.
Bjorn
Quoted 1 line · Bjorn Helgaas
Wow, somebody is actually looking at the BK tree :-)
I do not use BK. Because I work on PRCS I am not comfortable with using BK, there is a possible conflict with the BK 'no competitor' clause. I was looking at Marcelo's 2.4.21-pre5 patch.
Quoted 2 lines
Your patches are still in my "todo" list. I haven't looked at it closely, but my intent is to put it in before the real 2.4.21 patch.
Thanks.
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · Keith Owens
Keith> Two patches follow. The first updates include/asm-ia64/unwind.h, Keith> arch/ia64/kernel/unwind_i.h, arch/ia64/kernel/unwind.c to handle Keith> multiple pt_regs on stack. The second only updates unwind.c, it goes Keith> over the first patch to clean up the debug code, using UNW_DPRINT().
I applied most of these two patches now. I omitted the portions where you turned error messages into debug statements. Also, I'm going to change dump_info_pt() into something more reasonable.
--david
Bjorn Helgaas
AppliedQuoted 10 lines · David Mosberger
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · Keith Owens
Keith> Two patches follow. The first updates
include/asm-ia64/unwind.h, Keith>arch/ia64/kernel/unwind_i.h,arch/ia64/kernel/unwind.cto handle Keith> multiplept_regson stack. The second only updatesunwind.c, it goes Keith> over the first patch to clean up the debug code, usingUNW_DPRINT().I applied most of these two patches now. I omitted the portions where you turned error messages into debug statements. Also, I'm going to change
dump_info_pt()into something more reasonable.
I applied these patches to 2.4 also:
[email protected], 2003-03-07 12:02:17-07:00, [email protected]
ia64: In kernel unwinder, replace dump_info_pt() with get_scratch_regs()
and reformat to make it fit in 100 columns.
[email protected], 2003-03-07 12:02:07-07:00, [email protected]
ia64; Improve debug output from kernel unwinder. Based on patch by
Keith Owens. (Ported to 2.4 by Bjorn Helgaas).
[email protected], 2003-03-07 12:01:27-07:00, [email protected]
[PATCH] ia64: fix scratch-regs handling in kernel unwinder
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.
[Sorry if this is a duplicate; I sent it yesterday, but it bounced due to an HP mail problem.]
Quoted 7 lines · Keith Owens
Quoted 1 line · Bjorn Helgaas
Wow, somebody is actually looking at the BK tree :-)
I do not use BK. Because I work on PRCS I am not comfortable with using BK, there is a possible conflict with the BK 'no competitor' clause. I was looking at Marcelo's 2.4.21-pre5 patch.
Yeah, that makes sense. BK is extremely convenient for me, because it makes it so easy to track what Marcelo and David are doing, but I certainly don't want to force that on anybody else.
It feels like the "right thing" to make plain old patches available whenever I publish changes via BK, and I'm willing to do that if there's any interest in it.
Bjorn
Quoted 3 lines · Bjorn Helgaas
It feels like the "right thing" to make plain old patches available whenever I publish changes via BK, and I'm willing to do that if there's any interest in it.
Yes please. http://ftp.kernel.org/pub/linux/kernel/v2.[45]/testing/cset/
contains bk changesets converted to plain patches, we need the same for ia64 trees for people who can/will not use bk. I think Dave Jones set up the patche system.
Quoted 10 lines · Keith Owens
Quoted 3 lines · Bjorn Helgaas
It feels like the "right thing" to make plain old patches available whenever I publish changes via BK, and I'm willing to do that if there's any interest in it.
Yes please. http://ftp.kernel.org/pub/linux/kernel/v2.[45]/testing/cset/
contains bk changesets converted to plain patches, we need the same for ia64 trees for people who can/will not use bk. I think Dave Jones set up the patche system.
Dave Woodhouse, actually... Dave, can you set this up for other trees?
Signature · 3 lines
"It's not Hollywood. War is real, war is primarily not about defeat or victory, it is about death. I've seen thousands and thousands of dead bodies. Do you think I want to have an academic debate on this subject?" -- Robert Fisk
Re: [Linux-ia64] Re: [patch] 2.4.20 unwind.c to handle multiple
In reply to Keith OwensQuoted 7 lines · Matthew Wilcox
Quoted 6 lines · Keith Owens
Quoted 3 lines · Bjorn Helgaas
It feels like the "right thing" to make plain old patches available whenever I publish changes via BK, and I'm willing to do that if there's any interest in it.
Quoted 6 lines
Quoted 4 lines
Yes please. http://ftp.kernel.org/pub/linux/kernel/v2.[45]/testing/cset/
contains bk changesets converted to plain patches, we need the same for ia64 trees for people who can/will not use bk. I think Dave Jones set up the patche system.Dave Woodhouse, actually... Dave, can you set this up for other trees?
export CVSROOT=:pserver:[email protected]:/home/cvs grep -q $CVSROOT ~/.cvspass || echo "$CVSROOT Ay=0=h<Z" >> ~/.cvspass cvs co bkexport
Signature · 1 line
dwmw2