Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754885AbeAGWMy (ORCPT + 1 other); Sun, 7 Jan 2018 17:12:54 -0500 Received: from smtp-fw-2101.amazon.com ([72.21.196.25]:4344 "EHLO smtp-fw-2101.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754752AbeAGWMw (ORCPT ); Sun, 7 Jan 2018 17:12:52 -0500 X-IronPort-AV: E=Sophos;i="5.46,327,1511827200"; d="scan'208";a="665247909" From: David Woodhouse To: Andi Kleen Cc: 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: [PATCH v6 06/10] x86/retpoline/xen: Convert Xen hypercall indirect jumps Date: Sun, 7 Jan 2018 22:11:21 +0000 Message-Id: <1515363085-4219-7-git-send-email-dwmw@amazon.co.uk> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1515363085-4219-1-git-send-email-dwmw@amazon.co.uk> References: <1515363085-4219-1-git-send-email-dwmw@amazon.co.uk> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: Convert indirect call in Xen hypercall to use non-speculative sequence, when CONFIG_RETPOLINE is enabled. Signed-off-by: David Woodhouse Acked-By: Arjan van de Ven --- 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..393c004 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(NOSPEC_CALL : __HYPERCALL_5PARAM - : [call] "a" (&hypercall_page[call]) + : [thunk_target] "a" (&hypercall_page[call]) : __HYPERCALL_CLOBBER5); clac(); -- 2.7.4