From: Don Hoefer <don.hoefer@verizon.net>
To: sds@tycho.nsa.gov
Cc: selinux@tycho.nsa.gov
Subject: Re: Re: Need information on building embedded systems.
Date: Thu, 24 Oct 2013 14:04:46 -0500 (CDT) [thread overview]
Message-ID: <6904957.313951.1382641486454.JavaMail.root@vms170025> (raw)
Here is a complete list of what we are working with. the processor is a Freescale PowerPC.
kernel: 3.8.13
libselinux: 2.1.9
checkpolicy: 2.1.8
libsepol: 2.1.4
policycoreutils: 2.1.10
busybox: 1.20.2
eldk: 5.3
Don Hoefer
On 10/24/13, Stephen Smalley<sds@tycho.nsa.gov> wrote:
On 10/24/2013 01:15 PM, Don Hoefer wrote:
> We are building an embedded system where the customer requires SELinux. It is our own hardware so we build our own kernel and drivers and use the ext2, jfs and tempfs file systems. This is not new for us, but incorporating SELinux is.
>
> Does anyone know of a good knowledge resource for building embedded systems with SELinux?
>
> We are currently plowing through a frustrating step ahead/step back process. We are either unable to build a policy, or a minimal policy we build often causes the development system to fail to boot. Any policy we get onto the embedded system appears to fail to load properly. We think that some pieces may be missing but we are unable to debug due to lack of knowledge.
>
> I suspect that our boot process with SELinux is incomplete and that we are missing some libraries, for example:
>
> root@generic-powerpc:~#semanage
> Traceback (most recent call last):
> File "/usr/sbin/semanage", line 24, in <module>
> import seobject
> File "/usr/lib/python2.7/site-packages/seobject.py", line 24,in <module>
> import pwd, grp, string, selinux, tempfile, os, re, sys,stat
> ImportError: No module named selinux
>
> Also, the selinux fs is not mounted and policies are not loaded during boot. We can do this with init scripts but isn't it too late by then?
>
> Any help would be welcome.
I'd suggest you have a look at what we did in porting SELinux to
Android, both regard to our approach and possible reuse of some of our
minimalist port of libselinux and other components. See:
http://selinuxproject.org/page/SEAndroid
There is a published technical paper linked from that page that
describes the approach in detail, along with several presentations
describing it and of course how to obtain the code itself.
You really don't need much of the SELinux userspace for an embedded
system. Aside from our minimalist port of libselinux and a
reimplementation of specific utilities as part of the Android init
built-in commands and toolbox, we left the rest of the SELinux userspace
either completely unused or only used on the build host itself, not on
the device. We certainly didn't bother porting semanage or any other
python components.
We also wrote a policy from scratch tailored to Android and to a very
well-defined set of security goals, as described in the paper and
presentations. We did not use the SELinux reference policy nor did we
use anything generated by mdp as a starting point.
It would help to know your kernel (version) and what userspace you are
using as your baseline (e.g. are you using busybox? what is providing
your init program?).
--
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.
next reply other threads:[~2013-10-24 19:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-24 19:04 Don Hoefer [this message]
2013-10-25 16:22 ` Need information on building embedded systems Stephen Smalley
-- strict thread matches above, loose matches on Subject: below --
2013-10-24 18:21 Don Hoefer
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=6904957.313951.1382641486454.JavaMail.root@vms170025 \
--to=don.hoefer@verizon.net \
--cc=hoefer@ieee.org \
--cc=sds@tycho.nsa.gov \
--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.