Re: BUG-lockdep and freeze (was: Arrr! Linux 2.6.18)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux