15 Feb, 2009

2 commits


13 Jan, 2009

1 commit

  • There has been some light flamewar on lkml about decoding oopses
    in modules (as part of the crashdump flamewar).

    Now this isn't rocket science, just the markup_oops.pl script
    cheaped out and didn't handle modules. But really; a flamewar
    all about that?? What happened to C++ in the kernel or reading
    files from inside the kernel?

    This patch adds module support to markup_oops.pl; it's not the
    most pretty perl but it works for my testcases...

    Signed-off-by: Arjan van de Ven
    Signed-off-by: Linus Torvalds

    Arjan van de Ven
     

07 Jan, 2009

1 commit

  • We're struggling all the time to figure out where the code came from that
    oopsed.. The script below (a adaption from a script used by
    kerneloops.org) can help developers quite a bit, at least for non-module
    cases.

    It works and looks like this:

    [/home/arjan/linux]$ dmesg | perl scripts/markup_oops.pl vmlinux
    {
    struct agp_memory *memory;

    memory = agp_allocate_memory(agp_bridge, pg_count, type);
    c055c10f: 89 c2 mov %eax,%edx
    if (memory == NULL)
    c055c111: 74 19 je c055c12c
    /* This function must only be called when current_controller != NULL */
    static void agp_insert_into_pool(struct agp_memory * temp)
    {
    struct agp_memory *prev;

    prev = agp_fe.current_controller->pool;
    c055c113: a1 ec dc 8f c0 mov 0xc08fdcec,%eax
    *c055c118: 8b 40 10 mov 0x10(%eax),%eax
    prev->prev = temp;
    c055c11f: 89 50 04 mov %edx,0x4(%eax)
    temp->next = prev;
    c055c122: 89 02 mov %eax,(%edx)
    }
    agp_fe.current_controller->pool = temp;
    c055c124: a1 ec dc 8f c0 mov 0xc08fdcec,%eax
    c055c129: 89 50 10 mov %edx,0x10(%eax)
    if (memory == NULL)
    return NULL;

    agp_insert_into_pool(memory);

    so in this case, we faulted while dereferencing agp_fe.current_controller
    pointer, and we get to see exactly which function and line it affects...
    Personally I find this very useful, and I can see value for having this
    script in the kernel for more-than-just-me to use.

    Caveats:
    * It only works for oopses not-in-modules
    * It only works nicely for kernels compiled with CONFIG_DEBUG_INFO
    * It's not very fast.
    * It only works on x86

    Signed-off-by: Arjan van de Ven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arjan van de Ven