From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Google-Smtp-Source: AH8x227jxhw8wqZQRgaVamsbDqLPzZ8IbtFCBxDGkA4ET8fbBTqVF/DQJVtXF00+1pcq8Si0Jv/B ARC-Seal: i=1; a=rsa-sha256; t=1517249848; cv=none; d=google.com; s=arc-20160816; b=JoOImQMB1F8UYQIXvUKXIOXlXVPZ2R7x6pGoP6ftG8/RhVq2J3zL/bXm3dvD5I8eGd Tlze9+JO+KlEfzDUCJICxDNGy65Z+x5iEs+cXHl0HSynP9EUs2vUTwWG8oyZaJnjc68e G6VzyGQv7ep3g05Cnbgt6d8gYX8f762q18R/NcZeg+CfjH1Og0WXVp56mx/quUdH0jbE qoiO/UT1B8miUvDX3Y9Od11x6Fx5GjisB99UUu0HMKblp8VrsMiT+a9OVQH8Bzwt+69p 2Q61clACPVYQCFX+q8RAa4YmmNoiDagpxtOEQOg4Q5Jdv/8Tvt3L5uMlotqXXtr5oDKd JVzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=fdJZmxv9dndYNihTGNfsFFAdA2JSGdyOqn4dyB96lno=; b=mjjxlRK5YQixERQlhBXvA7aq+uwC6DfpDuftcaHRwOI4d/1+kVx8Y0/ePGAkp5aMxE 1QReIYwuqbSSYEiisFZSKmFikGY9trS6kmq1coORa1VU4QCHnIyTuIOvPVX8nVQJpD5S 0qNA8cp+6FsYGkpx7GMILrDWT6lHI7XNl5qIW0Abs03J5eozSRU5LhpGBXa1bzpoQsn8 yeB3hXPHRvdbM06CHL2yPAnyKOV3moplwQEjTwKaOy5qUx2BN39AHc9/iG5OYoHgQWW1 pXLlxCuaxHlvzLFvWdOPF5ZnANLpTwPsXSakRPB9Rq0SGKhQylb7cZPss3pgCl4NvoPu qzwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=merlin.20170209 header.b=PSWE/2qk; spf=pass (google.com: best guess record for domain of peterz@infradead.org designates 205.233.59.134 as permitted sender) smtp.mailfrom=peterz@infradead.org Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=merlin.20170209 header.b=PSWE/2qk; spf=pass (google.com: best guess record for domain of peterz@infradead.org designates 205.233.59.134 as permitted sender) smtp.mailfrom=peterz@infradead.org Date: Mon, 29 Jan 2018 19:17:17 +0100 From: Peter Zijlstra To: Josh Poimboeuf Cc: David Woodhouse , Thomas Gleixner , linux-kernel@vger.kernel.org, Dave Hansen , Ashok Raj , Tim Chen , Andy Lutomirski , Linus Torvalds , Greg KH , Andrea Arcangeli , Andi Kleen , Arjan Van De Ven , Dan Williams , Paolo Bonzini , Jun Nakajima , Asit Mallick , Jason Baron Subject: Re: [PATCH 03/24] x86/paravirt: Annotate indirect calls Message-ID: <20180129181717.GX2269@hirez.programming.kicks-ass.net> References: <20180123152539.374360046@infradead.org> <20180123152638.162540737@infradead.org> <20180129175858.4btnobcifaumc7g4@treble> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180129175858.4btnobcifaumc7g4@treble> User-Agent: Mutt/1.9.2 (2017-12-15) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: =?utf-8?q?1590397845189698377?= X-GMAIL-MSGID: =?utf-8?q?1590951777752688887?= X-Mailing-List: linux-kernel@vger.kernel.org List-ID: On Mon, Jan 29, 2018 at 11:58:58AM -0600, Josh Poimboeuf wrote: > On Tue, Jan 23, 2018 at 04:25:42PM +0100, Peter Zijlstra wrote: > > Paravirt emits indirect calls which get flagged by objtool retpoline > > checks, annotate it away because all these indirect calls will be > > patched out before we start userspace. > > > > Signed-off-by: Peter Zijlstra (Intel) > > --- > > arch/x86/include/asm/paravirt.h | 22 ++++++++++++++++++---- > > arch/x86/include/asm/paravirt_types.h | 7 ++++++- > > 2 files changed, 24 insertions(+), 5 deletions(-) > > > > --- a/arch/x86/include/asm/paravirt.h > > +++ b/arch/x86/include/asm/paravirt.h > > @@ -828,6 +828,12 @@ extern void default_banner(void); > > .short clobbers; \ > > .popsection > > > > +#define PARA_RETPOLINE_SAFE \ > > + 773:; \ > > + .pushsection .discard.retpoline_safe; \ > > + _ASM_PTR 773b; \ > > + .popsection > > Why does paravirt have its own version of this macro? Every time I touch paravirt.h I land in header hell :/ Maybe it can be made to work, but I was too scared to try this time.