[PATCH 5/7] unwinder: show_stack, check also ret_addr_p's contents

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx>
Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxxxxx>
Cc: "H. Peter Anvin" <hpa@xxxxxxxxx>
Cc: x86@xxxxxxxxxx
Cc: Josh Poimboeuf <jpoimboe@xxxxxxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe live-patching" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux Kernel]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux