Re: [PATCH v6 01/10] x86/retpoline: Add initial retpoline support

From: Thomas Gleixner
Date: Tue Jan 09 2018 - 08:35:51 EST


On Tue, 9 Jan 2018, Peter Zijlstra wrote:

> On Mon, Jan 08, 2018 at 02:46:32PM +0100, Thomas Gleixner wrote:
> > On Mon, 8 Jan 2018, Josh Poimboeuf wrote:
>
> > > I wonder if an error might be more appropriate than a warning. I
> > > learned from experience that a lot of people don't see these Makefile
> > > warnings, and this would be a dangerous one to miss.
> > >
> > > Also if this were an error, you could get rid of the RETPOLINE define,
> > > and that would be one less define cluttering up the already way-too-long
> > > GCC arg list.
> >
> > It still allows to get the ASM part covered. If that's worth it I can't tell.
>
> So elsewhere you stated we're dropping support for GCC without asm-goto
> (<4.5), does it then make sense to make one more step and mandate a
> retpoline capable compiler, which would put us at >=4.9 (for x86).
>
> That would get rid of this weird case as well.

I agree in principle, though the difference is that the retpoline compilers
are not available today, gcc with asm goto are.

The reasoning for the minimal thing was to cover at least the obvious easy
targets, eg. sys_call_table as the deeper ones are harder.

Thanks,

tglx