From: Joshua Brindle <jbrindle@tresys.com>
To: russell@coker.com.au
Cc: selinux <selinux@tycho.nsa.gov>, selinux-dev@tresys.com
Subject: Re: [RFC] Module language syntax
Date: Tue, 14 Jun 2005 08:20:38 -0400 [thread overview]
Message-ID: <42AECB96.9010500@tresys.com> (raw)
In-Reply-To: <200506141512.21436.russell@coker.com.au>
Russell Coker wrote:
>On Saturday 28 May 2005 04:54, Joshua Brindle <jbrindle@tresys.com> wrote:
>
>
>>booleans and conditionals are runtime and are not at all affected by the
>>
>>
>
>So loading a module can define new booleans?
>
>
>
Yes, just like loading a module can define new types, roles, users, etc.
load_policy would continue to set the booleans as it does now I'd imagine
>>loadable modules. The optional dependencies added for modules are
>>totally separate from conditionals and are much closer to m4 ifdefs in
>>practice and could hopefully be used to replace many of them.
>>
>>
>
>The optional parts of modules will still take up disk space.
>
Yes
> I presume that
>they will take up RAM as well - the program that loads the policy won't know
>which modules might be loaded.
>
>
They will only take up ram during module linking. Optional policy tha
has been disabled will never make it to the kernel
>Currently the strict policy is 10M in size and growing. This is a problem
>that will become worse if we remove ifdefs.
>
>
>
The disabled optionals will only be present in their modules. The
advantage here is that the policy should never be 10 meg in kernel
memory if the user has disabled unneeded policy modules.
>Some ifdefs will need to be changed to optional dependencies for correct
>functionality, maybe many. I don't see this as a benefit but rather as an
>unavoidable problem that is outweighed by the benefits of modules.
>
>
The benefits are fairly large. Instead of using an ifdef that depends on
the existance of a filename to determine if a type is available (very
weak dependancy mechanism) you use an optional that depends on that
specific type actually being present. This stops policy breakage that
occurs when you try disabling certain modules that are improperly
ifdef'd. Further, it allows more freedom in policy development since
modules (and optional blocks) will now depend on the existance of types,
roles, etc instead of filenames. For example, if someone wanted to split
up a policy they'd have to search for everywhere the types in those
policies are used and rewrap the statements in ifdefs wheras with this
nothing needs to be done, if the dependancies are met the module and
optional block will become active.
One of the purposes of loadable policy modules was to fix the dependancy
problem in policy. Each module has require block(s) that specify all the
symbols that this particular module will need. The optional blocks are a
way of specifying policy that should optionally be activated given the
presense of certain symbols. The language changes we made make them use
the exact same syntax for each so that, for example, a macro that
declares it's depenencies will be able to do so whether it's in the
global scope of a module or inside an optional without needing to know
the difference.
Joshua Brindle
--
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.
prev parent reply other threads:[~2005-06-14 12:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-27 18:17 [RFC] Module language syntax Joshua Brindle
2005-05-27 18:53 ` Luke Kenneth Casson Leighton
2005-05-27 18:54 ` Joshua Brindle
2005-05-27 20:05 ` Luke Kenneth Casson Leighton
2005-06-14 5:12 ` Russell Coker
2005-06-14 12:20 ` Joshua Brindle [this message]
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=42AECB96.9010500@tresys.com \
--to=jbrindle@tresys.com \
--cc=russell@coker.com.au \
--cc=selinux-dev@tresys.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.