diff mbox series

INSTALL: Default to --enable-cet=auto

Message ID 20201127134211.1808714-1-hjl.tools@gmail.com
State New
Headers show
Series INSTALL: Default to --enable-cet=auto | expand

Commit Message

H.J. Lu Nov. 27, 2020, 1:42 p.m. UTC
PR other/98027
	* doc/install: Default to --enable-cet=auto.
---
 gcc/doc/install.texi | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

Comments

Richard Biener Nov. 27, 2020, 2:24 p.m. UTC | #1
OK.

On Fri, 27 Nov 2020, H.J. Lu wrote:

> 	PR other/98027
> 	* doc/install: Default to --enable-cet=auto.
> ---
>  gcc/doc/install.texi | 9 ++++-----
>  1 file changed, 4 insertions(+), 5 deletions(-)
> 
> diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi
> index 5f879ca4cea..021c347cc09 100644
> --- a/gcc/doc/install.texi
> +++ b/gcc/doc/install.texi
> @@ -2259,11 +2259,10 @@ instrumentation, see @option{-fcf-protection} option.  When
>  to add @option{-fcf-protection} and, if needed, other target
>  specific options to a set of building options.
>  
> -The option is disabled by default.  When @code{--enable-cet=auto}
> -is used, it is enabled on Linux/x86 if target binutils
> -supports @code{Intel CET} instructions and disabled otherwise.
> -In this case the target libraries are configured to get additional
> -@option{-fcf-protection} option.
> +@code{--enable-cet=auto} is default.  CET is enabled on Linux/x86 if
> +target binutils supports @code{Intel CET} instructions and disabled
> +otherwise.  In this case, the target libraries are configured to get
> +additional @option{-fcf-protection} option.
>  
>  @item --with-riscv-attribute=@samp{yes}, @samp{no} or @samp{default}
>  Generate RISC-V attribute by default, in order to record extra build
>
H.J. Lu Nov. 27, 2020, 2:54 p.m. UTC | #2
On Fri, Nov 27, 2020 at 6:24 AM Richard Biener <rguenther@suse.de> wrote:
>
> OK.
>
> On Fri, 27 Nov 2020, H.J. Lu wrote:
>
> >       PR other/98027
> >       * doc/install: Default to --enable-cet=auto.
> > ---
> >  gcc/doc/install.texi | 9 ++++-----
> >  1 file changed, 4 insertions(+), 5 deletions(-)
> >
> > diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi
> > index 5f879ca4cea..021c347cc09 100644
> > --- a/gcc/doc/install.texi
> > +++ b/gcc/doc/install.texi
> > @@ -2259,11 +2259,10 @@ instrumentation, see @option{-fcf-protection} option.  When
> >  to add @option{-fcf-protection} and, if needed, other target
> >  specific options to a set of building options.
> >
> > -The option is disabled by default.  When @code{--enable-cet=auto}
> > -is used, it is enabled on Linux/x86 if target binutils
> > -supports @code{Intel CET} instructions and disabled otherwise.
> > -In this case the target libraries are configured to get additional
> > -@option{-fcf-protection} option.
> > +@code{--enable-cet=auto} is default.  CET is enabled on Linux/x86 if
> > +target binutils supports @code{Intel CET} instructions and disabled
> > +otherwise.  In this case, the target libraries are configured to get
> > +additional @option{-fcf-protection} option.
> >
> >  @item --with-riscv-attribute=@samp{yes}, @samp{no} or @samp{default}
> >  Generate RISC-V attribute by default, in order to record extra build
> >
>

OK for backport to GCC 10?
Gerald Pfeifer Nov. 27, 2020, 4:22 p.m. UTC | #3
On Fri, 27 Nov 2020, H.J. Lu via Gcc-patches wrote:
> +@code{--enable-cet=auto} is default.  CET is enabled on Linux/x86 if
> +target binutils supports @code{Intel CET} instructions and disabled
> +otherwise.  In this case, the target libraries are configured to get
> +additional @option{-fcf-protection} option.

Does that refer to the Linux kernel or GNU/Linux?

THe last sentence does not appear complete.  What do you want to say?

"...target libraries are built with @option{-fcf-protection}"?

On Fri, 27 Nov 2020, H.J. Lu via Gcc-patches wrote:
> OK for backport to GCC 10?

Yes, once we have resolved the above.

Gerald
H.J. Lu Nov. 27, 2020, 6:34 p.m. UTC | #4
On Fri, Nov 27, 2020 at 8:22 AM Gerald Pfeifer <gerald@pfeifer.com> wrote:
>
> On Fri, 27 Nov 2020, H.J. Lu via Gcc-patches wrote:
> > +@code{--enable-cet=auto} is default.  CET is enabled on Linux/x86 if
> > +target binutils supports @code{Intel CET} instructions and disabled
> > +otherwise.  In this case, the target libraries are configured to get
> > +additional @option{-fcf-protection} option.
>
> Does that refer to the Linux kernel or GNU/Linux?
>
> THe last sentence does not appear complete.  What do you want to say?
>
> "...target libraries are built with @option{-fcf-protection}"?

The new wording is

---
@code{--enable-cet=auto} is default.  CET is enabled on Linux/x86 if
target binutils supports @code{Intel CET} instructions and disabled
otherwise.  In this case, the target libraries are configured to get
additional @option{-fcf-protection} option.
---

On Linux/x86, if binutils supports CET, target libraries will be compiled
with -fcf-protection}.

> On Fri, 27 Nov 2020, H.J. Lu via Gcc-patches wrote:
> > OK for backport to GCC 10?
>
> Yes, once we have resolved the above.
>
> Gerald
Matthias Klose Nov. 27, 2020, 7:01 p.m. UTC | #5
On 11/27/20 3:54 PM, H.J. Lu via Gcc-patches wrote:
> On Fri, Nov 27, 2020 at 6:24 AM Richard Biener <rguenther@suse.de> wrote:
>>
>> OK.
>>
>> On Fri, 27 Nov 2020, H.J. Lu wrote:
>>
>>>       PR other/98027
>>>       * doc/install: Default to --enable-cet=auto.
>>> ---
>>>  gcc/doc/install.texi | 9 ++++-----
>>>  1 file changed, 4 insertions(+), 5 deletions(-)
>>>
>>> diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi
>>> index 5f879ca4cea..021c347cc09 100644
>>> --- a/gcc/doc/install.texi
>>> +++ b/gcc/doc/install.texi
>>> @@ -2259,11 +2259,10 @@ instrumentation, see @option{-fcf-protection} option.  When
>>>  to add @option{-fcf-protection} and, if needed, other target
>>>  specific options to a set of building options.
>>>
>>> -The option is disabled by default.  When @code{--enable-cet=auto}
>>> -is used, it is enabled on Linux/x86 if target binutils
>>> -supports @code{Intel CET} instructions and disabled otherwise.
>>> -In this case the target libraries are configured to get additional
>>> -@option{-fcf-protection} option.
>>> +@code{--enable-cet=auto} is default.  CET is enabled on Linux/x86 if
>>> +target binutils supports @code{Intel CET} instructions and disabled
>>> +otherwise.  In this case, the target libraries are configured to get
>>> +additional @option{-fcf-protection} option.
>>>
>>>  @item --with-riscv-attribute=@samp{yes}, @samp{no} or @samp{default}
>>>  Generate RISC-V attribute by default, in order to record extra build
>>>
>>
> 
> OK for backport to GCC 10?

I only found that because of failing package builds in a test rebuild. See
PR98025. Is it safe to backport that, if it breaks the ABI of a runtime library
shipped with GCC 10?

Matthias
H.J. Lu Nov. 27, 2020, 7:28 p.m. UTC | #6
On Fri, Nov 27, 2020 at 11:02 AM Matthias Klose <doko@ubuntu.com> wrote:
>
> On 11/27/20 3:54 PM, H.J. Lu via Gcc-patches wrote:
> > On Fri, Nov 27, 2020 at 6:24 AM Richard Biener <rguenther@suse.de> wrote:
> >>
> >> OK.
> >>
> >> On Fri, 27 Nov 2020, H.J. Lu wrote:
> >>
> >>>       PR other/98027
> >>>       * doc/install: Default to --enable-cet=auto.
> >>> ---
> >>>  gcc/doc/install.texi | 9 ++++-----
> >>>  1 file changed, 4 insertions(+), 5 deletions(-)
> >>>
> >>> diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi
> >>> index 5f879ca4cea..021c347cc09 100644
> >>> --- a/gcc/doc/install.texi
> >>> +++ b/gcc/doc/install.texi
> >>> @@ -2259,11 +2259,10 @@ instrumentation, see @option{-fcf-protection} option.  When
> >>>  to add @option{-fcf-protection} and, if needed, other target
> >>>  specific options to a set of building options.
> >>>
> >>> -The option is disabled by default.  When @code{--enable-cet=auto}
> >>> -is used, it is enabled on Linux/x86 if target binutils
> >>> -supports @code{Intel CET} instructions and disabled otherwise.
> >>> -In this case the target libraries are configured to get additional
> >>> -@option{-fcf-protection} option.
> >>> +@code{--enable-cet=auto} is default.  CET is enabled on Linux/x86 if
> >>> +target binutils supports @code{Intel CET} instructions and disabled
> >>> +otherwise.  In this case, the target libraries are configured to get
> >>> +additional @option{-fcf-protection} option.
> >>>
> >>>  @item --with-riscv-attribute=@samp{yes}, @samp{no} or @samp{default}
> >>>  Generate RISC-V attribute by default, in order to record extra build
> >>>
> >>
> >
> > OK for backport to GCC 10?
>
> I only found that because of failing package builds in a test rebuild. See
> PR98025. Is it safe to backport that, if it breaks the ABI of a runtime library

libphobos has some CET issues which have been fixed in GCC 11.

> shipped with GCC 10?
>

It is just a documentation change.
Iain Buclaw Nov. 27, 2020, 8:26 p.m. UTC | #7
Excerpts from H.J. Lu's message of November 27, 2020 8:28 pm:
> On Fri, Nov 27, 2020 at 11:02 AM Matthias Klose <doko@ubuntu.com> wrote:
>>
>> On 11/27/20 3:54 PM, H.J. Lu via Gcc-patches wrote:
>> > On Fri, Nov 27, 2020 at 6:24 AM Richard Biener <rguenther@suse.de> wrote:
>> >>
>> >> OK.
>> >>
>> >> On Fri, 27 Nov 2020, H.J. Lu wrote:
>> >>
>> >>>       PR other/98027
>> >>>       * doc/install: Default to --enable-cet=auto.
>> >>> ---
>> >>>  gcc/doc/install.texi | 9 ++++-----
>> >>>  1 file changed, 4 insertions(+), 5 deletions(-)
>> >>>
>> >>> diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi
>> >>> index 5f879ca4cea..021c347cc09 100644
>> >>> --- a/gcc/doc/install.texi
>> >>> +++ b/gcc/doc/install.texi
>> >>> @@ -2259,11 +2259,10 @@ instrumentation, see @option{-fcf-protection} option.  When
>> >>>  to add @option{-fcf-protection} and, if needed, other target
>> >>>  specific options to a set of building options.
>> >>>
>> >>> -The option is disabled by default.  When @code{--enable-cet=auto}
>> >>> -is used, it is enabled on Linux/x86 if target binutils
>> >>> -supports @code{Intel CET} instructions and disabled otherwise.
>> >>> -In this case the target libraries are configured to get additional
>> >>> -@option{-fcf-protection} option.
>> >>> +@code{--enable-cet=auto} is default.  CET is enabled on Linux/x86 if
>> >>> +target binutils supports @code{Intel CET} instructions and disabled
>> >>> +otherwise.  In this case, the target libraries are configured to get
>> >>> +additional @option{-fcf-protection} option.
>> >>>
>> >>>  @item --with-riscv-attribute=@samp{yes}, @samp{no} or @samp{default}
>> >>>  Generate RISC-V attribute by default, in order to record extra build
>> >>>
>> >>
>> >
>> > OK for backport to GCC 10?
>>
>> I only found that because of failing package builds in a test rebuild. See
>> PR98025. Is it safe to backport that, if it breaks the ABI of a runtime library
> 
> libphobos has some CET issues which have been fixed in GCC 11.
> 

There's still a remaining issue (see PR 98025) that I'm about to push a
fix for.

>> shipped with GCC 10?
>>
> 
> It is just a documentation change.
> 

I don't think the backport is necessary, as it is default disabled in
GCC 10.  It was only at the beginning of the GCC 11 development cycle
that it got changed to default auto.

Iain.
diff mbox series

Patch

diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi
index 5f879ca4cea..021c347cc09 100644
--- a/gcc/doc/install.texi
+++ b/gcc/doc/install.texi
@@ -2259,11 +2259,10 @@  instrumentation, see @option{-fcf-protection} option.  When
 to add @option{-fcf-protection} and, if needed, other target
 specific options to a set of building options.
 
-The option is disabled by default.  When @code{--enable-cet=auto}
-is used, it is enabled on Linux/x86 if target binutils
-supports @code{Intel CET} instructions and disabled otherwise.
-In this case the target libraries are configured to get additional
-@option{-fcf-protection} option.
+@code{--enable-cet=auto} is default.  CET is enabled on Linux/x86 if
+target binutils supports @code{Intel CET} instructions and disabled
+otherwise.  In this case, the target libraries are configured to get
+additional @option{-fcf-protection} option.
 
 @item --with-riscv-attribute=@samp{yes}, @samp{no} or @samp{default}
 Generate RISC-V attribute by default, in order to record extra build