From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754176AbeAKXbN (ORCPT + 1 other); Thu, 11 Jan 2018 18:31:13 -0500 Received: from terminus.zytor.com ([65.50.211.136]:43057 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753879AbeAKXbM (ORCPT ); Thu, 11 Jan 2018 18:31:12 -0500 Date: Thu, 11 Jan 2018 15:25:55 -0800 From: tip-bot for David Woodhouse Message-ID: Cc: tim.c.chen@linux.intel.com, mingo@kernel.org, peterz@infradead.org, jpoimboe@redhat.com, hpa@zytor.com, torvalds@linux-foundation.org, linux-kernel@vger.kernel.org, jgross@suse.com, arjan@linux.intel.com, riel@redhat.com, dave.hansen@intel.com, jikos@kernel.org, pjt@google.com, ak@linux.intel.com, keescook@google.com, dwmw@amazon.co.uk, luto@amacapital.net, tglx@linutronix.de, gregkh@linux-foundation.org Reply-To: mingo@kernel.org, peterz@infradead.org, jpoimboe@redhat.com, hpa@zytor.com, tim.c.chen@linux.intel.com, jgross@suse.com, arjan@linux.intel.com, torvalds@linux-foundation.org, linux-kernel@vger.kernel.org, pjt@google.com, riel@redhat.com, dave.hansen@intel.com, jikos@kernel.org, gregkh@linux-foundation.org, ak@linux.intel.com, keescook@google.com, dwmw@amazon.co.uk, tglx@linutronix.de, luto@amacapital.net In-Reply-To: <1515707194-20531-10-git-send-email-dwmw@amazon.co.uk> References: <1515707194-20531-10-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: ea08816d5b185ab3d09e95e393f265af54560350 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: ea08816d5b185ab3d09e95e393f265af54560350 Gitweb: https://git.kernel.org/tip/ea08816d5b185ab3d09e95e393f265af54560350 Author: David Woodhouse AuthorDate: Thu, 11 Jan 2018 21:46:31 +0000 Committer: Thomas Gleixner CommitDate: Fri, 12 Jan 2018 00:14:31 +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 Acked-by: Arjan van de Ven Acked-by: Ingo Molnar Reviewed-by: Juergen Gross 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-10-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();