summaryrefslogtreecommitdiff
path: root/arch/x86/kernel/dumpstack.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/dumpstack.c')
-rw-r--r--arch/x86/kernel/dumpstack.c86
1 files changed, 0 insertions, 86 deletions
diff --git a/arch/x86/kernel/dumpstack.c b/arch/x86/kernel/dumpstack.c
index c08f32ab8ace..999de3b3f7f4 100644
--- a/arch/x86/kernel/dumpstack.c
+++ b/arch/x86/kernel/dumpstack.c
@@ -56,92 +56,6 @@ void printk_address(unsigned long address)
pr_cont(" [<%p>] %pS\n", (void *)address, (void *)address);
}
-/*
- * x86-64 can have up to three kernel stacks:
- * process stack
- * interrupt stack
- * severe exception (double fault, nmi, stack fault, debug, mce) hardware stack
- */
-
-unsigned long
-print_context_stack(struct task_struct *task,
- unsigned long *stack, unsigned long bp,
- const struct stacktrace_ops *ops, void *data,
- struct stack_info *info, int *graph)
-{
- struct stack_frame *frame = (struct stack_frame *)bp;
-
- /*
- * If we overflowed the stack into a guard page, jump back to the
- * bottom of the usable stack.
- */
- if ((unsigned long)task_stack_page(task) - (unsigned long)stack <
- PAGE_SIZE)
- stack = (unsigned long *)task_stack_page(task);
-
- while (on_stack(info, stack, sizeof(*stack))) {
- unsigned long addr = *stack;
-
- if (__kernel_text_address(addr)) {
- unsigned long real_addr;
- int reliable = 0;
-
- if ((unsigned long) stack == bp + sizeof(long)) {
- reliable = 1;
- frame = frame->next_frame;
- bp = (unsigned long) frame;
- }
-
- /*
- * When function graph tracing is enabled for a
- * function, its return address on the stack is
- * replaced with the address of an ftrace handler
- * (return_to_handler). In that case, before printing
- * the "real" address, we want to print the handler
- * address as an "unreliable" hint that function graph
- * tracing was involved.
- */
- real_addr = ftrace_graph_ret_addr(task, graph, addr,
- stack);
- if (real_addr != addr)
- ops->address(data, addr, 0);
-
- ops->address(data, real_addr, reliable);
- }
- stack++;
- }
- return bp;
-}
-EXPORT_SYMBOL_GPL(print_context_stack);
-
-unsigned long
-print_context_stack_bp(struct task_struct *task,
- unsigned long *stack, unsigned long bp,
- const struct stacktrace_ops *ops, void *data,
- struct stack_info *info, int *graph)
-{
- struct stack_frame *frame = (struct stack_frame *)bp;
- unsigned long *retp = &frame->return_address;
-
- while (on_stack(info, stack, sizeof(*stack) * 2)) {
- unsigned long addr = *retp;
- unsigned long real_addr;
-
- if (!__kernel_text_address(addr))
- break;
-
- real_addr = ftrace_graph_ret_addr(task, graph, addr, retp);
- if (ops->address(data, real_addr, 1))
- break;
-
- frame = frame->next_frame;
- retp = &frame->return_address;
- }
-
- return (unsigned long)frame;
-}
-EXPORT_SYMBOL_GPL(print_context_stack_bp);
-
void show_trace_log_lvl(struct task_struct *task, struct pt_regs *regs,
unsigned long *stack, char *log_lvl)
{