From: Daniel De Graaf Subject: Re: [PATCH 09/11] xen: Add DOMCTL to limit the number of event channels a domain may use Date: Fri, 27 Sep 2013 10:29:00 -0400 Message-ID: <5245962C.7050304@tycho.nsa.gov> References: <1380279359-28817-1-git-send-email-david.vrabel@citrix.com> <1380279359-28817-10-git-send-email-david.vrabel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1380279359-28817-10-git-send-email-david.vrabel@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: David Vrabel Cc: David Vrabel , Keir Fraser , Jan Beulich , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On 09/27/2013 06:55 AM, David Vrabel wrote: > From: David Vrabel > > Add XEN_DOMCTL_set_max_evtchn which may be used during domain creation to > set the maximum event channel port a domain may use. This may be used to > limit the amount of Xen resources (global mapping space and xenheap) that > a domain may use for event channels. > > A domain that does not have a limit set may use all the event channels > supported by the event channel ABI in use. > > Signed-off-by: David Vrabel > Cc: Daniel De Graaf > --- [...] > diff --git a/xen/xsm/flask/policy/access_vectors b/xen/xsm/flask/policy/access_vectors > index 5dfe13b..03a8e64 100644 > --- a/xen/xsm/flask/policy/access_vectors > +++ b/xen/xsm/flask/policy/access_vectors > @@ -157,6 +157,8 @@ class domain > set_misc_info > # XEN_DOMCTL_set_virq_handler > set_virq_handler > +# XEN_DOMCTL_set_max_evtchn > + set_max_evtchn > } > > # This is a continuation of class domain, since only 32 permissions can be > # defined per class > class domain2 The new domctl access vector must be added to the "domain2" class, not "domain" which is full (already has 32 items). While the hypervisor compilation does not currently report this as an error, attempting to compile the policy (tools/flask/policy) will report it. -- Daniel De Graaf National Security Agency