All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 1/6] x86/stacktrace: do not unwind after user regs
@ 2018-05-18  6:47 Jiri Slaby
  2018-05-18  6:47 ` [PATCH v3 2/6] x86/stacktrace: remove STACKTRACE_DUMP_ONCE Jiri Slaby
                   ` (5 more replies)
  0 siblings, 6 replies; 12+ messages in thread
From: Jiri Slaby @ 2018-05-18  6:47 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] 12+ messages in thread

end of thread, other threads:[~2018-06-21 14:35 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-18  6:47 [PATCH v3 1/6] x86/stacktrace: do not unwind after user regs Jiri Slaby
2018-05-18  6:47 ` [PATCH v3 2/6] x86/stacktrace: remove STACKTRACE_DUMP_ONCE Jiri Slaby
2018-05-18  6:47 ` [PATCH v3 3/6] x86/stacktrace: clarify the reliable success paths Jiri Slaby
2018-05-18  6:47 ` [PATCH v3 4/6] x86/stacktrace: do not fail for ORC with regs on stack Jiri Slaby
2018-05-18  6:47 ` [PATCH v3 5/6] x86/unwind/orc: Detect the end of the stack Jiri Slaby
2018-05-18  6:47 ` [PATCH v3 6/6] x86/stacktrace: enable HAVE_RELIABLE_STACKTRACE for the ORC unwinder Jiri Slaby
2018-05-18  6:55 ` [PATCH v3 1/6] x86/stacktrace: do not unwind after user regs Ingo Molnar
2018-05-18 22:41   ` Josh Poimboeuf
2018-05-19  7:42     ` Ingo Molnar
2018-05-22 16:06       ` Josh Poimboeuf
2018-05-31 13:46         ` Josh Poimboeuf
2018-06-21 14:35           ` Ingo Molnar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.