All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Carter <jwcart2@tycho.nsa.gov>
To: Nick Kralevich <nnk@google.com>
Cc: SELinux <selinux@tycho.nsa.gov>
Subject: Re: [PATCH v2] libsepol: In module_to_cil create one attribute for each unique set
Date: Wed, 5 Apr 2017 11:55:42 -0400	[thread overview]
Message-ID: <cddc3e65-1074-e500-e9a5-039d9fc51e2a@tycho.nsa.gov> (raw)
In-Reply-To: <CAFJ0LnHSyweyk8NkijG2=2cfB38wMutMKHfY3gvFcPgNYdjWJA@mail.gmail.com>

On 04/05/2017 11:42 AM, Nick Kralevich wrote:
> I noticed that this change hasn't landed in the selinux git repository
> yet. It helps solve some problems we're seeing with regards to
> excessive number of attributes. Is there something holding up this
> change from being committed?
>

No. I've just been busy working on another patch that should also help with an 
excessive number of attributes.

Jim

> -- Nick
>
> On Wed, Mar 29, 2017 at 11:58 AM, James Carter <jwcart2@tycho.nsa.gov> wrote:
>> CIL does not allow type or role sets in certain rules (such as allow
>> rules). It does, however, allow sets in typeattributeset and
>> roleattributeset statements. Because of this, when module_to_cil
>> translates a policy into CIL, it creates a new attribute for each
>> set that it encounters. But often the same set is used multiple times
>> which means that more attributes are created then necessary. As the
>> number of attributes increases the time required for the kernel to
>> make each policy decision increases which can be a problem.
>>
>> To help reduce the number of attributes in a kernel policy,
>> when module_to_cil encounters a role or type set search to see if the
>> set was encountered already and, if it was, use the previously
>> generated attribute instead of creating a new one.
>>
>> Testing on Android and Refpolicy policies show that this reduces the
>> number of attributes generated by about 40%.


-- 
James Carter <jwcart2@tycho.nsa.gov>
National Security Agency

  reply	other threads:[~2017-04-05 15:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-29 18:58 [PATCH v2] libsepol: In module_to_cil create one attribute for each unique set James Carter
2017-04-05 15:42 ` Nick Kralevich
2017-04-05 15:55   ` James Carter [this message]
2017-04-05 16:29 ` James Carter

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=cddc3e65-1074-e500-e9a5-039d9fc51e2a@tycho.nsa.gov \
    --to=jwcart2@tycho.nsa.gov \
    --cc=nnk@google.com \
    --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.