Received: by 10.223.185.116 with SMTP id b49csp1120403wrg; Fri, 23 Feb 2018 12:16:48 -0800 (PST) X-Google-Smtp-Source: AH8x225KvI4mFcx7Wa3ZCaoKXfN/jdL4WDWvrgjy1WTt2sEJt0be1m1zJ6H/EkrtrP6V+WhUtuoT X-Received: by 2002:a17:902:7509:: with SMTP id i9-v6mr2849769pll.220.1519417008354; Fri, 23 Feb 2018 12:16:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519417008; cv=none; d=google.com; s=arc-20160816; b=zUsnmNINnf6Xv042bOt8YQMTC5CQ0U5sygFUw21msncmkHqZfkFU18ZXF1Z1QszrFK Dlf+JUujebSmuTSBpbybe9Ylq0DhNqk13EM8/9BTzv0e1O0Zn+Z/5ww1QupOvLeyMSdT j/sCthl0uN+M/jdi+6a19xiSPigqRM+jYTqPg83BhYMnC/MA0O/GHdA9qtMX0BEF/i5+ yqkQa4FB5IJL/nbRkib8cMjOdrxauCwtb8L3fs6EvEzbZJd3BEYRZSkOFh24aMeEDV2X xYvavjYGCLdqKP0CZHxNSLYLTGrUjNPG6aBjIg9mPsd2qTLfQ+fu2pQwC4XYoFeOC+fz es/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=8VKifSbo5V/hJVx00oirItETWkNUhM0BXOUtDUG7TQg=; b=jFOJK5hASVihhgELsRTfbgNt5yYL0Xx52WlEUBQrbHeKdVgFhQGO+uj4XTrAoSpLF/ 9XcUxkMMAy9ifHzM7UtuAOfsVtAauxtqppzpKub4sVwKOX/gVZIKZp1FCZLsUX4My6y8 OSQGhNXQsoDhYxXfVqazMUVxKi/GLmU0CWMA3uP+cXVCDfys+y+DTqoQWooqJOEzDG+u lvgdtMJxjU8v/zSR8dRiclIzfbfIKhsL/EWG1e88VW2HYv9v3w1EHKIW1iO5dDa6W1AE A2SIA8HpDj4m6RTBJQMi1mSIMVRgQ8CuzhQ5BnHMTfbT4IBTEDKAEfl10TzP1CQ2TCuA 6Z3g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i11si1862217pgq.332.2018.02.23.12.16.34; Fri, 23 Feb 2018 12:16:48 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932460AbeBWSke (ORCPT + 99 others); Fri, 23 Feb 2018 13:40:34 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:40088 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932615AbeBWSkb (ORCPT ); Fri, 23 Feb 2018 13:40:31 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 1FDA311F9; Fri, 23 Feb 2018 18:40:30 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Peter Zijlstra (Intel)" , Thomas Gleixner , David Woodhouse , Andrea Arcangeli , Andi Kleen , Ashok Raj , Jun Nakajima , David Woodhouse , Linus Torvalds , rga@amazon.de, Dave Hansen , Asit Mallick , Andy Lutomirski , Josh Poimboeuf , Jason Baron , Paolo Bonzini , Dan Williams , Arjan Van De Ven , Tim Chen , Jack Wang Subject: [PATCH 4.4 167/193] KVM: VMX: Make indirect call speculation safe Date: Fri, 23 Feb 2018 19:26:40 +0100 Message-Id: <20180223170352.192414345@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180223170325.997716448@linuxfoundation.org> References: <20180223170325.997716448@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Peter Zijlstra (cherry picked from commit c940a3fb1e2e9b7d03228ab28f375fb5a47ff699) Replace indirect call with CALL_NOSPEC. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Reviewed-by: David Woodhouse Cc: Andrea Arcangeli Cc: Andi Kleen Cc: Ashok Raj Cc: Greg KH Cc: Jun Nakajima Cc: David Woodhouse Cc: Linus Torvalds Cc: rga@amazon.de Cc: Dave Hansen Cc: Asit Mallick Cc: Andy Lutomirski Cc: Josh Poimboeuf Cc: Jason Baron Cc: Paolo Bonzini Cc: Dan Williams Cc: Arjan Van De Ven Cc: Tim Chen Link: https://lkml.kernel.org/r/20180125095843.645776917@infradead.org Signed-off-by: David Woodhouse [backport to 4.4] Signed-off-by: Jack Wang Signed-off-by: Greg Kroah-Hartman --- arch/x86/kvm/vmx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -8377,13 +8377,13 @@ static void vmx_handle_external_intr(str "pushf\n\t" "orl $0x200, (%%" _ASM_SP ")\n\t" __ASM_SIZE(push) " $%c[cs]\n\t" - "call *%[entry]\n\t" + CALL_NOSPEC : #ifdef CONFIG_X86_64 [sp]"=&r"(tmp) #endif : - [entry]"r"(entry), + THUNK_TARGET(entry), [ss]"i"(__KERNEL_DS), [cs]"i"(__KERNEL_CS) );