Re: [Qemu-devel] [PATCH 3/7] configure: add CET support

2019-03-14 Thread Paolo Bonzini
On 14/03/19 16:23, Richard Henderson wrote: > On 3/14/19 3:46 AM, Paolo Bonzini wrote: >> On 14/03/19 01:56, Richard Henderson wrote: >>> Hmm. The gcc for aarch64 names the similar feature -mbranch-protection. >>> I'm >>> rather annoyed that the i386 gcc folk appropriated a generic -f name witho

Re: [Qemu-devel] [PATCH 3/7] configure: add CET support

2019-03-14 Thread Richard Henderson
On 3/14/19 3:46 AM, Paolo Bonzini wrote: > On 14/03/19 01:56, Richard Henderson wrote: >> Hmm. The gcc for aarch64 names the similar feature -mbranch-protection. I'm >> rather annoyed that the i386 gcc folk appropriated a generic -f name without >> actually making the feature generic at the same

Re: [Qemu-devel] [PATCH 3/7] configure: add CET support

2019-03-14 Thread Paolo Bonzini
On 14/03/19 01:56, Richard Henderson wrote: > Hmm. The gcc for aarch64 names the similar feature -mbranch-protection. I'm > rather annoyed that the i386 gcc folk appropriated a generic -f name without > actually making the feature generic at the same time. Wouldn't -fcf-protection=branch also ap

Re: [Qemu-devel] [PATCH 3/7] configure: add CET support

2019-03-13 Thread Richard Henderson
On 3/13/19 5:40 AM, Paolo Bonzini wrote: > +## > +# detect CET support in the toolchain > + > +if test "$cet" != no; then > + write_c_skeleton; > + if ! compile_prog "-fcf-protection" "" ; then > +if test "$cet" = yes; then > + feature_not_found "c

Re: [Qemu-devel] [PATCH 3/7] configure: add CET support

2019-03-13 Thread Florian Weimer
* Paolo Bonzini: > Actually I might change it to cf-protection, since that's what the GCC > flag is named. The GCC flag is supposed to generic, so that it can be used for similar features other architectures might provide. Your code looks rather x86-centric to me, so CET seems appropriate here.

Re: [Qemu-devel] [PATCH 3/7] configure: add CET support

2019-03-13 Thread Paolo Bonzini
On 13/03/19 14:31, Florian Weimer wrote: > * Paolo Bonzini: > >> Actually I might change it to cf-protection, since that's what the GCC >> flag is named. > > The GCC flag is supposed to generic, so that it can be used for similar > features other architectures might provide. Your code looks rath

Re: [Qemu-devel] [PATCH 3/7] configure: add CET support

2019-03-13 Thread Paolo Bonzini
On 13/03/19 13:59, Eric Blake wrote: > On 3/13/19 7:40 AM, Paolo Bonzini wrote: >> CET requires object files to note which features are supported. The linker > > CET = ? > >> will merge them to the set of features that are supported by all object >> files. The compiler creates these notes when

Re: [Qemu-devel] [PATCH 3/7] configure: add CET support

2019-03-13 Thread Eric Blake
On 3/13/19 7:40 AM, Paolo Bonzini wrote: > CET requires object files to note which features are supported. The linker CET = ? > will merge them to the set of features that are supported by all object > files. The compiler creates these notes when the -fcf-protection option > is passed, but we h

[Qemu-devel] [PATCH 3/7] configure: add CET support

2019-03-13 Thread Paolo Bonzini
CET requires object files to note which features are supported. The linker will merge them to the set of features that are supported by all object files. The compiler creates these notes when the -fcf-protection option is passed, but we have to blacklist some object files that only support a subs