[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1515689718.22302.378.camel@infradead.org>
Date: Thu, 11 Jan 2018 16:55:18 +0000
From: David Woodhouse <dwmw2@...radead.org>
To: Josh Poimboeuf <jpoimboe@...hat.com>
Cc: x86@...nel.org, linux-kernel@...r.kernel.org,
Thomas Gleixner <tglx@...utronix.de>,
Andi Kleen <ak@...ux.intel.com>, Paul Turner <pjt@...gle.com>,
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>,
Peter Zijlstra <peterz@...radead.org>,
Andy Lutomirski <luto@...capital.net>,
Jiri Kosina <jikos@...nel.org>, gnomes@...rguk.ukuu.org.uk
Subject: Re: [PATCH 2/3] objtool: Ignore retpoline alternatives
On Thu, 2018-01-11 at 10:48 -0600, Josh Poimboeuf wrote:
>
> The above macro is protected by '#ifdef RETPOLINE', and I seriously
> doubt 0-day is testing with an unreleased version of GCC. So you
> shouldn't see a 0-day warning.
It's actually #ifdef CONFIG_RETPOLINE isn't it?
If you enable CONFIG_RETPOLINE but don't have a new compiler, you still
get all the asm thunks (which are the easy-to-attack targets). Only if
you have a new compiler is RETPOLINE also set.
Also, the RSB stuffing we're looking at here is also needed for the
IBRS-based mitigation, so won't even be under CONFIG_RETPOLINE by the
time the IBRS patch set is beaten into shape on top. It'll probably be
unconditional unless we get a CONFIG_IBRS_SUPPORT (which hasn't been
suggested so far).
> I think I heard that retpolines won't be ported to anything older than
> GCC 4.9, so maybe it's safe to use '%='. I don't remember when it was
> introduced into GCC though.
Hm. Peter? This is all your fault, right? Did you know you were making
us ditch compatibility for older GCC?
Precisely when *did* %= get added to GCC?
Note that we can also just resort to using .macro even from inline asm.
It just takes a rather icky asm(".include ..."). :)
Download attachment "smime.p7s" of type "application/x-pkcs7-signature" (5213 bytes)
Powered by blists - more mailing lists