All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jean-Edouard LEJOSNE <jean-edouard.lejosne@citrix.com>
To: xen-devel@lists.xensource.com
Subject: About XSM/flask
Date: Wed, 22 Sep 2010 16:46:16 +0100	[thread overview]
Message-ID: <4C9A24C8.6090609@citrix.com> (raw)

  Hi!

I've got some trouble with XSM/flask recently.
Basically, it blocks stuffs when not enforced, which is not (?) supposed to happen.

The problem is actually pretty simple when looking at the code.
As an example, here is a function from xen/xsm/flask/hooks.c :

static int flask_hvm_param(struct domain *d, unsigned long op)
{
      u32 perm;

      switch ( op )
      {
          case HVMOP_set_param:
              perm = HVM__SETPARAM;
          break;
          case HVMOP_get_param:
              perm = HVM__GETPARAM;
          break;
          default:
              return -EPERM;
      }

      return domain_has_perm(current->domain, d, SECCLASS_HVM, perm);
}

As it is pretty obvious, if "op" is not "HVMOP_set_param" or
"HVMOP_get_param", XSM will deny the action, even if we are in permissive mode.
It is currently a problem for us because, for this particular function
at least, we use other values of "op" (for dirty bit tracking).

I think in that case, flask should just print a warning and return 0
when in permissive mode.
The only other solution I see is to make sure every possible values are
treated by flask, and that it's maintained that way, which is probably a
pain.

So my question is : is there something that should be done about that? Is the current behaviour mandatory for some reason I didn't think about?

Thanks,

-- 
Jean-Edouard LEJOSNE
XenClient Lead Software Developpment Engineer
Citrix Systems
Cambridge, UK

             reply	other threads:[~2010-09-22 15:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-22 15:46 Jean-Edouard LEJOSNE [this message]
2010-09-22 16:33 ` About XSM/flask George S. Coker, II
2010-09-22 20:29   ` Jean Guyader

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=4C9A24C8.6090609@citrix.com \
    --to=jean-edouard.lejosne@citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /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.