[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180201153005.GY2249@hirez.programming.kicks-ass.net>
Date: Thu, 1 Feb 2018 16:30:05 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Josh Poimboeuf <jpoimboe@...hat.com>
Cc: David Woodhouse <dwmw2@...radead.org>,
Thomas Gleixner <tglx@...utronix.de>,
linux-kernel@...r.kernel.org, Dave Hansen <dave.hansen@...el.com>,
Ashok Raj <ashok.raj@...el.com>,
Tim Chen <tim.c.chen@...ux.intel.com>,
Andy Lutomirski <luto@...nel.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Greg KH <gregkh@...uxfoundation.org>,
Andrea Arcangeli <aarcange@...hat.com>,
Andi Kleen <ak@...ux.intel.com>,
Arjan Van De Ven <arjan.van.de.ven@...el.com>,
Dan Williams <dan.j.williams@...el.com>,
Paolo Bonzini <pbonzini@...hat.com>,
Jun Nakajima <jun.nakajima@...el.com>,
Asit Mallick <asit.k.mallick@...el.com>
Subject: Re: [PATCH 4/7] x86,nospec: Annotate indirect calls/jumps
On Thu, Feb 01, 2018 at 09:21:34AM -0600, Josh Poimboeuf wrote:
> On Thu, Feb 01, 2018 at 04:13:48PM +0100, Peter Zijlstra wrote:
> > arch/x86/entry/.tmp_entry_64.o: warning: objtool: .altinstr_replacement+0x19: indirect jump found in RETPOLINE build
>
> Right, objtool was recently made smarter, such that it actually decodes
> the ignored alternatives.
I think it always did, you just ignored the alternatives for the code
flow stuff.
> The check for that warning needs to also check that insn->ignore isn't
> set.
So I tried to keep the two annotations independent, thinking the code
flow ignore would eventually go away when we got smarter about it. It
even has a comment about that:
/*
* FIXME: For now, just ignore any alternatives which add retpolines. This is
* a temporary hack, as it doesn't allow ORC to unwind from inside a retpoline.
* But it at least allows objtool to understand the control flow *around* the
* retpoline.
*/
So I'm not seeing how making retpoline_safe depend on nospec_ignores is
a good thing.
Powered by blists - more mailing lists