From be72ea09c1a5273abf8c6c52ef53e36c701cbf6a Mon Sep 17 00:00:00 2001 From: Heiko Carstens Date: Mon, 29 Apr 2024 14:28:47 +0200 Subject: s390/vdso: Introduce and use struct stack_frame_vdso_wrapper Introduce and use struct stack_frame_vdso_wrapper within vdso user wrapper code. With this structure it is possible to automatically generate an asm-offset define which can be used to save and restore the return address of the calling function. Also use STACK_FRAME_USER_OVERHEAD instead of STACK_FRAME_OVERHEAD to document that the code works with user space stack frames with the standard stack frame layout. Fixes: aa44433ac4ee ("s390: add USER_STACKTRACE support") Reviewed-by: Jens Remus Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev --- arch/s390/include/asm/stacktrace.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'arch/s390/include/asm/stacktrace.h') diff --git a/arch/s390/include/asm/stacktrace.h b/arch/s390/include/asm/stacktrace.h index 4aefbe32265d..85b6738b826a 100644 --- a/arch/s390/include/asm/stacktrace.h +++ b/arch/s390/include/asm/stacktrace.h @@ -13,6 +13,11 @@ struct stack_frame_user { unsigned long empty2[4]; }; +struct stack_frame_vdso_wrapper { + struct stack_frame_user sf; + unsigned long return_address; +}; + struct perf_callchain_entry_ctx; void arch_stack_walk_user_common(stack_trace_consume_fn consume_entry, void *cookie, -- cgit v1.2.3