[PATCH v2] arm64/bti: Disable in kernel BTI when cross section thunks are broken
Will Deacon
will at kernel.org
Tue Sep 6 05:17:21 PDT 2022
On Mon, 5 Sep 2022 15:22:55 +0100, Mark Brown wrote:
> GCC does not insert a `bti c` instruction at the beginning of a function
> when it believes that all callers reach the function through a direct
> branch[1]. Unfortunately the logic it uses to determine this is not
> sufficiently robust, for example not taking account of functions being
> placed in different sections which may be loaded separately, so we may
> still see thunks being generated to these functions. If that happens,
> the first instruction in the callee function will result in a Branch
> Target Exception due to the missing landing pad.
>
> [...]
Applied to arm64 (for-next/fixes), thanks!
[1/1] arm64/bti: Disable in kernel BTI when cross section thunks are broken
https://git.kernel.org/arm64/c/c0a454b9044f
Cheers,
--
Will
https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev
More information about the linux-arm-kernel
mailing list