Skip to contentSkip to conversation

Smarter stack traces using the frame pointer

RFC Andi Kleen 1 participant 1 message Nov 10, 2003 2 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

Andi Kleen

author
#2 lore raw

Review

Quoted 2 lines · Adam Litke
(quoted diff) +1 -1
-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.

Review

Quoted 1 line
(quoted diff) +1 -0
+	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