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

[Xen-changelog] [xen-unstable] xsm: label xen-consumer event channels



# HG changeset patch
# User Daniel De Graaf <dgdegra@xxxxxxxxxxxxx>
# Date 1330523192 0
# Node ID ea7a07622a4321283a1c6b74f8915890dab714a6
# Parent  be9d56fada86d1444ff116104c13d2f8600abf8b
xsm: label xen-consumer event channels

Event channels created during the domain build process for HVM domains
did not call the XSM creation hook. Since these channels are used
internally by Xen, redirect them to DOMAIN_INVAID instead of failing
to create if the XSM hook fails the permissions check.

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


diff -r be9d56fada86 -r ea7a07622a43 xen/common/event_channel.c
--- a/xen/common/event_channel.c        Wed Feb 29 13:43:44 2012 +0000
+++ b/xen/common/event_channel.c        Wed Feb 29 13:46:32 2012 +0000
@@ -1105,7 +1105,7 @@
 {
     struct evtchn *chn;
     struct domain *d = local_vcpu->domain;
-    int            port;
+    int            port, rc;
 
     spin_lock(&d->event_lock);
 
@@ -1113,10 +1113,12 @@
         goto out;
     chn = evtchn_from_port(d, port);
 
+    rc = xsm_evtchn_unbound(d, chn, remote_domid);
+
     chn->state = ECS_UNBOUND;
     chn->xen_consumer = get_xen_consumer(notification_fn);
     chn->notify_vcpu_id = local_vcpu->vcpu_id;
-    chn->u.unbound.remote_domid = remote_domid;
+    chn->u.unbound.remote_domid = !rc ? remote_domid : DOMID_INVALID;
 
  out:
     spin_unlock(&d->event_lock);

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
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®.