All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel J Walsh <dwalsh@redhat.com>
To: Kyle Moffett <kyle@moffetthome.net>
Cc: selinux@tycho.nsa.gov
Subject: Re: Performance optimization of libsepol and the need for detailed policydb docs.
Date: Sat, 03 Mar 2012 08:25:40 -0500	[thread overview]
Message-ID: <4F521BD4.70104@redhat.com> (raw)
In-Reply-To: <CAGZ=bqKEXNiRp_4YZaTvYEm6JhhAdk0LunwYbgWtuMKWPPAiiA@mail.gmail.com>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 03/03/2012 01:05 AM, Kyle Moffett wrote:
> Hello,
> 
> I'm dissatisfied with some of the performance characteristics of
> the current policydb code for linking policy modules into a
> composite binary policy, and I would like to try to make some
> improvements to that.  In particular, I would like to make it
> reasonably possible to frequently relink and reload the binary
> policy on a very granular basis.  Unfortunately the new policy
> language does not help with this right now because it still seems
> to be translated into the old policy language for compiling.
> 
> For example, I'm interested in the idea of shipping a policy
> module (including interfaces) in each Debian package, so that the
> policy is loaded as part of preinst before the package manager
> begins configuring the package or putting files onto the system and
> unloaded after the package has been purged.
> 
> Another possibility would be a "network policy" analogous to
> "Windows Domain Policy", where you have a base policy built as part
> of the OS packages and then it is automatically extended and
> configured (EG: with new policy or booleans) via a daemon
> communicating with a central policy server.  If integrated with
> PAM, NSS, cgroups, etc, you could allow centralized management and
> configuration of network-wide Mandatory Access Control.  A
> corporate network could easily enforce consistent global SELinux
> labeling of IPsec connections or similar.
> 
> In order for any of that to work, however, the incremental policy
> link time would need to be on the order of a few seconds instead of
> the current multiple-minute link-and-load time for a large
> reference policy.
> 
> In the past (with my previous employer), I participated in some 
> efforts to analyze the performance of libsepol and identified some 
> low-hanging fruit in the form of incorrectly sized hash tables (EG:
> A hash table with 2 entries has equivalent performance to a linked
> list except with a lot of extra code on the front end), but we
> never were able to polish up patches for merging.
> 
> I would like to potentially take on some of this work, but I'd
> really need to have some better documentation on the various binary
> policy formats (base policy, modules, and linked policy).  Is there
> any existing documentation or should I just start by writing some?
> 
> Cheers, Kyle Moffett
> 
> -- 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.
> 
> 
Sounds great to me.  I would love it if we could fix our performance
problems and slowly get rid of booleans, and replace them with
enable/disable modules.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk9SG9QACgkQrlYvE4MpobNnqgCcDnLFEI0OsJ67J41rPdYYwRdC
5YsAn1Fv+YRhdXaNXlvrFCt4ccOBkuA4
=p1w8
-----END PGP SIGNATURE-----

--
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.

  reply	other threads:[~2012-03-03 13:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-03  6:05 Performance optimization of libsepol and the need for detailed policydb docs Kyle Moffett
2012-03-03 13:25 ` Daniel J Walsh [this message]
2012-03-05 15:52 ` James Carter
2012-03-05 19:53 ` Stephen Smalley

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=4F521BD4.70104@redhat.com \
    --to=dwalsh@redhat.com \
    --cc=kyle@moffetthome.net \
    --cc=selinux@tycho.nsa.gov \
    /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.