All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xen: use XSM instead of IS_PRIV for getvcpuinfo
@ 2012-07-23 14:47 Shakeel Butt
  0 siblings, 0 replies; only message in thread
From: Shakeel Butt @ 2012-07-23 14:47 UTC (permalink / raw)
  To: xen-devel

(Following the reasoning of changeset 24620)

The XEN_DOMCTL_getvcpuinfo domctl only reads the status of
a vcpu and does not manipulate it. Since XSM modules provides
fine-grained control, it is better to use XSM as opposed to IS_PRIV.


Signed-off-by: Shakeel Butt <shakeel.butt@gmail.com>

diff -r 3c426da4788e xen/common/domctl.c
--- a/xen/common/domctl.c
+++ b/xen/common/domctl.c
@@ -268,6 +268,7 @@ long do_domctl(XEN_GUEST_HANDLE(xen_domc
     }
 #ifdef XSM_ENABLE
     case XEN_DOMCTL_getdomaininfo:
+    case XEN_DOMCTL_getvcpuinfo:
         break;
 #endif
     default:
diff -r 3c426da4788e xen/xsm/dummy.c
--- a/xen/xsm/dummy.c
+++ b/xen/xsm/dummy.c
@@ -78,6 +78,8 @@ static int dummy_getvcpucontext (struct

 static int dummy_getvcpuinfo (struct domain *d)
 {
+    if ( !IS_PRIV(current->domain) )
+        return -EPERM;
     return 0;
 }

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-07-23 14:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-23 14:47 [PATCH] xen: use XSM instead of IS_PRIV for getvcpuinfo Shakeel Butt

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.