lkml.org 
[lkml]   [2006]   [Sep]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: BUG-lockdep and freeze (was: Arrr! Linux 2.6.18)


    On Sat, 30 Sep 2006, Andi Kleen wrote:
    >
    > That wouldn't work with interrupt stacks.

    Andi.

    Please spend even just a few minutes looking at the old i386 code.

    > The old unwinder code had a state machine to deal with them, but it was
    > distingustingly complicated (there are nasty corner cases where you can
    > be in multiple interrupt stacks nested). I'm not sure we would have
    > really wanted to retain that.

    Here's what the old code did:

    frameptr = initialize frame code
    while (1) {
    struct thread_info *context;
    context = (struct thread_info *)
    ((unsigned long)stack & (~(THREAD_SIZE - 1)));
    frameptr = print_context_stack(context, stack, frameptr, log_lvl);
    stack = (unsigned long*)context->previous_esp;
    if (!stack)
    break;
    printk(" =======================\n");
    }

    it it really was that simple. The actual frame-following code was in
    "print_context_stack()", and it works entirely within a single stack page,
    and returns once it is outside that stack page.

    There is absolutely ZERO problem with new pages through interrupt stacks
    etc, because we don't even trust the stack contents for that, we just
    follow the stack context pointers that we _can_ trust.

    Linus
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2009-11-18 23:46    [W:2.721 / U:0.088 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site