[Crash-utility] ARM panic registers

Dave Anderson anderson at redhat.com
Tue Sep 20 14:41:51 UTC 2011



----- Original Message -----
> Hi Dave et. al.,
> 
> For ARM {k,net}dumps panic tasks we go to great lengths to locate
> the prstatus data (crash registers) in
> 
>     netdump.c:get_netdump_regs_arm()
> 
> In fact we rely so hard on them having been read from the CORE
> ELF notes and put in either
> 
>     nd->nt_prstatus_percpu
> 
> or
> 
>     nd->nt_prstatus
> 
> that there's a segfault if that's not the case. The thing is,
> once we've gone through all that trouble of finding them, and
> making sure bt->machdep points to them,
> arm.c:arm_get_stack_frame() is called, which ends up getting the
> crash registers from
> 
>     machdep->machspec->crash_task_regs
> 
> anyway. These are read directly from within the PT_LOAD segments
> ignoring the contents any ELF notes.
> 
> I suggest changing get_netdump_regs_arm() to:
> 
> static void
> get_netdump_regs_arm(struct bt_info *bt, ulong *eip, ulong *esp)
> {
> 	machdep->get_stack_frame(bt, eip, esp);
> }
> 
> If we're not going to use the ELF notes, why fail if they're not
> there?

I'm not sure what you mean about reading "directly from within the 
PT_LOAD segments",  but I agree with you that the preliminary "if" 
section of get_netdump_regs_arm() which sets bt->machdep is a 
no-op -- given that arm_get_dumpfile_stack_frame() just ignores
it, and resets bt->machdep from that ARM-specific ms->crash_task_regs
area.

Mika, you agree?

Dave

 
> Regards
> Per




More information about the Crash-utility mailing list