]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: call_with_stack: add unwind support
authorArd Biesheuvel <ardb@kernel.org>
Tue, 5 Oct 2021 07:15:41 +0000 (09:15 +0200)
committerArd Biesheuvel <ardb@kernel.org>
Fri, 3 Dec 2021 14:11:32 +0000 (15:11 +0100)
commit2256ecf0722de6dd99996c8871af28a9fd2be826
treec923513a548ab3f8baf852fd639d8d965e45eaaf
parentc784fe3307e12c46cfa182af65ef1cb924ffaee9
ARM: call_with_stack: add unwind support

Restructure the code and add the unwind annotations so that both the
frame pointer unwinder as well as the EHABI unwind info based unwinder
will be able to follow the call stack through call_with_stack().

Since GCC and Clang use different formats for the stack frame, two
methods are implemented: a GCC version that pushes fp, sp, lr and pc for
compatibility with the frame pointer unwinder, and a second version that
works with Clang, as well as with the EHABI unwinder both in ARM and
Thumb2 modes.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Tested-by: Keith Packard <keithpac@amazon.com>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Tested-by: Marc Zyngier <maz@kernel.org>
Tested-by: Vladimir Murzin <vladimir.murzin@arm.com> # ARMv7M
arch/arm/lib/call_with_stack.S