s390/stackstrace: Detect vdso stack frames
authorHeiko Carstens <hca@linux.ibm.com>
Mon, 29 Apr 2024 12:28:48 +0000 (14:28 +0200)
committerAlexander Gordeev <agordeev@linux.ibm.com>
Tue, 14 May 2024 11:37:07 +0000 (13:37 +0200)
commit62b672c4ba90e726cc39b5c3d6dffd1ca817e143
tree897868b63b1b6ae04a48a9f002bf25e830fb1056
parentbe72ea09c1a5273abf8c6c52ef53e36c701cbf6a
s390/stackstrace: Detect vdso stack frames

Clear the backchain of the extra stack frame added by the vdso user wrapper
code. This allows the user stack walker to detect and skip the non-standard
stack frame. Without this an incorrect instruction pointer would be added
to stack traces, and stack frame walking would be continued with a more or
less random back chain.

Fixes: aa44433ac4ee ("s390: add USER_STACKTRACE support")
Reviewed-by: Jens Remus <jremus@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
arch/s390/include/asm/processor.h
arch/s390/kernel/asm-offsets.c
arch/s390/kernel/stacktrace.c
arch/s390/kernel/vdso.c
arch/s390/kernel/vdso64/vdso_user_wrapper.S