x86/unwind: Dump stack data on warnings

The unwinder warnings are good at finding unexpected unwinder issues,
but they often don't give enough data to be able to fully diagnose them.
Print a one-time stack dump when a warning is detected.

Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Andy Lutomirski <luto@amacapital.net>
Link: http://lkml.kernel.org/r/15607370e3ddb1732b6a73d5c65937864df16ac8.1481904011.git.jpoimboe@redhat.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
Josh Poimboeuf
2016-12-16 10:05:06 -06:00
committed by Thomas Gleixner
parent 8023e0e2a4
commit 8b5e99f022
2 changed files with 39 additions and 1 deletions

View File

@@ -12,7 +12,7 @@ struct unwind_state {
struct task_struct *task;
int graph_idx;
#ifdef CONFIG_FRAME_POINTER
unsigned long *bp;
unsigned long *bp, *orig_sp;
struct pt_regs *regs;
#else
unsigned long *sp;