Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751878AbeANPxx (ORCPT + 1 other); Sun, 14 Jan 2018 10:53:53 -0500 Received: from mx1.redhat.com ([209.132.183.28]:57042 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751626AbeANPxw (ORCPT ); Sun, 14 Jan 2018 10:53:52 -0500 Date: Sun, 14 Jan 2018 09:53:45 -0600 From: Josh Poimboeuf To: Borislav Petkov Cc: David Woodhouse , Andi Kleen , Paul Turner , LKML , Linus Torvalds , Greg Kroah-Hartman , Tim Chen , Dave Hansen , tglx@linutronix.de, Kees Cook , Rik van Riel , Peter Zijlstra , Andy Lutomirski , Jiri Kosina , gnomes@lxorguk.ukuu.org.uk, x86@kernel.org, thomas.lendacky@amd.com Subject: Re: [PATCH v8 03/12] x86/retpoline: Add initial retpoline support Message-ID: <20180114155345.ozxzh6zbi3or37wz@treble> References: <1515707194-20531-1-git-send-email-dwmw@amazon.co.uk> <1515707194-20531-4-git-send-email-dwmw@amazon.co.uk> <20180114150219.olnya5vlgjbmbcbr@pd.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20180114150219.olnya5vlgjbmbcbr@pd.tnic> User-Agent: Mutt/1.6.0.1 (2016-04-01) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Sun, 14 Jan 2018 15:53:52 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Sun, Jan 14, 2018 at 04:02:19PM +0100, Borislav Petkov wrote: > On Thu, Jan 11, 2018 at 09:46:25PM +0000, David Woodhouse wrote: > > +/* > > + * This should be used immediately before a retpoline alternative. It tells > > + * objtool where the retpolines are so that it can make sense of the control > > + * flow by just reading the original instruction(s) and ignoring the > > + * alternatives. > > + */ > > +.macro ANNOTATE_NOSPEC_ALTERNATIVE > > + .Lannotate_\@: > > + .pushsection .discard.nospec > > + .long .Lannotate_\@ - . > > + .popsection > > +.endm > > Hey Josh, what happened to parsing only the retpoline-related > .altinstructions sections with the X86_FEATURE bits? Or is this > annotation used for something more additionally? Yeah, that idea came after this patch was already written. I haven't implemented it yet. -- Josh