|  |  | 
  
    |  |  | 
 
  |   |  | 
  
    |  |  | 
  
    |  |  | 
  
    |   xen-changelog
[Xen-changelog] Fix vmx guest issue of allowing accessing	supervisor pag 
| # HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID d0ca851445e2cf79015bc072d4a537c305100cc6
# Parent  a1e99c0104cb3019e65fba1eb13847ac46726c73
Fix vmx guest issue of allowing accessing supervisor page
from user level program.
In shadow fault, we need to check U/S bit in error code.
It is just a fix for shadow32.c, for x86_64 code and
public code, it is already handled.
Signed-off-by: Xiaofeng Ling <xiaofeng.ling@xxxxxxxxx>
diff -r a1e99c0104cb -r d0ca851445e2 xen/arch/x86/shadow32.c
--- a/xen/arch/x86/shadow32.c   Tue Nov 29 10:42:21 2005
+++ b/xen/arch/x86/shadow32.c   Tue Nov 29 10:48:33 2005
@@ -2680,6 +2680,16 @@
             domain_crash_synchronous();
         }
 
+        /* User access violation in guest? */
+        if ( unlikely((regs->error_code & 4) && 
+                      !(l1e_get_flags(gpte) & _PAGE_USER)))
+        {
+            SH_VVLOG("shadow_fault - EXIT: wr fault on super page (%" PRIpte 
")", 
+                    l1e_get_intpte(gpte));
+            goto fail;
+
+        }
+
         if ( unlikely(!l1pte_write_fault(v, &gpte, &spte, va)) )
         {
             SH_VVLOG("shadow_fault - EXIT: l1pte_write_fault failed");
@@ -2693,6 +2703,16 @@
     }
     else
     {
+        /* Read-protection violation in guest? */
+        if ( unlikely((regs->error_code & 1) ))
+        {
+            SH_VVLOG("shadow_fault - EXIT: read fault on super page (%" PRIpte 
")", 
+                    l1e_get_intpte(gpte));
+            goto fail;
+
+        }
+
+
         if ( !l1pte_read_fault(d, &gpte, &spte) )
         {
             SH_VVLOG("shadow_fault - EXIT: l1pte_read_fault failed");
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
 | 
 
| <Prev in Thread] | Current Thread | [Next in Thread> |  | 
[Xen-changelog] Fix vmx guest issue of allowing accessing	supervisor page,
Xen patchbot -unstable <=
 |  |  | 
  
    |  |  |