Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753452AbeAJSsa (ORCPT + 1 other); Wed, 10 Jan 2018 13:48:30 -0500 Received: from terminus.zytor.com ([65.50.211.136]:34137 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751936AbeAJSsQ (ORCPT ); Wed, 10 Jan 2018 13:48:16 -0500 Date: Wed, 10 Jan 2018 10:43:04 -0800 From: tip-bot for David Woodhouse Message-ID: Cc: jikos@kernel.org, luto@amacapital.net, hpa@zytor.com, gregkh@linux-foundation.org, dave.hansen@intel.com, tglx@linutronix.de, torvalds@linux-foundation.org, mingo@kernel.org, tim.c.chen@linux.intel.com, pjt@google.com, dwmw@amazon.co.uk, riel@redhat.com, peterz@infradead.org, linux-kernel@vger.kernel.org, arjan@linux.intel.com, jgross@suse.com, ak@linux.intel.com, keescook@google.com Reply-To: luto@amacapital.net, jikos@kernel.org, hpa@zytor.com, gregkh@linux-foundation.org, torvalds@linux-foundation.org, mingo@kernel.org, dave.hansen@intel.com, tglx@linutronix.de, peterz@infradead.org, dwmw@amazon.co.uk, riel@redhat.com, pjt@google.com, tim.c.chen@linux.intel.com, jgross@suse.com, arjan@linux.intel.com, linux-kernel@vger.kernel.org, keescook@google.com, ak@linux.intel.com 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: b569cb1e72bda00e7e6245519fe7d0d0ab13898e 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: b569cb1e72bda00e7e6245519fe7d0d0ab13898e Gitweb: https://git.kernel.org/tip/b569cb1e72bda00e7e6245519fe7d0d0ab13898e Author: David Woodhouse AuthorDate: Tue, 9 Jan 2018 14:43:14 +0000 Committer: Thomas Gleixner CommitDate: Wed, 10 Jan 2018 19:36:25 +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();