From: Stephen Smalley <sds@tycho.nsa.gov>
To: Bhargava Shastry <bshas3@gmail.com>
Cc: SELinux@tycho.nsa.gov, Eric Paris <eparis@parisplace.org>,
James Morris <jmorris@namei.org>
Subject: Re: SELinux on Android
Date: Thu, 10 Nov 2011 08:12:30 -0500 [thread overview]
Message-ID: <1320930750.13691.5.camel@moss-pluto> (raw)
In-Reply-To: <CAGGozWSziAmmDb-eO3AjVL=eRgeCHzGb6vo-uNpLy_2sxog2tQ@mail.gmail.com>
On Thu, 2011-11-10 at 11:33 +0100, Bhargava Shastry wrote:
> Hello,
>
> After some tweaks to load_policy, I was able to compile it against
> Android's bionic C lib. However, I have a problem with loading a
> sample policy compiled on my desktop Ubuntu PC (policydb version 24)
> on the Android phone. Specifically, dmesg on the phone's kernel throws
> up the following error:
> SELinux: policydb version 24 does not match my version range 15-19
>
> I see two quick solutions: (1) Re-compile Android kernel with policydb
> version setting changed to 24. Unfortunately, the max version number
> currently supported in Android's 2.6.32 msm kernel is 23. (2)
> Downgrade to policy version 19 on the PC. Any thoughts on alternate
> solutions.
Linux 2.6.32 supported policy.24, unless you forced it to an older
version via CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX_VALUE (which
you shouldn't set in your kernel config at all; it only exists to
address a backward compatibility problem for Fedora Core 3/4). Maybe we
should get rid of that option altogether.
I've been using policy.24 policies for Android on the emulator (2.6.29)
and on the Nexus S phones (2.6.35).
> As regards Mr.Russell's comment, I'm afraid I won't be able to make
> the binaries public at the moment. However, in order to get SELinux
> enabled on the Android kernel one could simply do a menuconfig and
> enable NSA SELinux support. Personally, I referred to this:
> http://www.linuxtopia.org/online_books/linux_kernel/kernel_configuration/ch09s06.html . As for the Xattr patch for Android's yaffs FS, it is available publicly here: http://www.enck.org/tools/yaffs_xattr.patch
You don't need an xattr patch anymore; upstream yaffs2 has xattr
support. You might need to back port newer upstream yaffs2 into your
Android kernel if your Android kernel's yaffs2 lacks such support. You
also need a patch that I posted to the yaffs2 mailing list to ensure
labeling of new files at creation time, as that isn't provided by
default by the xattr support.
--
Stephen Smalley
National Security Agency
--
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 prev parent reply other threads:[~2011-11-10 13:12 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-04 10:16 SELinux on Android Bhargava Shastry
2011-11-04 10:54 ` Russell Coker
2011-11-04 12:32 ` Stephen Smalley
2011-11-04 16:25 ` Bhargava Shastry
2011-11-04 16:59 ` Stephen Smalley
2011-11-10 10:33 ` Bhargava Shastry
2011-11-10 12:48 ` Russell Coker
2011-11-10 13:11 ` Eric Paris
2011-11-10 13:12 ` Stephen Smalley [this message]
2011-11-10 13:26 ` Bhargava Shastry
2011-11-10 16:26 ` Stephen Smalley
2011-11-11 11:33 ` Bhargava Shastry
2011-11-16 18:15 ` Bhargava Shastry
2011-11-16 18:35 ` Eric Paris
2011-11-17 10:15 ` Bhargava Shastry
2011-11-17 13:39 ` Stephen Smalley
2011-11-21 15:45 ` Bhargava Shastry
2011-11-21 15:51 ` Stephen Smalley
2011-11-21 18:18 ` Bhargava Shastry
2011-11-21 18:32 ` Stephen Smalley
2011-11-22 19:25 ` Bhargava Shastry
2011-11-22 19:29 ` Stephen Smalley
2011-11-22 22:03 ` Russell Coker
2011-12-01 18:42 ` Bhargava Shastry
2011-12-01 19:04 ` Stephen Smalley
2011-12-02 10:37 ` Bhargava Shastry
2011-11-17 13:37 ` 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=1320930750.13691.5.camel@moss-pluto \
--to=sds@tycho.nsa.gov \
--cc=SELinux@tycho.nsa.gov \
--cc=bshas3@gmail.com \
--cc=eparis@parisplace.org \
--cc=jmorris@namei.org \
/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.