s390/unwind: recover kretprobe modified return address in stacktrace
authorVasily Gorbik <gor@linux.ibm.com>
Wed, 28 Apr 2021 14:29:40 +0000 (16:29 +0200)
committerVasily Gorbik <gor@linux.ibm.com>
Sun, 27 Mar 2022 20:18:39 +0000 (22:18 +0200)
commitd81675b60d0959cfa3727f03d5b90558fb457011
treeb2a3051b67ebf5ea4a58a73195c5b2193da65713
parent09bc20c8fb35cf1afed1612b287e9ddbe6a7d73c
s390/unwind: recover kretprobe modified return address in stacktrace

Based on commit cd9bc2c92588 ("arm64: Recover kretprobe modified return
address in stacktrace").

"""
Since the kretprobe replaces the function return address with
the __kretprobe_trampoline on the stack, stack unwinder shows it
instead of the correct return address.

This checks whether the next return address is the
__kretprobe_trampoline(), and if so, try to find the correct
return address from the kretprobe instance list.
"""

Original patch series:
https://lore.kernel.org/all/163163030719.489837.2236069935502195491.stgit@devnote2/

Reviewed-by: Tobias Huschle <huschle@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
arch/s390/include/asm/unwind.h
arch/s390/kernel/unwind_bc.c