From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754139AbeAKXax (ORCPT + 1 other); Thu, 11 Jan 2018 18:30:53 -0500 Received: from terminus.zytor.com ([65.50.211.136]:57871 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751090AbeAKXav (ORCPT ); Thu, 11 Jan 2018 18:30:51 -0500 Date: Thu, 11 Jan 2018 15:26:19 -0800 From: tip-bot for David Woodhouse Message-ID: Cc: jikos@kernel.org, hpa@zytor.com, mingo@kernel.org, linux-kernel@vger.kernel.org, tim.c.chen@linux.intel.com, riel@redhat.com, torvalds@linux-foundation.org, ak@linux.intel.com, peterz@infradead.org, arjan@linux.intel.com, tglx@linutronix.de, luto@amacapital.net, gregkh@linux-foundation.org, jpoimboe@redhat.com, dave.hansen@intel.com, keescook@google.com, dwmw@amazon.co.uk, pjt@google.com Reply-To: pjt@google.com, dwmw@amazon.co.uk, keescook@google.com, dave.hansen@intel.com, jpoimboe@redhat.com, gregkh@linux-foundation.org, luto@amacapital.net, tglx@linutronix.de, arjan@linux.intel.com, peterz@infradead.org, ak@linux.intel.com, torvalds@linux-foundation.org, riel@redhat.com, mingo@kernel.org, linux-kernel@vger.kernel.org, tim.c.chen@linux.intel.com, jikos@kernel.org, hpa@zytor.com In-Reply-To: <1515707194-20531-11-git-send-email-dwmw@amazon.co.uk> References: <1515707194-20531-11-git-send-email-dwmw@amazon.co.uk> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/pti] x86/retpoline/checksum32: Convert assembler indirect jumps Git-Commit-ID: 5096732f6f695001fa2d6f1335a2680b37912c69 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: Commit-ID: 5096732f6f695001fa2d6f1335a2680b37912c69 Gitweb: https://git.kernel.org/tip/5096732f6f695001fa2d6f1335a2680b37912c69 Author: David Woodhouse AuthorDate: Thu, 11 Jan 2018 21:46:32 +0000 Committer: Thomas Gleixner CommitDate: Fri, 12 Jan 2018 00:14:31 +0100 x86/retpoline/checksum32: Convert assembler indirect jumps Convert all indirect jumps in 32bit checksum assembler code to use non-speculative sequences when CONFIG_RETPOLINE is enabled. Signed-off-by: David Woodhouse Signed-off-by: Thomas Gleixner Acked-by: Arjan van de Ven Acked-by: Ingo Molnar Cc: gnomes@lxorguk.ukuu.org.uk Cc: Rik van Riel Cc: Andi Kleen Cc: Josh Poimboeuf Cc: thomas.lendacky@amd.com Cc: Peter Zijlstra Cc: Linus Torvalds Cc: Jiri Kosina Cc: Andy Lutomirski Cc: Dave Hansen Cc: Kees Cook Cc: Tim Chen Cc: Greg Kroah-Hartman Cc: Paul Turner Link: https://lkml.kernel.org/r/1515707194-20531-11-git-send-email-dwmw@amazon.co.uk --- arch/x86/lib/checksum_32.S | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/arch/x86/lib/checksum_32.S b/arch/x86/lib/checksum_32.S index 4d34bb5..46e71a7 100644 --- a/arch/x86/lib/checksum_32.S +++ b/arch/x86/lib/checksum_32.S @@ -29,7 +29,8 @@ #include #include #include - +#include + /* * computes a partial checksum, e.g. for TCP/UDP fragments */ @@ -156,7 +157,7 @@ ENTRY(csum_partial) negl %ebx lea 45f(%ebx,%ebx,2), %ebx testl %esi, %esi - jmp *%ebx + JMP_NOSPEC %ebx # Handle 2-byte-aligned regions 20: addw (%esi), %ax @@ -439,7 +440,7 @@ ENTRY(csum_partial_copy_generic) andl $-32,%edx lea 3f(%ebx,%ebx), %ebx testl %esi, %esi - jmp *%ebx + JMP_NOSPEC %ebx 1: addl $64,%esi addl $64,%edi SRC(movb -32(%edx),%bl) ; SRC(movb (%edx),%bl)