Ard Biesheuvel eae9523fdd ARM: backtrace-clang: avoid crash on bogus frame pointer
The Clang backtrace code dereferences the link register value pulled
from the stack to decide whether the caller was a branch-and-link
instruction, in order to subsequently decode the offset to find the
start of the calling function. Unlike other loads in this routine, this
one is not protected by a fixup, and may therefore cause a crash if the
address in question is bogus.

So let's fix this, by treating the fault as a failure to decode the 'bl'
instruction. To avoid a label renum, reuse a fixup label that guards an
instruction that cannot fault to begin with.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Tested-by: Marc Zyngier <maz@kernel.org>
Tested-by: Vladimir Murzin <vladimir.murzin@arm.com> # ARMv7M
2021-12-03 15:11:31 +01:00
..
2021-11-13 10:01:10 -08:00
2021-11-10 11:22:03 -08:00
2021-11-08 09:15:45 -08:00
2021-11-10 11:22:03 -08:00
2021-11-11 14:22:05 -08:00
2021-11-14 11:11:51 -08:00
2021-11-10 11:22:03 -08:00
2021-11-14 11:37:49 -08:00
2021-11-01 20:05:19 -07:00