All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel De Graaf <dgdegra@tycho.nsa.gov>
To: baozeng@nfs.iscas.ac.cn
Cc: xen-devel@lists.xen.org
Subject: Re: XSM/FLASK questions
Date: Wed, 13 Mar 2013 12:55:57 -0400	[thread overview]
Message-ID: <5140AF9D.8010304@tycho.nsa.gov> (raw)
In-Reply-To: <33800.124.16.141.1.1363182758.squirrel@nfs.iscas.ac.cn>

On 03/13/2013 09:52 AM, baozeng@nfs.iscas.ac.cn wrote:
> Hello all,
>      I played with Xen 4.1.0, XSM/FLASK module to see whether it works well or not. I
> changed the policy file to make dom0 cannot create a domU labeled with domHU_t
> type.  The policy.conf generated using "make policy" command is as the
> following:
>      type domHU_t, domain_type;
>      allow dom0_t domHU_t:domain {max_vcpus setdomainmaxmem
>
>                                  setaddrsize getdomaininfo hypercall
>
>                                  setvcpucontext scheduler unpause
>
>                                  getvcpuinfo getaddrsize getvcpuaffinity}; //I
> removed "create"
>
>     Then I added the label domHU_t for a domU in its configure file as the following:
>
>     access_control = ['policy=,label=system_u:system_r:domHU_t']
>
> After that I made install the FLASK policy using "make install" and rebooted with
> flask_enforcing = 1. But when I started the domU using "xm create domU.cfg", it can
> still create it successfully.
>     Since I removed the "create" operation in the policy, why dom0 can still create a
> domU labeled with domHU_t? any idea? thanks.
>
>
>        Best Regards,
>                 Baozeng Ding
>

You may want to ensure that the policy is being loaded - you need to
reference it in your grub menu.lst as another module to xen. You can
verify this using xl dmesg or "xl list -Z" - with no policy loaded, dom0
is labeled "dom0" instead of the "system_u:system_r:dom0_t" as defined in
the policy. I am not familiar labeling in xm's config file, so I assume
that your syntax works in 4.1; in xl, it would need to be written as:

seclabel='system_u:system_r:domHU_t'

You may also want to check that there isn't another allow rule that you
didn't remove by running:

sesearch -A -s dom0_t -t domHU_t -c domain -p create /boot/xenpolicy.24

This will return empty output if there is no allow rule.

-- 
Daniel De Graaf
National Security Agency

  reply	other threads:[~2013-03-13 16:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-13 13:52 XSM/FLASK questions baozeng
2013-03-13 16:55 ` Daniel De Graaf [this message]
2013-03-15 10:53   ` baozeng

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=5140AF9D.8010304@tycho.nsa.gov \
    --to=dgdegra@tycho.nsa.gov \
    --cc=baozeng@nfs.iscas.ac.cn \
    --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.