buildroot.buildroot.org archive mirror
 help / color / mirror / Atom feed
From: aduskett at gmail.com <aduskett@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 0/9] package/libselinux: kernel munging fixups
Date: Fri, 31 Jul 2020 13:40:51 -0700	[thread overview]
Message-ID: <20200731204100.1171427-1-aduskett@gmail.com> (raw)

From: Adam Duskett <Aduskett@gmail.com>

There are currently two issues with our current kernel munging implimentation
for libselinux:

1) As of kernel 5.1, CONFIG_SECURITY_SELINUX no longer enables SELinux.
   Instead, the kernel now has the new option CONFIG_LSM, which is a
   comma-separated list of linux-security modules in which the kernel enables
   in order.

  The first patch sets CONFIG_LSM to "selinux" to fix SELinux not starting on
  kernels >= 5.1.

2) Many filesystems need SELinux support explicitly enabled in the kernel for
   SELinux to work correctly. The subsequent patches check the config options
   BR2_TARGET_ROOTFS_${FS_NAME} and then set the necessary kernel options to
   enable SELinux support for the given enabled filesystems.

  However, I have chosen not to go so far as to enable the filesystem itself in
  the kernel, as this seems to not be the standard practice in Buildroot.

  It would also greatly complicate the logic, as ext2 has to be enabled for a
  user to select ext4 support. If a user were to select ext4, then the
  libselinux package would enable ext2 and ext4, which may not be desirable.

With these patches, if a user selects the libselinux and refpolicy packages,
then they will get a system that boots with selinux running, which is a
massive improvement over what happens now.


Adam Duskett (9):
  package/libselinux: set the config_lsm kernel config option to selinux
  package/libselinux: enable kernel selinux support for erofs images
  package/libselinux: enable kernel selinux support for ext2 images
  package/libselinux: enable kernel selinux support for ext3 images
  package/libselinux: enable kernel selinux support for ext4 images
  package/libselinux: enable kernel selinux support for f2fs images
  package/libselinux: enable kernel selinux support for jffs2 images
  package/libselinux: enable kernel selinux support for squashfs images
  package/libselinux: enable kernel selinux support for ubifs images

 package/libselinux/libselinux.mk | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

-- 
2.26.2

             reply	other threads:[~2020-07-31 20:40 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-31 20:40 aduskett at gmail.com [this message]
2020-07-31 20:40 ` [Buildroot] [PATCH 1/9] package/libselinux: set the config_lsm kernel config option to selinux aduskett at gmail.com
2020-07-31 20:40 ` [Buildroot] [PATCH 2/9] package/libselinux: enable kernel selinux support for erofs images aduskett at gmail.com
2020-07-31 20:40 ` [Buildroot] [PATCH 3/9] package/libselinux: enable kernel selinux support for ext2 images aduskett at gmail.com
2020-07-31 20:40 ` [Buildroot] [PATCH 4/9] package/libselinux: enable kernel selinux support for ext3 images aduskett at gmail.com
2020-07-31 20:40 ` [Buildroot] [PATCH 5/9] package/libselinux: enable kernel selinux support for ext4 images aduskett at gmail.com
2020-07-31 20:40 ` [Buildroot] [PATCH 6/9] package/libselinux: enable kernel selinux support for f2fs images aduskett at gmail.com
2020-07-31 20:40 ` [Buildroot] [PATCH 7/9] package/libselinux: enable kernel selinux support for jffs2 images aduskett at gmail.com
2020-07-31 20:40 ` [Buildroot] [PATCH 8/9] package/libselinux: enable kernel selinux support for squashfs images aduskett at gmail.com
2020-07-31 20:41 ` [Buildroot] [PATCH 9/9] package/libselinux: enable kernel selinux support for ubifs images aduskett at gmail.com
2020-09-04 13:48 ` [Buildroot] [PATCH 0/9] package/libselinux: kernel munging fixups Thomas Petazzoni

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=20200731204100.1171427-1-aduskett@gmail.com \
    --to=aduskett@gmail.com \
    --cc=buildroot@busybox.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).