Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753230AbeAFTxy (ORCPT + 1 other); Sat, 6 Jan 2018 14:53:54 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:46683 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752231AbeAFTxw (ORCPT ); Sat, 6 Jan 2018 14:53:52 -0500 Date: Sat, 6 Jan 2018 20:53:48 +0100 (CET) From: Thomas Gleixner To: Linus Torvalds cc: David Woodhouse , Andi Kleen , Paul Turner , LKML , Greg Kroah-Hartman , Tim Chen , Dave Hansen , Kees Cook , Rik van Riel , Peter Zijlstra , Andy Lutomirski , Jiri Kosina , One Thousand Gnomes Subject: Re: [PATCH v5 05/12] x86/retpoline/ftrace: Convert ftrace assembler indirect jumps In-Reply-To: Message-ID: References: <1515239374-23361-1-git-send-email-dwmw@amazon.co.uk> <1515239374-23361-6-git-send-email-dwmw@amazon.co.uk> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Sat, 6 Jan 2018, Linus Torvalds wrote: > On Sat, Jan 6, 2018 at 3:49 AM, David Woodhouse wrote: > > > > - call *ftrace_trace_function > > + movl ftrace_trace_function, %ecx > > + NOSPEC_CALL %ecx > > Can't we just do > > NOSPEC_CALL ftrace_trace_function > > now? > > [ Goes off and looks ] > > Oh. The AMD lfence version wants a register. Oh well. The register load could be put into the macro itself, though we need to supply a scratch register NOSPEC_CALL ftrace_trace_function scratch_reg=%ecx Whether thats much better, I don't know. Thanks, tglx