Re: [1/5][AArch64] Return address protection on AArch64

2017-01-20 Thread Richard Earnshaw (lists)
On 20/01/17 18:30, Jiong Wang wrote: > > On 20/01/17 18:23, Jiong Wang wrote: >> >> OK, the attached patch disable the building of pointer signing code in >> libgcc >> on ILP32 mode, except the macro bit RA_A_SIGNED_BIT is still defined as I >> want to book this bit for ILP32 as LP64 in case we la

Re: [1/5][AArch64] Return address protection on AArch64

2017-01-20 Thread Jiong Wang
On 20/01/17 18:23, Jiong Wang wrote: OK, the attached patch disable the building of pointer signing code in libgcc on ILP32 mode, except the macro bit RA_A_SIGNED_BIT is still defined as I want to book this bit for ILP32 as LP64 in case we later enable ILP32 support. All pauth builtins are

Re: [1/5][AArch64] Return address protection on AArch64

2017-01-20 Thread Jiong Wang
Here is the patch. For XPACLRI builtin which drops the signature in a pointer, it's prototype is "void *foo (void *)" FOR PAC/AUT builtin which sign or authenticate a pointer, it's prototype is "void *foo (void *, uint64)". This patch adjusted those modes to make sure they strictly follow the

Re: [1/5][AArch64] Return address protection on AArch64

2017-01-20 Thread Richard Earnshaw (lists)
On 20/01/17 12:36, Jiong Wang wrote: > > > On 20/01/17 11:15, Jiong Wang wrote: >> >> >> On 20/01/17 03:39, Andrew Pinski wrote: >>> On Fri, Jan 6, 2017 at 3:47 AM, Jiong Wang >>> wrote: On 11/11/16 18:22, Jiong Wang wrote: > As described in the cover letter, this patch implements retur

Re: [1/5][AArch64] Return address protection on AArch64

2017-01-20 Thread Jiong Wang
On 20/01/17 11:15, Jiong Wang wrote: On 20/01/17 03:39, Andrew Pinski wrote: On Fri, Jan 6, 2017 at 3:47 AM, Jiong Wang wrote: On 11/11/16 18:22, Jiong Wang wrote: As described in the cover letter, this patch implements return address signing for AArch64, it's controlled by the new option

Re: [1/5][AArch64] Return address protection on AArch64

2017-01-20 Thread Jiong Wang
On 20/01/17 03:39, Andrew Pinski wrote: On Fri, Jan 6, 2017 at 3:47 AM, Jiong Wang wrote: On 11/11/16 18:22, Jiong Wang wrote: As described in the cover letter, this patch implements return address signing for AArch64, it's controlled by the new option: -msign-return-address=[none | non

Re: [1/5][AArch64] Return address protection on AArch64

2017-01-19 Thread Andrew Pinski
On Fri, Jan 6, 2017 at 3:47 AM, Jiong Wang wrote: > On 11/11/16 18:22, Jiong Wang wrote: >> >> As described in the cover letter, this patch implements return address >> signing >> for AArch64, it's controlled by the new option: >> >>-msign-return-address=[none | non-leaf | all] >> >> "none" me

Re: [1/5][AArch64] Return address protection on AArch64

2017-01-16 Thread James Greenhalgh
On Fri, Jan 13, 2017 at 05:05:43PM +, Jiong Wang wrote: > On 13/01/17 16:04, James Greenhalgh wrote: > >On Fri, Jan 06, 2017 at 11:47:07AM +, Jiong Wang wrote: > >>On 11/11/16 18:22, Jiong Wang wrote: > >>gcc/ > >>2017-01-06 Jiong Wang > >> > >> * config/aarch64/aarch64-opts.h (a

Re: [1/5][AArch64] Return address protection on AArch64

2017-01-13 Thread Jiong Wang
On 13/01/17 16:04, James Greenhalgh wrote: On Fri, Jan 06, 2017 at 11:47:07AM +, Jiong Wang wrote: On 11/11/16 18:22, Jiong Wang wrote: gcc/ 2017-01-06 Jiong Wang * config/aarch64/aarch64-opts.h (aarch64_function_type): New enum. * config/aarch64/aarch64-protos.h

Re: [1/5][AArch64] Return address protection on AArch64

2017-01-13 Thread James Greenhalgh
On Fri, Jan 06, 2017 at 11:47:07AM +, Jiong Wang wrote: > On 11/11/16 18:22, Jiong Wang wrote: > gcc/ > 2017-01-06 Jiong Wang > > * config/aarch64/aarch64-opts.h (aarch64_function_type): New enum. > * config/aarch64/aarch64-protos.h > (aarch64_return_address_signing_

[1/5][AArch64] Return address protection on AArch64

2017-01-06 Thread Jiong Wang
On 11/11/16 18:22, Jiong Wang wrote: As described in the cover letter, this patch implements return address signing for AArch64, it's controlled by the new option: -msign-return-address=[none | non-leaf | all] "none" means don't do return address signing at all on any function. "non-leaf" m