public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC 1/1] orc: mark it as reliable
@ 2017-10-04  9:23 Jiri Slaby
  2017-10-04 14:04 ` Josh Poimboeuf
  0 siblings, 1 reply; 2+ messages in thread
From: Jiri Slaby @ 2017-10-04  9:23 UTC (permalink / raw)
  To: mingo; +Cc: tglx, hpa, x86, linux-kernel, Jiri Slaby, Josh Poimboeuf

We need a reliable stack unwinder for kernel live patching, but we do
not want to enable frame pointers for performance reasons. So let ORC be
a reliable stack unwinder on x86 as it performs nicely wrt reliability
of traces.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: x86@kernel.org
---

I am sending this as an RFC. Do you still consider ORC to be not-enough
reliable?

 arch/x86/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 063f1e0d51aa..7403267407fc 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -172,7 +172,7 @@ config X86
 	select HAVE_PERF_USER_STACK_DUMP
 	select HAVE_RCU_TABLE_FREE
 	select HAVE_REGS_AND_STACK_ACCESS_API
-	select HAVE_RELIABLE_STACKTRACE		if X86_64 && FRAME_POINTER_UNWINDER && STACK_VALIDATION
+	select HAVE_RELIABLE_STACKTRACE		if X86_64 && (FRAME_POINTER_UNWINDER || ORC_UNWINDER) && STACK_VALIDATION
 	select HAVE_STACK_VALIDATION		if X86_64
 	select HAVE_SYSCALL_TRACEPOINTS
 	select HAVE_UNSTABLE_SCHED_CLOCK
-- 
2.14.2

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

* Re: [RFC 1/1] orc: mark it as reliable
  2017-10-04  9:23 [RFC 1/1] orc: mark it as reliable Jiri Slaby
@ 2017-10-04 14:04 ` Josh Poimboeuf
  0 siblings, 0 replies; 2+ messages in thread
From: Josh Poimboeuf @ 2017-10-04 14:04 UTC (permalink / raw)
  To: Jiri Slaby; +Cc: mingo, tglx, hpa, x86, linux-kernel

On Wed, Oct 04, 2017 at 11:23:15AM +0200, Jiri Slaby wrote:
> We need a reliable stack unwinder for kernel live patching, but we do
> not want to enable frame pointers for performance reasons. So let ORC be
> a reliable stack unwinder on x86 as it performs nicely wrt reliability
> of traces.
> 
> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
> Cc: Josh Poimboeuf <jpoimboe@redhat.com>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: "H. Peter Anvin" <hpa@zytor.com>
> Cc: x86@kernel.org
> ---
> 
> I am sending this as an RFC. Do you still consider ORC to be not-enough
> reliable?

Off the top of my head, at least the following is missing:

- save_stack_trace_reliable() assumes that kernel mode pt_regs on the
  stack make the stack trace unreliable.  This is an FP-specific
  assumption which no longer applies for ORC.

- The ORC unwinder needs to set unwind_state.error if it doesn't reach
  all the way to the end (user pt_regs).

-- 
Josh

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

end of thread, other threads:[~2017-10-04 14:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-04  9:23 [RFC 1/1] orc: mark it as reliable Jiri Slaby
2017-10-04 14:04 ` Josh Poimboeuf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox