Skip to contentSkip to conversation

fs/cramfs: add depends on !BR2_PACKAGE_LIBSELINUX

PATCH New aduskett at gmail.com 2 participants 4 messages Mar 12, 2020 – Mar 14, 2020 Cramfs filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 fs/cramfs: add depends on !BR2_PACKAGE_LIBSELINUX

From: Adam Duskett <[email protected]>

cramfs does not support extended attributes (xattrs) needed for SELinux to function.

---
 fs/cramfs/Config.in | 4 ++++
 1 file changed, 4 insertions(+)
fs/cramfs/Config.in +4 -0
index 89f8ad52b8..891efade3b 100644
@@ -1,5 +1,6 @@
 config BR2_TARGET_ROOTFS_CRAMFS
 	bool "cramfs root filesystem"
+	depends on !BR2_PACKAGE_LIBSELINUX
 	help
 	  Build a cramfs root filesystem
 
@@ -24,3 +25,6 @@ config BR2_TARGET_ROOTFS_CRAMFS_XIP
 	  4.15+ kernel.
 
 endif # BR2_TARGET_ROOTFS_CRAMFS
+
+comment "cramfs does not support SELinux"
+	depends on BR2_PACKAGE_LIBSELINUX
Signature · 1 line
2.24.1
#1 lore raw

PATCH 2/3 fs/romfs: add depends on !BR2_PACKAGE_LIBSELINUX

From: Adam Duskett <[email protected]>

romfs does not support extended attributes (xattrs) needed for SELinux to function.

---
 fs/romfs/Config.in | 4 ++++
 1 file changed, 4 insertions(+)
fs/romfs/Config.in +4 -0
index 84944a0fc0..055f5eedd7 100644
@@ -1,4 +1,8 @@
 config BR2_TARGET_ROOTFS_ROMFS
 	bool "romfs root filesystem"
+	depends on !BR2_PACKAGE_LIBSELINUX
 	help
 	  Build a romfs image of the root filesystem.
+
+comment "romfs does not support SELinux"
+	depends on BR2_PACKAGE_LIBSELINUX
Signature · 1 line
2.24.1
#2 lore raw

PATCH 3/3 fss/yaffs2: add depends on !BR2_PACKAGE_LIBSELINUX

In reply to aduskett at gmail.com

From: Adam Duskett <[email protected]>

yaffs2 does not support extended attributes (xattrs) needed for SELinux to function.

---
 fs/yaffs2/Config.in | 4 ++++
 1 file changed, 4 insertions(+)
fs/yaffs2/Config.in +4 -0
index 27da4ba638..99c25c4066 100644
@@ -1,4 +1,8 @@
 config BR2_TARGET_ROOTFS_YAFFS2
 	bool "yaffs2 root filesystem"
+	depends on !BR2_PACKAGE_LIBSELINUX
 	help
 	  Build a yaffs2 root filesystem
+
+comment "yaffs2 does not support SELinux"
+	depends on BR2_PACKAGE_LIBSELINUX
Signature · 1 line
2.24.1
#3 lore raw

PATCH 1/3 fs/cramfs: add depends on !BR2_PACKAGE_LIBSELINUX

In reply to aduskett at gmail.com

Hello,

Quoted 6 lines · On Thu, 12 Mar 2020 11:29:38 -0700 aduskett at gmail.com wrote:

From: Adam Duskett <[email protected]>

cramfs does not support extended attributes (xattrs) needed for SELinux to function.

I quickly discussed this with Peter on IRC, and we both agreed we didn't like these direct dependencies.

One solution I suggested is to do something like this:

- Introduce some hidden boolean like BR2_SYSTEM_NEEDS_XATTR_FS (or some better name)

- Have libselinux select this

- Have the filesystems that don't support xattr have a depends on !BR2_SYSTEM_NEEDS_XATTR_FS.

I'm just not sure about where to define BR2_SYSTEM_NEEDS_XATTR_FS, and I'm not sure about the naming. Should it be in fs/Config.in? In system/Config.in?

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com