diff options
author | Ard Biesheuvel <ardb@kernel.org> | 2021-10-15 17:27:09 +0300 |
---|---|---|
committer | Ard Biesheuvel <ardb@kernel.org> | 2021-12-03 17:11:31 +0300 |
commit | eae9523fdd7a6c592e80666681962acbd913cda2 (patch) | |
tree | 16e293d6b1d12f0e5253407adc48d36c93547068 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | 4ab6827081c63b83011a18d8e27f621ed34b1194 (diff) | |
download | linux-eae9523fdd7a6c592e80666681962acbd913cda2.tar.xz |
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
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions