Messages in this thread Patch in this message | | | From | Jiri Slaby <> | Subject | [PATCH 5/7] unwinder: show_stack, check also ret_addr_p's contents | Date | Fri, 5 May 2017 14:21:58 +0200 |
| |
The DWARF unwinder stores the return address in an internal structure. This is returned to the generic unwinder. So do not check only ret_addr_p against the current stack pointer, but also if the address is the return address.
This makes the unwinder to really think the addresses are reliable.
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/dumpstack.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/x86/kernel/dumpstack.c b/arch/x86/kernel/dumpstack.c index dbce3cca94cb..963c6b60887f 100644 --- a/arch/x86/kernel/dumpstack.c +++ b/arch/x86/kernel/dumpstack.c @@ -123,7 +123,8 @@ void show_trace_log_lvl(struct task_struct *task, struct pt_regs *regs, continue; } - if (stack == ret_addr_p) + if (stack == ret_addr_p || + (ret_addr_p && addr == *ret_addr_p)) reliable = 1; /* -- 2.12.2
| |