[PATCH] arm64: Don't insert a BTI instruction at inner labels

Mark Brown broonie at kernel.org
Wed Jun 24 09:21:14 EDT 2020

On Wed, Jun 24, 2020 at 01:22:54PM +0200, Jean-Philippe Brucker wrote:

> It turns out we don't currently need the BTI landing pads inserted by

> * ftrace_call and ftrace_graph_call are only used for runtime patching
>   of the active tracer. The patched code is not reached from a branch.
> * install_el2_stub is reached from a CBZ instruction, which doesn't
>   change PSTATE.BTYPE.
> * __guest_exit is reached from B instructions in the hyp-entry vectors,
>   which aren't subject to BTI checks either.

> Remove the BTI annotation from SYM_INNER_LABEL.

This fixes things for now but it feels like it's going to be fragile in
the long run since inner labels are a bit of a wild west in terms of how
they're going to be referenced - I can't think of a better solution at
this level though :(

Reviewed-by: Mark Brown <broonie at kernel.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20200624/2adf7403/attachment.sig>

More information about the linux-arm-kernel mailing list