[Crash-utility] ARM panic registers

Per Fransson per.fransson.ml at gmail.com
Tue Sep 20 09:22:10 UTC 2011


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?

Regards
Per




More information about the Crash-utility mailing list