Re: [RFC] Smarter stack traces using the frame pointer

Andi Kleen
2003-11-10T18:06:56Z

Adam Litke <agl@us.ibm.com> writes:

> -static int kstack_depth_to_print = 24;
> +static int kstack_depth_to_print = 128;

I would not do that. It makes too much of the oops scroll away.

> + show_stack_frame((unsigned long) stack, ebp+4);

I think this needs much more sanity checking, otherwise the risk
of recursive oops etc is too big.

I would always check first if the stack value read from ebp is inside the
stack page of the current process. If you're paranoid you could even use
__get_user() to catch exceptions.

-Andi