Skip to content
Commit e306dfd0 authored by Olof Johansson's avatar Olof Johansson Committed by Catalin Marinas
Browse files

ARM64: unwind: Fix PC calculation



The frame PC value in the unwind code used to just take the saved LR
value and use that.  That's incorrect as a stack trace, since it shows
the return path stack, not the call path stack.

In particular, it shows faulty information in case the bl is done as
the very last instruction of one label, since the return point will be
in the next label. That can easily be seen with tail calls to panic(),
which is marked __noreturn and thus doesn't have anything useful after it.

Easiest here is to just correct the unwind code and do a -4, to get the
actual call site for the backtrace instead of the return site.

Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
Cc: stable@vger.kernel.org
Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
parent 6d0abeca
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment