linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: tip-bot for Peter Zijlstra <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: mingo@kernel.org, gregkh@linuxfoundation.org,
	torvalds@linux-foundation.org, linux-kernel@vger.kernel.org,
	jbaron@akamai.com, peterz@infradead.org, ashok.raj@intel.com,
	arjan.van.de.ven@intel.com, dwmw@amazon.co.uk,
	dan.j.williams@intel.com, hpa@zytor.com, jpoimboe@redhat.com,
	asit.k.mallick@intel.com, dwmw2@infradead.org, luto@kernel.org,
	pbonzini@redhat.com, tglx@linutronix.de,
	tim.c.chen@linux.intel.com, dave.hansen@intel.com,
	ak@linux.intel.com, aarcange@redhat.com, jun.nakajima@intel.com
Subject: [tip:x86/pti] KVM: VMX: Make indirect call specualation safe
Date: Thu, 25 Jan 2018 02:34:37 -0800	[thread overview]
Message-ID: <tip-34cc5034b57b81f789ad4714533ca921a9b1c9d7@git.kernel.org> (raw)
In-Reply-To: <20180125095843.645776917@infradead.org>

Commit-ID:  34cc5034b57b81f789ad4714533ca921a9b1c9d7
Gitweb:     https://git.kernel.org/tip/34cc5034b57b81f789ad4714533ca921a9b1c9d7
Author:     Peter Zijlstra <peterz@infradead.org>
AuthorDate: Thu, 25 Jan 2018 10:58:14 +0100
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Thu, 25 Jan 2018 11:30:07 +0100

KVM: VMX: Make indirect call specualation safe

Replace indirect call with CALL_NOSPEC.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: David Woodhouse <dwmw@amazon.co.uk>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Ashok Raj <ashok.raj@intel.com>
Cc: Greg KH <gregkh@linuxfoundation.org>
Cc: Jun Nakajima <jun.nakajima@intel.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: rga@amazon.de
Cc: Dave Hansen <dave.hansen@intel.com>
Cc: Asit Mallick <asit.k.mallick@intel.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Jason Baron <jbaron@akamai.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Arjan Van De Ven <arjan.van.de.ven@intel.com>
Cc: Tim Chen <tim.c.chen@linux.intel.com>
Link: https://lkml.kernel.org/r/20180125095843.645776917@infradead.org

---
 arch/x86/kvm/vmx.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index d1e25db..924589c 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -9064,14 +9064,14 @@ static void vmx_handle_external_intr(struct kvm_vcpu *vcpu)
 #endif
 			"pushf\n\t"
 			__ASM_SIZE(push) " $%c[cs]\n\t"
-			"call *%[entry]\n\t"
+			CALL_NOSPEC
 			:
 #ifdef CONFIG_X86_64
 			[sp]"=&r"(tmp),
 #endif
 			ASM_CALL_CONSTRAINT
 			:
-			[entry]"r"(entry),
+			THUNK_TARGET(entry),
 			[ss]"i"(__KERNEL_DS),
 			[cs]"i"(__KERNEL_CS)
 			);

  reply	other threads:[~2018-01-25 10:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-25  9:58 [PATCH 0/2] KVM retpoline fixes Peter Zijlstra
2018-01-25  9:58 ` [PATCH 1/2] x86,kvm: Fix indirect calls in emulator Peter Zijlstra
2018-01-25 10:34   ` [tip:x86/pti] KVM: x86: Make indirect calls in emulator speculation safe tip-bot for Peter Zijlstra
2018-01-25  9:58 ` [PATCH 2/2] x86,vmx: Fix indirect call Peter Zijlstra
2018-01-25 10:34   ` tip-bot for Peter Zijlstra [this message]
2018-01-25 13:19   ` [tip:x86/pti] KVM: VMX: Make indirect call speculation safe tip-bot for Peter Zijlstra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tip-34cc5034b57b81f789ad4714533ca921a9b1c9d7@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=aarcange@redhat.com \
    --cc=ak@linux.intel.com \
    --cc=arjan.van.de.ven@intel.com \
    --cc=ashok.raj@intel.com \
    --cc=asit.k.mallick@intel.com \
    --cc=dan.j.williams@intel.com \
    --cc=dave.hansen@intel.com \
    --cc=dwmw2@infradead.org \
    --cc=dwmw@amazon.co.uk \
    --cc=gregkh@linuxfoundation.org \
    --cc=hpa@zytor.com \
    --cc=jbaron@akamai.com \
    --cc=jpoimboe@redhat.com \
    --cc=jun.nakajima@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mingo@kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=tim.c.chen@linux.intel.com \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).