[PATCH 4.9 37/92] KVM: VMX: Make indirect call speculation safe

2018-02-09 Thread Greg Kroah-Hartman
4.9-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: r...@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.645776...@infradead.org
Signed-off-by: David Woodhouse 
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
@@ -8676,14 +8676,14 @@ static void vmx_handle_external_intr(str
 #endif
"pushf\n\t"
__ASM_SIZE(push) " $%c[cs]\n\t"
-   "call *%[entry]\n\t"
+   CALL_NOSPEC
:
 #ifdef CONFIG_X86_64
[sp]"="(tmp),
 #endif
"+r"(__sp)
:
-   [entry]"r"(entry),
+   THUNK_TARGET(entry),
[ss]"i"(__KERNEL_DS),
[cs]"i"(__KERNEL_CS)
);




[PATCH 4.9 37/92] KVM: VMX: Make indirect call speculation safe

2018-02-09 Thread Greg Kroah-Hartman
4.9-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: r...@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.645776...@infradead.org
Signed-off-by: David Woodhouse 
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
@@ -8676,14 +8676,14 @@ static void vmx_handle_external_intr(str
 #endif
"pushf\n\t"
__ASM_SIZE(push) " $%c[cs]\n\t"
-   "call *%[entry]\n\t"
+   CALL_NOSPEC
:
 #ifdef CONFIG_X86_64
[sp]"="(tmp),
 #endif
"+r"(__sp)
:
-   [entry]"r"(entry),
+   THUNK_TARGET(entry),
[ss]"i"(__KERNEL_DS),
[cs]"i"(__KERNEL_CS)
);