lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.20.1801081445480.1735@nanos>
Date:   Mon, 8 Jan 2018 14:46:32 +0100 (CET)
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Josh Poimboeuf <jpoimboe@...hat.com>
cc:     David Woodhouse <dwmw@...zon.co.uk>,
        Andi Kleen <ak@...ux.intel.com>, Paul Turner <pjt@...gle.com>,
        LKML <linux-kernel@...r.kernel.org>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Greg Kroah-Hartman <gregkh@...ux-foundation.org>,
        Tim Chen <tim.c.chen@...ux.intel.com>,
        Dave Hansen <dave.hansen@...el.com>,
        Kees Cook <keescook@...gle.com>,
        Rik van Riel <riel@...hat.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Andy Lutomirski <luto@...capital.net>,
        Jiri Kosina <jikos@...nel.org>, gnomes@...rguk.ukuu.org.uk
Subject: Re: [PATCH v6 01/10] x86/retpoline: Add initial retpoline support

On Mon, 8 Jan 2018, Josh Poimboeuf wrote:
> On Sun, Jan 07, 2018 at 10:11:16PM +0000, David Woodhouse wrote:
> > diff --git a/arch/x86/Makefile b/arch/x86/Makefile
> > index a20eacd..918e550 100644
> > --- a/arch/x86/Makefile
> > +++ b/arch/x86/Makefile
> > @@ -235,6 +235,16 @@ KBUILD_CFLAGS += -Wno-sign-compare
> >  #
> >  KBUILD_CFLAGS += -fno-asynchronous-unwind-tables
> >  
> > +# Avoid indirect branches in kernel to deal with Spectre
> > +ifdef CONFIG_RETPOLINE
> > +    RETPOLINE_CFLAGS += $(call cc-option,-mindirect-branch=thunk-extern -mindirect-branch-register)
> > +    ifneq ($(RETPOLINE_CFLAGS),)
> > +        KBUILD_CFLAGS += $(RETPOLINE_CFLAGS) -DRETPOLINE
> > +    else
> > +        $(warning Retpoline not supported in compiler. System may be insecure.)
> > +    endif
> > +endif
> 
> 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.

Thanks,

	tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ