[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <lsq.1520823972.370097886@decadent.org.uk>
Date: Mon, 12 Mar 2018 03:06:12 +0000
From: Ben Hutchings <ben@...adent.org.uk>
To: linux-kernel@...r.kernel.org, stable@...r.kernel.org
CC: akpm@...ux-foundation.org, "David Woodhouse" <dwmw2@...radead.org>,
"Andrea Arcangeli" <aarcange@...hat.com>,
"Greg KH" <gregkh@...uxfoundation.org>,
"Dan Williams" <dan.j.williams@...el.com>,
"Thomas Gleixner" <tglx@...utronix.de>,
"Jun Nakajima" <jun.nakajima@...el.com>,
"Josh Poimboeuf" <jpoimboe@...hat.com>,
"Arjan Van De Ven" <arjan.van.de.ven@...el.com>,
"Peter Zijlstra" <peterz@...radead.org>,
"Paolo Bonzini" <pbonzini@...hat.com>,
"Ashok Raj" <ashok.raj@...el.com>,
"Linus Torvalds" <torvalds@...ux-foundation.org>,
"Andi Kleen" <ak@...ux.intel.com>,
"Andy Lutomirski" <luto@...nel.org>,
"Tim Chen" <tim.c.chen@...ux.intel.com>,
"Jason Baron" <jbaron@...mai.com>, rga@...zon.de,
"Asit Mallick" <asit.k.mallick@...el.com>,
"David Woodhouse" <dwmw@...zon.co.uk>,
"Dave Hansen" <dave.hansen@...el.com>
Subject: [PATCH 3.16 45/76] KVM: VMX: Make indirect call speculation safe
3.16.56-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Peter Zijlstra <peterz@...radead.org>
commit c940a3fb1e2e9b7d03228ab28f375fb5a47ff699 upstream.
Replace indirect call with CALL_NOSPEC.
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Reviewed-by: David Woodhouse <dwmw@...zon.co.uk>
Cc: Andrea Arcangeli <aarcange@...hat.com>
Cc: Andi Kleen <ak@...ux.intel.com>
Cc: Ashok Raj <ashok.raj@...el.com>
Cc: Greg KH <gregkh@...uxfoundation.org>
Cc: Jun Nakajima <jun.nakajima@...el.com>
Cc: David Woodhouse <dwmw2@...radead.org>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: rga@...zon.de
Cc: Dave Hansen <dave.hansen@...el.com>
Cc: Asit Mallick <asit.k.mallick@...el.com>
Cc: Andy Lutomirski <luto@...nel.org>
Cc: Josh Poimboeuf <jpoimboe@...hat.com>
Cc: Jason Baron <jbaron@...mai.com>
Cc: Paolo Bonzini <pbonzini@...hat.com>
Cc: Dan Williams <dan.j.williams@...el.com>
Cc: Arjan Van De Ven <arjan.van.de.ven@...el.com>
Cc: Tim Chen <tim.c.chen@...ux.intel.com>
Link: https://lkml.kernel.org/r/20180125095843.645776917@infradead.org
[bwh: Backported to 3.16: also add ASM_CALL_CONSTRAINT]
Signed-off-by: Ben Hutchings <ben@...adent.org.uk>
---
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -7248,13 +7248,14 @@ 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)
+ [sp]"=&r"(tmp),
#endif
+ ASM_CALL_CONSTRAINT
:
- [entry]"r"(entry),
+ THUNK_TARGET(entry),
[ss]"i"(__KERNEL_DS),
[cs]"i"(__KERNEL_CS)
);
Powered by blists - more mailing lists