Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752086AbeAJRmv (ORCPT + 1 other); Wed, 10 Jan 2018 12:42:51 -0500 Received: from terminus.zytor.com ([65.50.211.136]:39029 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751175AbeAJRmt (ORCPT ); Wed, 10 Jan 2018 12:42:49 -0500 Date: Wed, 10 Jan 2018 09:37:28 -0800 From: tip-bot for David Woodhouse Message-ID: Cc: jikos@kernel.org, ak@linux.intel.com, linux-kernel@vger.kernel.org, pjt@google.com, gregkh@linux-foundation.org, tglx@linutronix.de, riel@redhat.com, arjan@linux.intel.com, torvalds@linux-foundation.org, luto@amacapital.net, dave.hansen@intel.com, hpa@zytor.com, keescook@google.com, peterz@infradead.org, jgross@suse.com, mingo@kernel.org, dwmw@amazon.co.uk, tim.c.chen@linux.intel.com Reply-To: luto@amacapital.net, torvalds@linux-foundation.org, dave.hansen@intel.com, hpa@zytor.com, keescook@google.com, riel@redhat.com, arjan@linux.intel.com, pjt@google.com, linux-kernel@vger.kernel.org, gregkh@linux-foundation.org, tglx@linutronix.de, jikos@kernel.org, ak@linux.intel.com, tim.c.chen@linux.intel.com, peterz@infradead.org, jgross@suse.com, mingo@kernel.org, dwmw@amazon.co.uk In-Reply-To: <1515508997-6154-9-git-send-email-dwmw@amazon.co.uk> References: <1515508997-6154-9-git-send-email-dwmw@amazon.co.uk> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/pti] x86/retpoline/xen: Convert Xen hypercall indirect jumps Git-Commit-ID: 5a6407e118225497fff1f503acbba96cd2abd21c 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: 5a6407e118225497fff1f503acbba96cd2abd21c Gitweb: https://git.kernel.org/tip/5a6407e118225497fff1f503acbba96cd2abd21c Author: David Woodhouse AuthorDate: Tue, 9 Jan 2018 14:43:14 +0000 Committer: Thomas Gleixner CommitDate: Wed, 10 Jan 2018 18:28:23 +0100 x86/retpoline/xen: Convert Xen hypercall indirect jumps Convert indirect call in Xen hypercall to use non-speculative sequence, when CONFIG_RETPOLINE is enabled. Signed-off-by: David Woodhouse Signed-off-by: Thomas Gleixner Reviewed-by: Juergen Gross Acked-by: Arjan van de Ven Acked-by: Ingo Molnar Cc: gnomes@lxorguk.ukuu.org.uk Cc: Rik van Riel Cc: Andi Kleen 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/1515508997-6154-9-git-send-email-dwmw@amazon.co.uk --- arch/x86/include/asm/xen/hypercall.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/x86/include/asm/xen/hypercall.h b/arch/x86/include/asm/xen/hypercall.h index 7cb282e..bfd8826 100644 --- a/arch/x86/include/asm/xen/hypercall.h +++ b/arch/x86/include/asm/xen/hypercall.h @@ -44,6 +44,7 @@ #include #include #include +#include #include #include @@ -217,9 +218,9 @@ privcmd_call(unsigned call, __HYPERCALL_5ARG(a1, a2, a3, a4, a5); stac(); - asm volatile("call *%[call]" + asm volatile(CALL_NOSPEC : __HYPERCALL_5PARAM - : [call] "a" (&hypercall_page[call]) + : [thunk_target] "a" (&hypercall_page[call]) : __HYPERCALL_CLOBBER5); clac();