All of lore.kernel.org
 help / color / mirror / Atom feed
* object context records for Xen
@ 2009-08-21 14:42 Stephen Smalley
  2009-08-24 14:53 ` Joshua Brindle
  0 siblings, 1 reply; 7+ messages in thread
From: Stephen Smalley @ 2009-08-21 14:42 UTC (permalink / raw)
  To: selinux; +Cc: Joshua Brindle, Chad Sellers, George S. Coker, II

Hi,

Xen needs its own object context (ocontext) records in the policy for
various resources (pirq, iomem, ioport, device), and has no need for the
Linux object context records other than initial SIDs.  Thus, rather than
just add new OCON_ indices and waste space in both the Linux and Xen
policies, I'd like to be able to interpret OCON_ indices differently
depending on some other value in the policy that identifies the target
kernel (Linux, Xen, FreeBSD, Solaris, ...). Possible ways to identify
the target kernel within the policy image:

- Use different policydb strings ("SE Linux", "Xen Flask", ...) in the
header.  I already introduced support for at least one other policydb
string ("Flask") in policydb_read() in libsepol so that we didn't have
to use "SE Linux" as the string in the OpenSolaris FMAC policy files.
Each kernel would only need to support reading files with its own string
identifier and would reject all others.  Only libsepol would support all
of them for reading and writing.

- Use the config flags in the header.  We are presently only using 3
bits in the config field (MLS, reject_unknown, allow_unknown), so we can
easily use a bit for each target kernel.  Not very general/scalable, but
it isn't clear that we need this for very many cases.

- Introduce an entirely new field to the header to select the target
kernel.  In which case it could just be an unsigned integer with defined
values for Linux, Solaris, Xen, FreeBSD, etc.  This is the only one that
absolutely requires a new policy version (policy.25).

Other aspects of the policy might likewise get interpreted differently
based on the target kernel, such as policy capabilities (the current
ones are very Linux-specific).

Then we'd have to decide how we want to drive selection of the target
kernel when building the policy; it could be an option to
checkpolicy/checkmodule (ala MLS and handle_unknown behavior) or it
could be an actual directive within the source policy configuration.

Thoughts?

-- 
Stephen Smalley
National Security Agency


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-08-24 16:57 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-21 14:42 object context records for Xen Stephen Smalley
2009-08-24 14:53 ` Joshua Brindle
2009-08-24 15:05   ` Joshua Brindle
2009-08-24 15:19     ` Stephen Smalley
2009-08-24 15:20       ` Joshua Brindle
2009-08-24 16:57         ` Stephen Smalley
2009-08-24 15:14   ` Stephen Smalley

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.