x86/unwind/orc: Fall back to using frame pointers for generated code
authorJosh Poimboeuf <jpoimboe@redhat.com>
Thu, 27 Jun 2019 00:33:55 +0000 (19:33 -0500)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 27 Jun 2019 22:11:21 +0000 (00:11 +0200)
commitae6a45a0868986f69039a2150d3b2b9ca294c378
tree81d8a61bfefb39d9a9a07615f14f1df9df859645
parent83f44ae0f8afcc9da659799db8693f74847e66b3
x86/unwind/orc: Fall back to using frame pointers for generated code

The ORC unwinder can't unwind through BPF JIT generated code because
there are no ORC entries associated with the code.

If an ORC entry isn't available, try to fall back to frame pointers.  If
BPF and other generated code always do frame pointer setup (even with
CONFIG_FRAME_POINTERS=n) then this will allow ORC to unwind through most
generated code despite there being no corresponding ORC entries.

Fixes: d15d356887e7 ("perf/x86: Make perf callchains work without CONFIG_FRAME_POINTER")
Reported-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Kairui Song <kasong@redhat.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Borislav Petkov <bp@alien8.de>
Link: https://lkml.kernel.org/r/b6f69208ddff4343d56b7bfac1fc7cfcd62689e8.1561595111.git.jpoimboe@redhat.com
arch/x86/kernel/unwind_orc.c