linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 1/6] x86/stacktrace: do not unwind after user regs
@ 2018-05-14 14:06 Jiri Slaby
  2018-05-14 14:06 ` [PATCH v2 2/6] x86/stacktrace: make clear the success paths Jiri Slaby
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Jiri Slaby @ 2018-05-14 14:06 UTC (permalink / raw)
  To: mingo
  Cc: linux-kernel, Jiri Slaby, Thomas Gleixner, H. Peter Anvin, x86,
	Josh Poimboeuf

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>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: x86@kernel.org
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
---
 arch/x86/kernel/stacktrace.c | 9 ---------
 1 file changed, 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;
 		}
 
-- 
2.16.3

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-05-14 15:08 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-14 14:06 [PATCH v2 1/6] x86/stacktrace: do not unwind after user regs Jiri Slaby
2018-05-14 14:06 ` [PATCH v2 2/6] x86/stacktrace: make clear the success paths Jiri Slaby
2018-05-14 15:03   ` Josh Poimboeuf
2018-05-14 14:06 ` [PATCH v2 3/6] x86/stacktrace: remove STACKTRACE_DUMP_ONCE from __save_stack_trace_reliable Jiri Slaby
2018-05-14 15:04   ` Josh Poimboeuf
2018-05-14 14:06 ` [PATCH v2 4/6] x86/stacktrace: do not fail for ORC with regs on stack Jiri Slaby
2018-05-14 14:06 ` [PATCH v2 5/6] x86/unwind/orc: Detect the end of the stack Jiri Slaby
2018-05-14 14:06 ` [PATCH v2 6/6] x86/stacktrace: orc, mark it as reliable Jiri Slaby
2018-05-14 15:07   ` Josh Poimboeuf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).