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

[Xen-changelog] [xen-unstable] xsm: always allow setting non-present PTEs



# HG changeset patch
# User Daniel De Graaf <dgdegra@xxxxxxxxxxxxx>
# Date 1322862384 28800
# Node ID 3d28febb1076b294af9609931c7fdf59d8303766
# Parent  2bff84f3334136f0deb2951281297491e3aa158a
xsm: always allow setting non-present PTEs

Signed-off-by: Daniel De Graaf <dgdegra@xxxxxxxxxxxxx>
---


diff -r 2bff84f33341 -r 3d28febb1076 xen/xsm/flask/hooks.c
--- a/xen/xsm/flask/hooks.c     Fri Dec 02 13:45:56 2011 -0800
+++ b/xen/xsm/flask/hooks.c     Fri Dec 02 13:46:24 2011 -0800
@@ -1016,6 +1016,9 @@
     struct domain_security_struct *dsec;
     u32 fsid;
 
+    if ( !(l1e_get_flags(l1e_from_intpte(fpte)) & _PAGE_PRESENT) )
+        return 0;
+
     dsec = d->ssid;
 
     if ( l1e_get_flags(l1e_from_intpte(fpte)) & _PAGE_RW )
@@ -1053,6 +1056,12 @@
     unsigned long mfn;
     struct domain_security_struct *dsec;
 
+    if ( !(l1e_get_flags(pte) & _PAGE_PRESENT) )
+        return 0;
+
+    if ( l1e_get_flags(pte) & _PAGE_RW )
+        map_perms |= MMU__MAP_WRITE;
+
     dsec = d->ssid;
 
     mfn = get_gfn_untyped(f, l1e_get_pfn(pte));
@@ -1060,9 +1069,6 @@
     if ( rc )
         return rc;
 
-    if ( l1e_get_flags(pte) & _PAGE_RW )
-        map_perms |= MMU__MAP_WRITE;
-
     return avc_has_perm(dsec->sid, psid, SECCLASS_MMU, map_perms, NULL);
 }
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

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