Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757332AbeAHMp4 (ORCPT + 1 other); Mon, 8 Jan 2018 07:45:56 -0500 Received: from twosheds.infradead.org ([90.155.92.209]:60778 "EHLO twosheds.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755032AbeAHMpz (ORCPT ); Mon, 8 Jan 2018 07:45:55 -0500 Message-ID: <23bd8a874faf8ec048299f919799f86f.squirrel@twosheds.infradead.org> In-Reply-To: <20180108110309.GH3040@hirez.programming.kicks-ass.net> References: <1515363085-4219-1-git-send-email-dwmw@amazon.co.uk> <1515363085-4219-2-git-send-email-dwmw@amazon.co.uk> <20180108104512.GG3040@hirez.programming.kicks-ass.net> <1515408782.7317.33.camel@infradead.org> <20180108110309.GH3040@hirez.programming.kicks-ass.net> Date: Mon, 8 Jan 2018 12:45:44 -0000 Subject: Re: [PATCH v6 01/10] x86/retpoline: Add initial retpoline support From: "David Woodhouse" To: "Peter Zijlstra" 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" , "Andy Lutomirski" , "Jiri Kosina" , gnomes@lxorguk.ukuu.org.uk User-Agent: SquirrelMail/1.4.22-21.fc27 MIME-Version: 1.0 Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-SRS-Rewrite: SMTP reverse-path rewritten from by twosheds.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: > On Mon, Jan 08, 2018 at 10:53:02AM +0000, David Woodhouse wrote: >> On Mon, 2018-01-08 at 11:45 +0100, Peter Zijlstra wrote: >> > >> > >> > Should this not use local name labels instead? >> > >> > .macro RETPOLINE_JMP reg:req >> >         call    .Ldo_rop_\@ >> > .Lspec_trap_\@: >> >         pause >> >         jmp .Lspec_trap_\@ >> > .Ldo_rop_\@: >> >         mov     \reg, (%_ASM_SP) >> >         ret >> > .endm >> >> Not if you want to be able to use them twice in the same .S file. > > Should work fine, the \@ expands to a per-instance magic thing IIRC. All > the PTI helpers do this too and that works just fine, see > arch/x86/entry/calling.h > Ah, OK. Will do that when home in a few hours then. -- dwmw2