Commit 17426923 authored by Jiri Slaby's avatar Jiri Slaby Committed by Ingo Molnar

x86/stacktrace: Remove STACKTRACE_DUMP_ONCE

The stack unwinding can sometimes fail yet. Especially with the
generated debug info. So do not yell at users -- live patching (the only
user of this interface) will inform the user about the failure
gracefully.

And given this was the only user of the macro, remove the macro proper
too.
Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
Acked-by: default avatarJosh Poimboeuf <jpoimboe@redhat.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/lkml/20180518064713.26440-2-jslaby@suse.czSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent 0797a8d0
...@@ -81,16 +81,6 @@ EXPORT_SYMBOL_GPL(save_stack_trace_tsk); ...@@ -81,16 +81,6 @@ EXPORT_SYMBOL_GPL(save_stack_trace_tsk);
#ifdef CONFIG_HAVE_RELIABLE_STACKTRACE #ifdef CONFIG_HAVE_RELIABLE_STACKTRACE
#define STACKTRACE_DUMP_ONCE(task) ({ \
static bool __section(.data.unlikely) __dumped; \
\
if (!__dumped) { \
__dumped = true; \
WARN_ON(1); \
show_stack(task, NULL); \
} \
})
static int __always_inline static int __always_inline
__save_stack_trace_reliable(struct stack_trace *trace, __save_stack_trace_reliable(struct stack_trace *trace,
struct task_struct *task) struct task_struct *task)
...@@ -123,20 +113,16 @@ __save_stack_trace_reliable(struct stack_trace *trace, ...@@ -123,20 +113,16 @@ __save_stack_trace_reliable(struct stack_trace *trace,
* generated code which __kernel_text_address() doesn't know * generated code which __kernel_text_address() doesn't know
* about. * about.
*/ */
if (!addr) { if (!addr)
STACKTRACE_DUMP_ONCE(task);
return -EINVAL; return -EINVAL;
}
if (save_stack_address(trace, addr, false)) if (save_stack_address(trace, addr, false))
return -EINVAL; return -EINVAL;
} }
/* Check for stack corruption */ /* Check for stack corruption */
if (unwind_error(&state)) { if (unwind_error(&state))
STACKTRACE_DUMP_ONCE(task);
return -EINVAL; return -EINVAL;
}
if (trace->nr_entries < trace->max_entries) if (trace->nr_entries < trace->max_entries)
trace->entries[trace->nr_entries++] = ULONG_MAX; trace->entries[trace->nr_entries++] = ULONG_MAX;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment