summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2018-05-18 08:47:08 +0200
committerIngo Molnar <mingo@kernel.org>2018-06-21 16:34:55 +0200
commit0797a8d0d79769574550caa5ca5d89c237723250 (patch)
tree8e6dca95f3bbbe27b0e8548e07abfc3e91ec54d7
parent1966c5e5bd9802cf62d3744ef4d2d6d32e22604d (diff)
downloadlinux-0797a8d0d79769574550caa5ca5d89c237723250.tar.gz
linux-0797a8d0d79769574550caa5ca5d89c237723250.tar.bz2
linux-0797a8d0d79769574550caa5ca5d89c237723250.zip
x86/stacktrace: Do not unwind after user regs
Josh pointed out, that there is no way a frame can be after user regs. So remove the last unwind and the check. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Acked-by: Josh 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-1-jslaby@suse.cz Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r--arch/x86/kernel/stacktrace.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/arch/x86/kernel/stacktrace.c b/arch/x86/kernel/stacktrace.c
index 093f2ea5dd56..8948b7d9c064 100644
--- a/arch/x86/kernel/stacktrace.c
+++ b/arch/x86/kernel/stacktrace.c
@@ -113,15 +113,6 @@ __save_stack_trace_reliable(struct stack_trace *trace,
if (!user_mode(regs))
return -EINVAL;
- /*
- * The last frame contains the user mode syscall
- * pt_regs. Skip it and finish the unwind.
- */
- unwind_next_frame(&state);
- if (!unwind_done(&state)) {
- STACKTRACE_DUMP_ONCE(task);
- return -EINVAL;
- }
break;
}