Richard, Thank you!
> On Sep 10, 2020, at 7:11 AM, Richard Sandiford <richard.sandif...@arm.com> > wrote: > > Patrick McGehearty via Gcc-patches <gcc-patches@gcc.gnu.org> writes: >> My understanding is this feature/flag is not intended to be "default on". >> It is intended to be used in security sensitive environments such >> as the Linux kernel where it was requested by kernel security experts. >> I'm not understanding the objection here if the feature is requested >> by security teams and the average cost is modest. > > Agreed. And of course, “is modest” here means “is modest in the eyes > of the people who want to use it”. > > IMO it's been established at this point that the feature is useful > enough to some people. It might be too expensive for others, > but that's OK. > > I've kind-of lost track of where we stand given all the subthreads. > If we've now decided which suboptions we want to support, From the performance data, we saw that clearing ALL registers cost too much more without any additional benefit, so, I’d like to delete all those sub-options including “ALL”, i.e, all-arg, all-gpr, all. Now, the option will be: -fzero-call-used-regs=skip|gpr-arg|all-arg|gpr|all Add -fzero-call-used-regs=[skip|gpr-arg|all-arg|gpr|all] command-line option and zero_call_used_regs("skip|gpr-arg|all-arg|gpr|all") function attribues: 1. -mzero-call-used-regs=skip and zero_call_used_regs("skip") Don't zero call-used registers upon function return. This is the default behavior. 2. -mzero-call-used-regs=gpr-arg and zero_call_used_regs("gpr-arg") Upon function return, zero call-used general purpose registers that are used in the routine and might pass parameters. 3. -mzero-call-used-regs=used-arg and zero_call_used_regs(“all-arg") Upon function return, zero call-used registers that are used in the routine and might pass parameters. 4. -mzero-call-used-regs=used-gpr and zero_call_used_regs("gpr") Upon function return, zero call-used general purpose registers that are used in the routine. 5. -mzero-call-used-regs=used and zero_call_used_regs(“all") Upon function return, zero call-used registers that are used in the routine. Let me know any objection or comment. > would it > make sense to start a new thread with the current patch, and then > just concentrate on code review for that subthread? I will start the new thread after my new patch is ready. Thanks again. Qing > > Thanks, > Richard