Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756869AbeAHNtd (ORCPT + 1 other); Mon, 8 Jan 2018 08:49:33 -0500 Received: from mx1.redhat.com ([209.132.183.28]:36706 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756310AbeAHNtc (ORCPT ); Mon, 8 Jan 2018 08:49:32 -0500 Date: Mon, 8 Jan 2018 07:49:23 -0600 From: Josh Poimboeuf To: David Woodhouse Cc: 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 Subject: Re: [PATCH v6 02/10] x86/retpoline/crypto: Convert crypto assembler indirect jumps Message-ID: <20180108134923.p2zt3pgpehzjv3vn@treble> References: <1515363085-4219-1-git-send-email-dwmw@amazon.co.uk> <1515363085-4219-3-git-send-email-dwmw@amazon.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1515363085-4219-3-git-send-email-dwmw@amazon.co.uk> 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.32]); Mon, 08 Jan 2018 13:49:32 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Sun, Jan 07, 2018 at 10:11:17PM +0000, David Woodhouse wrote: > Convert all indirect jumps in crypto assembler code to use non-speculative > sequences when CONFIG_RETPOLINE is enabled. > > Signed-off-by: David Woodhouse > Acked-By: Arjan van de Ven > --- > arch/x86/crypto/aesni-intel_asm.S | 5 +++-- > arch/x86/crypto/camellia-aesni-avx-asm_64.S | 3 ++- > arch/x86/crypto/camellia-aesni-avx2-asm_64.S | 3 ++- > arch/x86/crypto/crc32c-pcl-intel-asm_64.S | 3 ++- > 4 files changed, 9 insertions(+), 5 deletions(-) > > diff --git a/arch/x86/crypto/aesni-intel_asm.S b/arch/x86/crypto/aesni-intel_asm.S > index 16627fe..f128680 100644 > --- a/arch/x86/crypto/aesni-intel_asm.S > +++ b/arch/x86/crypto/aesni-intel_asm.S > @@ -32,6 +32,7 @@ > #include > #include > #include > +#include > > /* > * The following macros are used to move an (un)aligned 16 byte value to/from > @@ -2884,7 +2885,7 @@ ENTRY(aesni_xts_crypt8) > pxor INC, STATE4 > movdqu IV, 0x30(OUTP) > > - call *%r11 > + NOSPEC_CALL %r11 Personally I find CALL_NOSPEC %r11 to be more readable. The call is the action and the nospec is a detail. And similarly for NOSPEC_JMP -> JMP_NOSPEC. -- Josh