All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] VMX: values written to MSR_IA32_SYSENTER_E[IS]P should be canonical
@ 2014-10-30 14:41 Jan Beulich
  2014-10-30 14:46 ` Andrew Cooper
  2014-10-31  7:04 ` Tian, Kevin
  0 siblings, 2 replies; 3+ messages in thread
From: Jan Beulich @ 2014-10-30 14:41 UTC (permalink / raw)
  To: xen-devel; +Cc: Kevin Tian, Eddie Dong, Jun Nakajima

[-- Attachment #1: Type: text/plain, Size: 822 bytes --]

A recent KVM change by Nadav Amit <namit@cs.technion.ac.il> helped spot
that we have the same issue as they did.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Tim Deegan <tim@xen.org>

--- a/xen/arch/x86/hvm/vmx/vmx.c
+++ b/xen/arch/x86/hvm/vmx/vmx.c
@@ -2273,9 +2273,13 @@ static int vmx_msr_write_intercept(unsig
         __vmwrite(GUEST_SYSENTER_CS, msr_content);
         break;
     case MSR_IA32_SYSENTER_ESP:
+        if ( !is_canonical_address(msr_content) )
+            goto gp_fault;
         __vmwrite(GUEST_SYSENTER_ESP, msr_content);
         break;
     case MSR_IA32_SYSENTER_EIP:
+        if ( !is_canonical_address(msr_content) )
+            goto gp_fault;
         __vmwrite(GUEST_SYSENTER_EIP, msr_content);
         break;
     case MSR_IA32_DEBUGCTLMSR: {




[-- Attachment #2: VMX-sysenter-MSRs-canonical.patch --]
[-- Type: text/plain, Size: 887 bytes --]

VMX: values written to MSR_IA32_SYSENTER_E[IS]P should be canonical

A recent KVM change by Nadav Amit <namit@cs.technion.ac.il> helped spot
that we have the same issue as they did.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Tim Deegan <tim@xen.org>

--- a/xen/arch/x86/hvm/vmx/vmx.c
+++ b/xen/arch/x86/hvm/vmx/vmx.c
@@ -2273,9 +2273,13 @@ static int vmx_msr_write_intercept(unsig
         __vmwrite(GUEST_SYSENTER_CS, msr_content);
         break;
     case MSR_IA32_SYSENTER_ESP:
+        if ( !is_canonical_address(msr_content) )
+            goto gp_fault;
         __vmwrite(GUEST_SYSENTER_ESP, msr_content);
         break;
     case MSR_IA32_SYSENTER_EIP:
+        if ( !is_canonical_address(msr_content) )
+            goto gp_fault;
         __vmwrite(GUEST_SYSENTER_EIP, msr_content);
         break;
     case MSR_IA32_DEBUGCTLMSR: {

[-- Attachment #3: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-10-31  7:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-30 14:41 [PATCH] VMX: values written to MSR_IA32_SYSENTER_E[IS]P should be canonical Jan Beulich
2014-10-30 14:46 ` Andrew Cooper
2014-10-31  7:04 ` Tian, Kevin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.