Re: [PATCH] INSTALL: Default to --enable-cet=auto

2023-01-07 Thread Gerald Pfeifer
On Fri, 27 Nov 2020, H.J. Lu wrote:
> 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}.

I'm afraid this (the last sentence) is not really clear reading what is in 
install.texi.

Maybe instead of 

  "In this case, the target libraries are configured to get additional 
  @option{-fcf-protection} option."

something like

  "In the former case the target libraries are additionally configured 
  with @option{-fcf-protection}." ?

Gerald


Re: [PATCH] INSTALL: Default to --enable-cet=auto

2020-11-27 Thread Iain Buclaw via Gcc-patches
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  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  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.


Re: [PATCH] INSTALL: Default to --enable-cet=auto

2020-11-27 Thread H.J. Lu via Gcc-patches
On Fri, Nov 27, 2020 at 11:02 AM Matthias Klose  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  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.


-- 
H.J.


Re: [PATCH] INSTALL: Default to --enable-cet=auto

2020-11-27 Thread Matthias Klose
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  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


Re: [PATCH] INSTALL: Default to --enable-cet=auto

2020-11-27 Thread H.J. Lu via Gcc-patches
On Fri, Nov 27, 2020 at 8:22 AM Gerald Pfeifer  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



-- 
H.J.


Re: [PATCH] INSTALL: Default to --enable-cet=auto

2020-11-27 Thread Gerald Pfeifer
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


Re: [PATCH] INSTALL: Default to --enable-cet=auto

2020-11-27 Thread H.J. Lu via Gcc-patches
On Fri, Nov 27, 2020 at 6:24 AM Richard Biener  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?

-- 
H.J.


Re: [PATCH] INSTALL: Default to --enable-cet=auto

2020-11-27 Thread Richard Biener
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
> 

-- 
Richard Biener 
SUSE Software Solutions Germany GmbH, Maxfeldstrasse 5, 90409 Nuernberg,
Germany; GF: Felix Imend


[PATCH] INSTALL: Default to --enable-cet=auto

2020-11-27 Thread H.J. Lu via Gcc-patches
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
-- 
2.28.0