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: NArd Biesheuvel <ardb@kernel.org> Reviewed-by: NNick Desaulniers <ndesaulniers@google.com> Tested-by: NMarc Zyngier <maz@kernel.org> Tested-by: Vladimir Murzin <vladimir.murzin@arm.com> # ARMv7M
Showing
想要评论请 注册 或 登录