aboutsummaryrefslogtreecommitdiff
path: root/arch/s390/include/asm/stacktrace.h
diff options
context:
space:
mode:
authorHeiko Carstens <[email protected]>2023-10-30 16:50:46 +0100
committerVasily Gorbik <[email protected]>2023-11-05 22:34:57 +0100
commit504b73d00a55a68c0d1bb0e7c12e56e5f908e906 (patch)
tree6e108d264f5385eb8038718e4ab861c88f2da5e6 /arch/s390/include/asm/stacktrace.h
parente14aec23025eeb1f2159ba34dbc1458467c4c347 (diff)
s390/perf: implement perf_callchain_user()
Daan De Meyer and Neal Gompa reported that s390 does not support perf user stack unwinding. This was never implemented since this requires user space to be compiled with the -mbackchain compile option, which until now no distribution did. However this is going to change with Fedora. Therefore provide a perf_callchain_user() implementation. Note that due to the way s390 sets up stack frames the provided call chains can contain invalid values. This is especially true for the first stack frame, where it is not possible to tell if the return address has been written to the stack already or not. Reported-by: Daan De Meyer <[email protected]> Reported-by: Neal Gompa <[email protected]> Closes: https://lore.kernel.org/all/CAO8sHcn3+_qrnvp0580aK7jN0Wion5F7KYeBAa4MnCY4mqABPA@mail.gmail.com/ Link: https://lore.kernel.org/all/[email protected] Reviewed-by: Neal Gompa <[email protected]> Acked-by: Ilya Leoshkevich <[email protected]> Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
Diffstat (limited to 'arch/s390/include/asm/stacktrace.h')
-rw-r--r--arch/s390/include/asm/stacktrace.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/s390/include/asm/stacktrace.h b/arch/s390/include/asm/stacktrace.h
index 78f7b729b65f..31ec4f545e03 100644
--- a/arch/s390/include/asm/stacktrace.h
+++ b/arch/s390/include/asm/stacktrace.h
@@ -6,6 +6,13 @@
#include <linux/ptrace.h>
#include <asm/switch_to.h>
+struct stack_frame_user {
+ unsigned long back_chain;
+ unsigned long empty1[5];
+ unsigned long gprs[10];
+ unsigned long empty2[4];
+};
+
enum stack_type {
STACK_TYPE_UNKNOWN,
STACK_TYPE_TASK,