]> git.baikalelectronics.ru Git - kernel.git/commit
s390/unwind: fix fgraph return address recovery
authorSumanth Korikkar <sumanthk@linux.ibm.com>
Tue, 26 Jul 2022 16:57:59 +0000 (18:57 +0200)
committerAlexander Gordeev <agordeev@linux.ibm.com>
Thu, 28 Jul 2022 16:05:24 +0000 (18:05 +0200)
commit5b10b3a4f7307600ccf1bba5d5b5730f3ad0efa2
tree2cd3b70ec053efe4c0e46fb829e00b8181ed29b9
parentffa71bd059caf096141c08ce50d77a28701c2967
s390/unwind: fix fgraph return address recovery

When HAVE_FUNCTION_GRAPH_RET_ADDR_PTR is defined, the return
address to the fgraph caller is recovered by tagging it along with the
stack pointer of ftrace stack. This makes the stack unwinding more
reliable.

When the fgraph return address is modified to return_to_handler,
ftrace_graph_ret_addr tries to restore it to the original
value using tagged stack pointer.

Fix this by passing tagged sp to ftrace_graph_ret_addr.

Fixes: e12a044c6bbc ("s390/unwind: recover kretprobe modified return address in stacktrace")
Cc: <stable@vger.kernel.org> # 5.18
Reviewed-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Sumanth Korikkar <sumanthk@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
arch/s390/include/asm/unwind.h