]> www.infradead.org Git - users/jedix/linux-maple.git/commit
s390/ftrace: Use unwinder instead of __builtin_return_address()
authorSven Schnelle <svens@linux.ibm.com>
Fri, 26 Apr 2024 10:02:15 +0000 (12:02 +0200)
committerAlexander Gordeev <agordeev@linux.ibm.com>
Mon, 29 Apr 2024 15:33:30 +0000 (17:33 +0200)
commitcae74ba8c295bc41bda749ef27a8f2b3ee957a41
treef0a40f42f5d33e824881c623708f8ad9ad76da56
parent9679fec2cad447d70f32142c194f2d1c8544717c
s390/ftrace: Use unwinder instead of __builtin_return_address()

Using __builtin_return_address(n) might return undefined values
when used with values of n outside of the stack. This was noticed
when __builtin_return_address() was called in ftrace on top level
functions like the interrupt handlers.

As this behaviour cannot be fixed, use the s390 stack unwinder and
remove the ftrace compilation flags for unwind_bc.c and stacktrace.c
to prevent the unwinding function polluting function traces.

Another advantage is that this also works with clang.

Reviewed-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Sven Schnelle <svens@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
arch/s390/include/asm/ftrace.h
arch/s390/kernel/Makefile
arch/s390/kernel/stacktrace.c