Matthew Malcomson <matthew.malcom...@arm.com> writes: > On 23/06/2020 16:48, Richard Sandiford wrote: >> Matthew Malcomson <matthew.malcom...@arm.com> writes: >>> @@ -14466,6 +14466,81 @@ aarch64_validate_mcpu (const char *str, const >>> struct processor **res, >>> return false; >>> mfix-cortex-a53-835769 >>> Target Report Var(aarch64_fix_a53_err835769) Init(2) Save >>> Workaround for ARM Cortex-A53 Erratum number 835769. >>> diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi >>> index >>> 35e8242af5fa4c52744fd2c3e2cfee0a617e22bb..8a3fab2964c9bb06c820766d284768751d63ac9a >>> 100644 >>> --- a/gcc/doc/invoke.texi >>> +++ b/gcc/doc/invoke.texi >>> @@ -696,6 +696,7 @@ Objective-C and Objective-C++ Dialects}. >>> -msign-return-address=@var{scope} @gol >>> -mbranch-protection=@var{none}|@var{standard}|@var{pac-ret}[+@var{leaf} >>> +@var{b-key}]|@var{bti} @gol >>> +-mharden-sls=@var{none}|@var{all}|@var{retbr}|@var{blr} @gol >>> -march=@var{name} -mcpu=@var{name} -mtune=@var{name} @gol >>> -moverride=@var{string} -mverbose-cost-dump @gol >>> -mstack-protector-guard=@var{guard} >>> -mstack-protector-guard-reg=@var{sysreg} @gol >>> @@ -17045,6 +17046,15 @@ functions. The optional argument @samp{b-key} can >>> be used to sign the functions >>> with the B-key instead of the A-key. >>> @samp{bti} turns on branch target identification mechanism. >>> >>> +@item -mharden-sls=@var{none}|@var{all}|@var{retbr}|@var{blr} >>> +@opindex mharden-sls >>> +Enable compiler hardening against straight line speculation (SLS). >>> +There are two options for hardening against straight line speculation. >>> +@samp{retbr} allows inserting speculation barriers after every >>> +@samp{br} and @samp{ret} instruction. While @samp{blr} enables replacing >>> +@samp{blr} instructions with a @samp{bl} to a function stub. >>> +@samp{all} enables all SLS hardening, while @samp{none} does not enable >>> any. >> >> OK, so this is even more picky, sorry, but the syntax and description >> imply to me that you can choose only one of the four options. I think >> it would be more accurate to say something like: >> >> @item -mharden-sls=@var{opts} >> @opindex mharden-sls >> Enable compiler hardening against straight line speculation (SLS). >> @var{opts} is a comma-separated list of the following options: >> @table @samp >> @item retbr >> … >> @item blr >> … >> @end table >> In addition, @samp{-mharden-sls=all} enables all SLS hardening >> while @samp{-mharden-sls=none} disables all SLS hardening. >> >> (assuming the above behaviour change for “none”) >> >> Thanks, >> Richard >> > > Another "just to check": the same change should be made in the short > form right? (i.e. the hunk above is now `-mharden-sls=@var{opts}`)
Yeah.