All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel De Graaf <dgdegra@tycho.nsa.gov>
To: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
	Keir Fraser <keir@xen.org>
Subject: Re: [PATCH 8/8] xl.pod.1: improve documentation of FLASK commands
Date: Thu, 15 Dec 2011 14:10:28 -0500	[thread overview]
Message-ID: <4EEA4624.3080308@tycho.nsa.gov> (raw)
In-Reply-To: <alpine.DEB.2.00.1112151639190.3517@kaball-desktop>

On 12/15/2011 11:46 AM, Stefano Stabellini wrote:
> On Tue, 13 Dec 2011, Daniel De Graaf wrote:
>> +=head2 FLASK
>> +
>> +=over 4
>> +
>> +=item B<getenforce>
>> +
>> +Determine if the FLASK security module is loaded and enforcing its policy.
>> +
>> +=item B<setenforce> I<1|0|Enforcing|Permissive>
>> +
>> +Enable or disable enforcing of the FLASK access controls. The default is
>> +permissive and can be changed using the flask_enforcing option on the
>> +hypervisor's command line.
>> +
>> +=item B<loadpolicy> I<policy-file>
>> +
>> +Load FLASK policy from the given policy file. The initial policy is provided to
>> +the hypervisor as a multiboot module; this command allows runtime updates to the
>> +policy. Loading new security policy will reset runtime changes to device labels.
> 
> Thanks for the patch!
> Since we are trying to improve the documentation for Xl, would you be up
> for writing a couple of more lines explaining why people might want to
> use XSM?

FLASK is a security framework that defines a mandatory access control policy
providing fine-grained controls over Xen domains, allowing the policy writer
to define what interactions between domains, devices, and the hypervisor are
permitted. Some example of what you can do using XSM/FLASK:
 - Prevent two domains from communicating via event channels or grants
 - Control which domains can use device passthrough (and which devices)
 - Restrict or audit operations performed by privileged domains
 - Prevent a privileged domain from arbitrarily mapping pages from other domains

Note that some of these examples require dom0 disaggregation to be useful, since
the domain build process requires the ability to write to the new domain's memory.

> In case there are some parameters to be used in the VM config
> file, could you please write a simple text file, like
> docs/misc/xl-network-configuration.markdown, describing which ones they
> are?

There is only one domain configuration parameter (the security label), which
I'm not sure is enough to justify its own file. If using the example policy,
"seclabel='system_u:system_r:domU_t'" would be used for PV domains, while
"seclabel='system_u:system_r:domHU_t'" would be used for HVM domains. A more
complex policy may have a different type for each domain.

It would be better to refer to existing SELinux documentation for an
explanation of the meanings of system_u, system_r, domU_t, and possible MLS
labels. For simple policies, the user and role portions of the label will
be unused and will always be "system_u:system_r".

> Finally it would be great if you could submit, as a separate patch, an
> example policy file that we can keep under tools/examples/ or docs/misc
> for everybody to use.

There is already an example policy file in tools/flask/policy/policy/modules/xen/xen.te
although it will likely require additional rules to be run in enforcing mode.
The policy is not built as part of the normal build process, but it can be
built by running "make -C tools/flask/policy". If using Fedora 16 (or systems
with a checkpolicy version >24) the Makefile will need to be adjusted to
produce policy version 24 which is the latest version supported by Xen.

-- 
Daniel De Graaf
National Security Agency

  reply	other threads:[~2011-12-15 19:10 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-13 20:38 [PATCH 0/8] New XSM hooks and updates Daniel De Graaf
2011-12-13 20:38 ` [PATCH 1/8] xsm/flask: Add missing unlock on error path Daniel De Graaf
2011-12-13 20:38 ` [PATCH 2/8] xsm/flask: report memory and IO ranges in audit messages Daniel De Graaf
2011-12-13 20:38 ` [PATCH 3/8] xsm: only log dummy override if not setting up dummy_xsm_ops Daniel De Graaf
2011-12-13 20:38 ` [PATCH 4/8] xsm: add remote_remap permission Daniel De Graaf
2011-12-13 20:38 ` [PATCH 5/8] xsm: Add missing access checks Daniel De Graaf
2011-12-13 20:38 ` [PATCH 6/8] xsm: fix up dummy ops Daniel De Graaf
2011-12-13 20:38 ` [PATCH 7/8] xsm: add checks on PCI configuration access Daniel De Graaf
2011-12-13 20:38 ` [PATCH 8/8] xl.pod.1: improve documentation of FLASK commands Daniel De Graaf
2011-12-14 10:41   ` Ian Campbell
2011-12-15 16:46   ` Stefano Stabellini
2011-12-15 19:10     ` Daniel De Graaf [this message]
2011-12-15 20:56       ` Konrad Rzeszutek Wilk
2011-12-15 21:45         ` [PATCH] flask/policy: Update example policy Daniel De Graaf
2011-12-20 18:20           ` Ian Jackson
2011-12-15 21:57         ` [PATCH 8/8] xl.pod.1: improve documentation of FLASK commands Daniel De Graaf
2012-01-04 10:47           ` Stefano Stabellini
2012-01-04 15:03             ` Daniel De Graaf
2012-01-04 15:05               ` [PATCH 1/2] docs: Update xsm-flask documentation Daniel De Graaf
2012-01-04 15:05                 ` [PATCH 2/2] flask/policy: add missing manage_domain rules Daniel De Graaf
2012-01-10 16:05                 ` [PATCH 1/2] docs: Update xsm-flask documentation Ian Jackson
2012-01-04 16:26               ` [PATCH 8/8] xl.pod.1: improve documentation of FLASK commands Ian Campbell
2012-01-04 16:49               ` Stefano Stabellini
2012-01-04 16:54                 ` Ian Campbell
2012-01-04 18:28                   ` Daniel De Graaf
2012-01-05  8:48                     ` Ian Campbell
2012-01-05 11:19                       ` Stefano Stabellini
2011-12-20 18:21       ` Ian Jackson

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=4EEA4624.3080308@tycho.nsa.gov \
    --to=dgdegra@tycho.nsa.gov \
    --cc=keir@xen.org \
    --cc=stefano.stabellini@eu.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.