From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel De Graaf Subject: Re: [PATCH v6 05/10] xsm: add XENMEM_soft_reset support Date: Wed, 20 May 2015 19:30:46 -0400 Message-ID: <555D1926.3020309@tycho.nsa.gov> References: <1431510585-12544-1-git-send-email-vkuznets@redhat.com> <1431510585-12544-6-git-send-email-vkuznets@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YvDSX-0005j3-P0 for xen-devel@lists.xenproject.org; Wed, 20 May 2015 23:31:33 +0000 In-Reply-To: <1431510585-12544-6-git-send-email-vkuznets@redhat.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: Vitaly Kuznetsov , xen-devel@lists.xenproject.org Cc: Andrew Jones , Julien Grall , Keir Fraser , Ian Campbell , Stefano Stabellini , Andrew Cooper , Ian Jackson , Olaf Hering , Tim Deegan , David Vrabel , Jan Beulich , Wei Liu List-Id: xen-devel@lists.xenproject.org On 05/13/2015 05:49 AM, Vitaly Kuznetsov wrote: > Dummy policy just checks that the current domain is privileged, > in flask policy soft_reset is added to create_domain. > > Signed-off-by: Vitaly Kuznetsov I think the FLASK policy should also check that memory can be moved from d1 to d2, independent of the check that the toolstack can move the memory of d1 (or d2). While I would expect that the security contexts of d1 and d2 would be identical in most cases (and only allow that in the example policy), there may be reasons to change the context along with the kexec operation. The best examples I can think of are kexec from a bootloader domain of some kind, or an installation that transitions into an active system that needs access to a different network or set of peer domains. For the example, policy, I'd add something like allow $2 $2 : mmu reset_transfer; to the create_domain interface. [...] > --- a/xen/xsm/flask/policy/access_vectors > +++ b/xen/xsm/flask/policy/access_vectors > @@ -366,6 +366,10 @@ class mmu > # source = domain making the hypercall > # target = domain whose pages are being exchanged > exchange > +# XENMEM_soft_reset: > +# source = source soft reset domain > +# target = destination soft reset domain > + soft_reset These comments are a bit ambiguous. I would suggest something like: # source = domain making the hypercall # target = domain being reset (source or destination) -- Daniel De Graaf National Security Agency