All of lore.kernel.org
 help / color / mirror / Atom feed
From: KaiGai Kohei <kaigai@ak.jp.nec.com>
To: Stephen Smalley <sds@tycho.nsa.gov>
Cc: Yuichi Nakamura <ynakam@hitachisoft.jp>,
	"Christopher J. PeBenito" <cpebenito@tresys.com>,
	busybox@kaigai.gr.jp, selinux@tycho.nsa.gov,
	Karl MacMillan <kmacmillan@mentalrootkit.com>,
	Chad Sellers <csellers@tresys.com>
Subject: Re: Separating libselinux/libsepol (Was:  Re: BusyBox: load_policy applet)
Date: Wed, 28 Mar 2007 10:57:25 +0900	[thread overview]
Message-ID: <4609CB85.1060401@ak.jp.nec.com> (raw)
In-Reply-To: <1174997707.3864.261.camel@moss-spartans.epoch.ncsc.mil>

>> The SELinux for embedded in my brain(future SEDiet work) for now is following.
>> * Embedded SELinux development kit is prepared and it has following features.
>> * BusyBox includes SELinux commands
>> * Developers can choose required features(boolean, module, semanage etc)
>> * To implement it following will be necessary.
>> * libselinux/libsepol/libsemanage is separated
>> * Something like ENABLE_BOOLEAN, ENABLE_MODULE, ENABLE_SEMANAGE is embedded in source codes of libse*, BusyBox.
>> * Least set of refpolicy is prepared: 
>>   - only core policy(kernel policy module?) and macros are enabled by default
>>   - supports both modular and monolitic
>>   - To write new policy, SEEdit or other tools can be used
>>   - has a compiler that has feature for size optimization
> 
> For the most part, this approach sounds fine, and I suspect that you
> could even introduce a build option for creating a minimal subset of
> libselinux as well as the other libraries.  Note that the loadable
> policy module support depends on libsemanage, so I doubt you would
> support separate ENABLE_MODULE vs. ENABLE_SEMANAGE options unless you
> just mean the set of utility programs.
> 
> Some specific questions and comments:
> 1) Do you think you will need the legacy support for setting local
> persistent booleans without using libsemanage?  We were planning on
> dropping that support out of libselinux and libsepol in the 2.x/devel
> series.

I want to mention that separating libselinux/libsepol is not the only way
to reduce binary size.
Is it possible to replace some functions rare needed in the target system
by empty implemented functions, isn't it? I think this approach enables
more flexible selection of functionalities than the simple separation.

The typical example is userspace avc. I think seldom people use userspace
object managers like XACE/SELinux on embedded systems.
The sum of avc.o, avc_internal.o and avc_sidtab.o is about 32kb (on i386).
Because the size of libselinux.a is about 146kb, we will be able to reduce
about 20% of binary size.

Currently, I don't have actual measurement of the minimum binary size of
libsepol needed to handle preserving boolean variables and so on.
Who can estimate it?

Thanks,

> 2) How do you plan to support initial policy load in the embedded
> environment?  From an initramfs, as proposed for Ubuntu, or via modified
> init functionality in busybox, as in current distributions that support
> SELinux?  Do you intend to replicate the logic that currently lives in
> selinux_init_load_policy() for selecting the initial state of SELinux
> (disabled/enforcing/permissive) based on /etc/selinux/config and the
> kernel parameters somewhere else?
>
> 3) I'd much prefer to see your policy optimization work go into
> refpolicy and any "optimizing" policy compiler work go into checkpolicy
> rather than keeping it in your own SEEdit-specific policy and tool.

-- 
Open Source Software Promotion Center, NEC
KaiGai Kohei <kaigai@ak.jp.nec.com>

--
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:[~2007-03-28  1:57 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-23  6:15 BusyBox: load_policy applet Yuichi Nakamura
2007-03-23 12:49 ` Stephen Smalley
2007-03-26  1:28   ` Yuichi Nakamura
2007-03-26 14:08     ` Separating libselinux/libsepol (Was: Re: BusyBox: load_policy applet) Stephen Smalley
2007-03-26 16:12       ` Christopher J. PeBenito
2007-03-26 16:35         ` Stephen Smalley
2007-03-27  0:59           ` Yuichi Nakamura
2007-03-27 12:15             ` Stephen Smalley
2007-03-28  1:57               ` KaiGai Kohei [this message]
2007-03-28  8:40                 ` Yuichi Nakamura
2007-03-28  9:12                   ` [busybox:00575] " KaiGai Kohei
2007-03-28 12:04                     ` Stephen Smalley
2007-03-28 12:34                       ` Joshua Brindle
2007-03-28 12:00                 ` Stephen Smalley
2007-03-28  2:19               ` Yuichi Nakamura
2007-03-27  2:58           ` Ryan Bradetich
2007-03-27 12:32             ` Christopher J. PeBenito
2007-03-26 16:37         ` Karl MacMillan
2007-03-26 20:13           ` Christopher J. PeBenito
2007-03-27 12:45             ` Stephen Smalley
2007-03-27 15:42               ` Christopher J. PeBenito
2007-03-27 15:48                 ` Stephen Smalley
2007-03-27 16:02                   ` Karl MacMillan
2007-03-27 18:43                     ` Christopher J. PeBenito
2007-03-27 18:47                       ` Stephen Smalley
2007-03-27 19:09                         ` Karl MacMillan
2007-03-27 19:32                           ` Christopher J. PeBenito
2007-03-27 20:31                       ` Ryan Bradetich
2007-03-28 10:26                       ` Russell Coker
2007-03-28 12:06                         ` Stephen Smalley
2007-03-28 14:11                           ` Russell Coker
2007-03-28 12:17                         ` Christopher J. PeBenito
2007-03-27 20:14                   ` Ryan Bradetich
2007-03-27 20:35                     ` Joshua Brindle

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=4609CB85.1060401@ak.jp.nec.com \
    --to=kaigai@ak.jp.nec.com \
    --cc=busybox@kaigai.gr.jp \
    --cc=cpebenito@tresys.com \
    --cc=csellers@tresys.com \
    --cc=kmacmillan@mentalrootkit.com \
    --cc=sds@tycho.nsa.gov \
    --cc=selinux@tycho.nsa.gov \
    --cc=ynakam@hitachisoft.jp \
    /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.