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

[Xen-changelog] [xen-unstable] xen: use XSM instead of IS_PRIV for getdomaininfo



# HG changeset patch
# User Daniel De Graaf <dgdegra@xxxxxxxxxxxxx>
# Date 1327758545 0
# Node ID 926e0820d615d7224f22a44deb8bbf4ebf078cf0
# Parent  1025acf332ded1a14ef44a813d13bc0595ac5386
xen: use XSM instead of IS_PRIV for getdomaininfo

The XEN_DOMCTL_getdomaininfo domctl does not allow manipulation of
domains, only basic information such as size and state, so its use
does not fully justify making a domain privileged. XSM modules can
also provide fine-grained control over what domains are visible to
domains that call getdomaininfo.

If XSM is disabled (either at compile time or by using the dummy XSM
module) then there is no change in behavior: only IS_PRIV domains can
use this domctl. If enabled, the XSM module controls access.

Signed-off-by: Daniel De Graaf <dgdegra@xxxxxxxxxxxxx>
Committed-by: Keir Fraser <keir@xxxxxxx>
---


diff -r 1025acf332de -r 926e0820d615 xen/common/domctl.c
--- a/xen/common/domctl.c       Sat Jan 28 13:48:34 2012 +0000
+++ b/xen/common/domctl.c       Sat Jan 28 13:49:05 2012 +0000
@@ -264,6 +264,10 @@
             return -EPERM;
         break;
     }
+#ifdef XSM_ENABLE
+    case XEN_DOMCTL_getdomaininfo:
+        break;
+#endif
     default:
         if ( !IS_PRIV(current->domain) )
             return -EPERM;
diff -r 1025acf332de -r 926e0820d615 xen/xsm/dummy.c
--- a/xen/xsm/dummy.c   Sat Jan 28 13:48:34 2012 +0000
+++ b/xen/xsm/dummy.c   Sat Jan 28 13:49:05 2012 +0000
@@ -66,6 +66,8 @@
 
 static int dummy_getdomaininfo (struct domain *d)
 {
+    if ( !IS_PRIV(current->domain) )
+        return -EPERM;
     return 0;
 }
 

_______________________________________________
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®.