]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commite12a044c6bbc5c7817e6a43e9bf8682b70f5648e
treeb2a3051b67ebf5ea4a58a73195c5b2193da65713
parent8747e52ceba988dd66afba1aa9254054b90a7c84
s390/unwind: recover kretprobe modified return address in stacktrace

Based on commit 628c9797f950 ("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