[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen stable-4.5] Revert "x86/hvm: Perform a user instruction fetch for a FEP in userspace"



commit c18dfbb88670e9f2cabd93bbb32f661b71ffb73a
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Mon Sep 12 17:50:13 2016 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Mon Sep 12 17:50:13 2016 +0200

    Revert "x86/hvm: Perform a user instruction fetch for a FEP in userspace"
    
    This reverts commit 95559492c958e45fa7c01b1b3e0fb704e5b8b9eb,
    which doesn't build and would, in its current form, use
    uninitialized data if it did.
---
 xen/arch/x86/hvm/svm/svm.c | 4 +---
 xen/arch/x86/hvm/vmx/vmx.c | 4 +---
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/xen/arch/x86/hvm/svm/svm.c b/xen/arch/x86/hvm/svm/svm.c
index 63c6a6b..d8ab74d 100644
--- a/xen/arch/x86/hvm/svm/svm.c
+++ b/xen/arch/x86/hvm/svm/svm.c
@@ -2128,12 +2128,10 @@ static void svm_vmexit_ud_intercept(struct 
cpu_user_regs *regs)
 
     if ( opt_hvm_fep )
     {
-        uint32_t walk = (ctxt.seg_reg[x86_seg_ss].attr.fields.dpl == 3)
-            ? PFEC_user_mode : 0;
         char sig[5]; /* ud2; .ascii "xen" */
 
         if ( (hvm_fetch_from_guest_virt_nofault(
-                  sig, regs->eip, sizeof(sig), walk) == HVMCOPY_okay) &&
+                  sig, regs->eip, sizeof(sig), 0) == HVMCOPY_okay) &&
              (memcmp(sig, "\xf\xbxen", sizeof(sig)) == 0) )
         {
             regs->eip += sizeof(sig);
diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c
index 498221d..072ac6c 100644
--- a/xen/arch/x86/hvm/vmx/vmx.c
+++ b/xen/arch/x86/hvm/vmx/vmx.c
@@ -2546,12 +2546,10 @@ static void vmx_vmexit_ud_intercept(struct 
cpu_user_regs *regs)
 
     if ( opt_hvm_fep )
     {
-        uint32_t walk = (ctxt.seg_reg[x86_seg_ss].attr.fields.dpl == 3)
-            ? PFEC_user_mode : 0;
         char sig[5]; /* ud2; .ascii "xen" */
 
         if ( (hvm_fetch_from_guest_virt_nofault(
-                  sig, regs->eip, sizeof(sig), walk) == HVMCOPY_okay) &&
+                  sig, regs->eip, sizeof(sig), 0) == HVMCOPY_okay) &&
              (memcmp(sig, "\xf\xbxen", sizeof(sig)) == 0) )
         {
             regs->eip += sizeof(sig);
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.5

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.