Re: [PATCH][middle-end][i386][version 5]Add -fzero-call-used-regs=[skip|used-gpr-arg|used-arg|all-gpr-arg|all-arg|used-gpr|all-gpr|used|all]

2020-10-29 Thread Qing Zhao via Gcc-patches
Hi, Segher, > On Oct 29, 2020, at 2:31 PM, Segher Boessenkool > wrote: > > On Thu, Oct 29, 2020 at 06:02:58PM +, Richard Sandiford wrote: >> Qing Zhao via Gcc-patches writes: > +Return-Oriented Programming (ROP) or preventing information leak leakage (FWIW, I'm

Re: [PATCH][middle-end][i386][version 5]Add -fzero-call-used-regs=[skip|used-gpr-arg|used-arg|all-gpr-arg|all-arg|used-gpr|all-gpr|used|all]

2020-10-29 Thread Qing Zhao via Gcc-patches
> On Oct 29, 2020, at 1:06 PM, Richard Sandiford > wrote: > > Qing Zhao writes: >> Now, the documentation (gcc.info) is like following, let me know any issue >> there: > > Yeah, looks good apart from merging > >> In order to satisfy users with different security needs and control >>

Re: [PATCH][middle-end][i386][version 5]Add -fzero-call-used-regs=[skip|used-gpr-arg|used-arg|all-gpr-arg|all-arg|used-gpr|all-gpr|used|all]

2020-10-29 Thread Qing Zhao via Gcc-patches
> On Oct 29, 2020, at 1:02 PM, Richard Sandiford > wrote: > > Qing Zhao via Gcc-patches writes: +Return-Oriented Programming (ROP) or preventing information leak >>> >>> leakage >>> >>> (FWIW, I'm not sure “mitigating ROP” is really correct usage, but I don't >>> have any better

Re: [PATCH][middle-end][i386][version 5]Add -fzero-call-used-regs=[skip|used-gpr-arg|used-arg|all-gpr-arg|all-arg|used-gpr|all-gpr|used|all]

2020-10-29 Thread Segher Boessenkool
On Thu, Oct 29, 2020 at 06:02:58PM +, Richard Sandiford wrote: > Qing Zhao via Gcc-patches writes: > >>> +Return-Oriented Programming (ROP) or preventing information leak > >> > >> leakage > >> > >> (FWIW, I'm not sure “mitigating ROP” is really correct usage, but I don't > >> have any

Re: [PATCH][middle-end][i386][version 5]Add -fzero-call-used-regs=[skip|used-gpr-arg|used-arg|all-gpr-arg|all-arg|used-gpr|all-gpr|used|all]

2020-10-29 Thread Richard Sandiford via Gcc-patches
Qing Zhao writes: > Now, the documentation (gcc.info) is like following, let me know any issue > there: Yeah, looks good apart from merging > In order to satisfy users with different security needs and control > the run-time overhead at the same time, CHOICE parameter provides a >

Re: [PATCH][middle-end][i386][version 5]Add -fzero-call-used-regs=[skip|used-gpr-arg|used-arg|all-gpr-arg|all-arg|used-gpr|all-gpr|used|all]

2020-10-29 Thread Richard Sandiford via Gcc-patches
Qing Zhao via Gcc-patches writes: >>> +Return-Oriented Programming (ROP) or preventing information leak >> >> leakage >> >> (FWIW, I'm not sure “mitigating ROP” is really correct usage, but I don't >> have any better suggestions.) > > Do you mean whether “mitigating ROP’ is one of the major

Re: [PATCH][middle-end][i386][version 5]Add -fzero-call-used-regs=[skip|used-gpr-arg|used-arg|all-gpr-arg|all-arg|used-gpr|all-gpr|used|all]

2020-10-29 Thread Qing Zhao via Gcc-patches
Hi, Richard, Now, the documentation (gcc.info) is like following, let me know any issue there: thanks. Qing == 'zero_call_used_regs ("CHOICE")' The 'zero_call_used_regs' attribute causes the compiler to zero a subset of all call-used registers(1) at function return.

Re: [PATCH][middle-end][i386][version 5]Add -fzero-call-used-regs=[skip|used-gpr-arg|used-arg|all-gpr-arg|all-arg|used-gpr|all-gpr|used|all]

2020-10-29 Thread Qing Zhao via Gcc-patches
> On Oct 29, 2020, at 6:09 AM, Richard Sandiford > wrote: > > Qing Zhao via Gcc-patches writes: >> +/* Handle a "zero_call_used_regs" attribute; arguments as in >> + struct attribute_spec.handler. */ >> + >> +static tree >> +handle_zero_call_used_regs_attribute (tree *node, tree name,

Re: [PATCH][middle-end][i386][version 5]Add -fzero-call-used-regs=[skip|used-gpr-arg|used-arg|all-gpr-arg|all-arg|used-gpr|all-gpr|used|all]

2020-10-29 Thread Richard Sandiford via Gcc-patches
Qing Zhao via Gcc-patches writes: > +/* Handle a "zero_call_used_regs" attribute; arguments as in > + struct attribute_spec.handler. */ > + > +static tree > +handle_zero_call_used_regs_attribute (tree *node, tree name, tree args, > + int ARG_UNUSED (flags), >

Re: [PATCH][middle-end][i386][version 5]Add -fzero-call-used-regs=[skip|used-gpr-arg|used-arg|all-gpr-arg|all-arg|used-gpr|all-gpr|used|all]

2020-10-29 Thread Uros Bizjak via Gcc-patches
On Thu, Oct 29, 2020 at 12:55 AM Qing Zhao wrote: > > Hi, > > This is the 5th version of the implementation of patch -fzero-call-used-regs. > > The major change compared to the previous version (4th version) are: > > 1. Documentation change per Richard’s suggestion; > 2. Use namespace for

[PATCH][middle-end][i386][version 5]Add -fzero-call-used-regs=[skip|used-gpr-arg|used-arg|all-gpr-arg|all-arg|used-gpr|all-gpr|used|all]

2020-10-28 Thread Qing Zhao via Gcc-patches
Hi, This is the 5th version of the implementation of patch -fzero-call-used-regs. The major change compared to the previous version (4th version) are: 1. Documentation change per Richard’s suggestion; 2. Use namespace for zero_regs_code; 3. Add more general testing cases per Richard’s