OSDN Git Service

ARM: unwind: support unwinding across multiple stacks
authorArd Biesheuvel <ardb@kernel.org>
Tue, 5 Oct 2021 07:15:37 +0000 (09:15 +0200)
committerArd Biesheuvel <ardb@kernel.org>
Fri, 3 Dec 2021 14:11:31 +0000 (15:11 +0100)
commitb6506981f880de87a069167de85935f583a95fc1
tree0e515f538c5413a9a865fcc25564658630b30703
parentb3ab60b1794c20fe7033d2c8f7dcdef87ada1a23
ARM: unwind: support unwinding across multiple stacks

Implement support in the unwinder for dealing with multiple stacks.
This will be needed once we add support for IRQ stacks, or for the
overflow stack used by the vmap'ed stacks code.

This involves tracking the unwind opcodes that either update the virtual
stack pointer from another virtual register, or perform an explicit
subtract on the virtual stack pointer, and updating the low and high
bounds that we use to sanitize the stack pointer accordingly.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Tested-by: Keith Packard <keithpac@amazon.com>
Tested-by: Marc Zyngier <maz@kernel.org>
Tested-by: Vladimir Murzin <vladimir.murzin@arm.com> # ARMv7M
arch/arm/kernel/unwind.c