All of lore.kernel.org
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Daniel De Graaf <dgdegra@tycho.nsa.gov>,
	m.a.young@durham.ac.uk, xen-devel@lists.xen.org
Subject: Re: [PATCH for-4.5] xsm/flask: add two missing domctls
Date: Tue, 25 Nov 2014 13:21:05 -0500	[thread overview]
Message-ID: <20141125182105.GA4171@laptop.dumpdata.com> (raw)
In-Reply-To: <5474C819.5080303@citrix.com>

On Tue, Nov 25, 2014 at 06:19:05PM +0000, Andrew Cooper wrote:
> On 25/11/14 16:57, Daniel De Graaf wrote:
> > Reported-by: Michael Young <m.a.young@durham.ac.uk>
> > Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
> 
> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
> 
> CC'd Konrad, as this should be accepted into Xen-4.5.  Without it,
> migration/suspend fails with -EPERM in the default case when XSM is
> compiled into Xen.

Yup. Release-Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> 
> Daniel: there are 4 hypercalls for getting/setting bits of PV VCPU state:
> 
> XEN_DOMCTL_{get,set}vcpucontext
> XEN_DOMCTL_{get,set}_ext_vcpucontext
> XEN_DOMCTL_{get,set}vcpuextstate
> XEN_DOMCTL_{get,set}_vcpu_msrs
> 
> I see no reason for these to have separate access vectors; you typically
> either need to use all of them, or none, but I presume it is too late to
> coalesce the vectors in a backwards compatible way?
> 
> ~Andrew
> 
> > ---
> >  xen/xsm/flask/hooks.c               | 2 ++
> >  xen/xsm/flask/policy/access_vectors | 2 ++
> >  2 files changed, 4 insertions(+)
> >
> > diff --git a/xen/xsm/flask/hooks.c b/xen/xsm/flask/hooks.c
> > index 0ba2ce9..d48463f 100644
> > --- a/xen/xsm/flask/hooks.c
> > +++ b/xen/xsm/flask/hooks.c
> > @@ -672,9 +672,11 @@ static int flask_domctl(struct domain *d, int cmd)
> >          return current_has_perm(d, SECCLASS_HVM, HVM__CACHEATTR);
> >  
> >      case XEN_DOMCTL_set_ext_vcpucontext:
> > +    case XEN_DOMCTL_set_vcpu_msrs:
> >          return current_has_perm(d, SECCLASS_DOMAIN, DOMAIN__SETEXTVCPUCONTEXT);
> >  
> >      case XEN_DOMCTL_get_ext_vcpucontext:
> > +    case XEN_DOMCTL_get_vcpu_msrs:
> >          return current_has_perm(d, SECCLASS_DOMAIN, DOMAIN__GETEXTVCPUCONTEXT);
> >  
> >      case XEN_DOMCTL_setvcpuextstate:
> > diff --git a/xen/xsm/flask/policy/access_vectors b/xen/xsm/flask/policy/access_vectors
> > index 1cd451e..1da9f63 100644
> > --- a/xen/xsm/flask/policy/access_vectors
> > +++ b/xen/xsm/flask/policy/access_vectors
> > @@ -151,8 +151,10 @@ class domain
> >  # XEN_DOMCTL_sendtrigger
> >      trigger
> >  # XEN_DOMCTL_get_ext_vcpucontext
> > +# XEN_DOMCTL_set_vcpu_msrs
> >      getextvcpucontext
> >  # XEN_DOMCTL_set_ext_vcpucontext
> > +# XEN_DOMCTL_get_vcpu_msrs
> >      setextvcpucontext
> >  # XEN_DOMCTL_getvcpuextstate
> >      getvcpuextstate
> 
> 

  reply	other threads:[~2014-11-25 18:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-25 16:57 [PATCH for-4.5] xsm/flask: add two missing domctls Daniel De Graaf
2014-11-25 18:19 ` Andrew Cooper
2014-11-25 18:21   ` Konrad Rzeszutek Wilk [this message]
2014-11-25 19:33   ` Daniel De Graaf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141125182105.GA4171@laptop.dumpdata.com \
    --to=konrad.wilk@oracle.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=dgdegra@tycho.nsa.gov \
    --cc=m.a.young@durham.ac.uk \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.