lkml.org 
[lkml]   [2021]   [Oct]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH 2/4] arm64: implement support for static call trampolines
Date
From: Mark Rutland
> Sent: 26 October 2021 11:37
...
> My preference overall is to keep the trampoline self-contained, and I'd
> prefer to keep the RET inline in the trampoline rather than trying to
> factor it out so that all the control-flow is clearly in one place.
>
> So I'd prefer that we have the sequence as-is:
>
> | 0: .quad 0x0
> | bti c
> | < insn >
> | ldr x16, 0b
> | cbz x16, 1f
> | br x16
> | 1: ret

What is wrong with:
0: .quad 1f
bti c
< insn >
ldr x16, 0b
br x16
1: bti c
ret

Self-contained and reasonably easy to read.

David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)

\
 
 \ /
  Last update: 2021-10-26 13:07    [W:0.073 / U:0.344 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site