Re: [PATCH][AArch64] PR92424: Fix -fpatchable-function-entry=N,M with BTI

2020-01-21 Thread Szabolcs Nagy
On 21/01/2020 17:51, Fāng-ruì Sòng via gcc-patches wrote: > The Clang inconvenience is in the other way... > > (My previous Clang patch series do not implement M>0. >  https://reviews.llvm.org/D73070 will add support for M>0.) > > AsmPrinter (assembly printer/object file emitter) does the followi

Re: [PATCH][AArch64] PR92424: Fix -fpatchable-function-entry=N,M with BTI

2020-01-21 Thread Fāng-ruì Sòng via gcc-patches
On 2020-01-21, Szabolcs Nagy wrote: On 21/01/2020 11:34, Mark Rutland wrote: Hi Szabolcs, Answers from a linux dev perspective below. thanks. On Mon, Jan 20, 2020 at 10:53:33AM +, Szabolcs Nagy wrote: i have to ask some linux developers which way they prefer: e.g. -fpatchable-function

Re: [PATCH][AArch64] PR92424: Fix -fpatchable-function-entry=N,M with BTI

2020-01-21 Thread Szabolcs Nagy
On 21/01/2020 11:34, Mark Rutland wrote: > Hi Szabolcs, > > Answers from a linux dev perspective below. thanks. > On Mon, Jan 20, 2020 at 10:53:33AM +, Szabolcs Nagy wrote: >> i have to ask some linux developers which way they prefer: >> >> e.g. -fpatchable-function-entry=3,1 is >> >> .sect

Re: [PATCH][AArch64] PR92424: Fix -fpatchable-function-entry=N,M with BTI

2020-01-21 Thread Mark Rutland
Hi Szabolcs, Answers from a linux dev perspective below. On Mon, Jan 20, 2020 at 10:53:33AM +, Szabolcs Nagy wrote: > On 19/01/2020 08:53, Fāng-ruì Sòng via gcc-patches wrote: > > It'd be great to have some tests, e.g. > > > > 1. -fpatchable-function-entry=0 -mbranch-protection=bti > > 2. -f

Re: [PATCH][AArch64] PR92424: Fix -fpatchable-function-entry=N,M with BTI

2020-01-20 Thread Szabolcs Nagy
On 19/01/2020 08:53, Fāng-ruì Sòng via gcc-patches wrote: > It'd be great to have some tests, e.g. > > 1. -fpatchable-function-entry=0 -mbranch-protection=bti > 2. -fpatchable-function-entry=2 -mbranch-protection=bti > > I have updated clang to emit   `.Lfunc_begin0: bti c; nop; nop` for case 2.

Re: [PATCH][AArch64] PR92424: Fix -fpatchable-function-entry=N,M with BTI

2020-01-19 Thread Fāng-ruì Sòng via gcc-patches
On 2020-01-19, Fāng-ruì Sòng wrote: On 2020-01-16, Richard Sandiford wrote: Szabolcs Nagy writes: this affects the linux kernel and technically a wrong code bug so this fix tries to be backportable (fixing all issues with -fpatchable-function-entry=N,M will likely require new option). Even f

Re: [PATCH][AArch64] PR92424: Fix -fpatchable-function-entry=N,M with BTI

2020-01-19 Thread Fāng-ruì Sòng via gcc-patches
On 2020-01-16, Richard Sandiford wrote: Szabolcs Nagy writes: this affects the linux kernel and technically a wrong code bug so this fix tries to be backportable (fixing all issues with -fpatchable-function-entry=N,M will likely require new option). Even for the backportable version, I think

Re: [PATCH][AArch64] PR92424: Fix -fpatchable-function-entry=N,M with BTI

2020-01-16 Thread Richard Sandiford
Szabolcs Nagy writes: > this affects the linux kernel and technically a wrong code bug > so this fix tries to be backportable (fixing all issues with > -fpatchable-function-entry=N,M will likely require new option). Even for the backportable version, I think it would be better not to duplicate so