[Concept,15/21] ext4l: Add a CONFIG_EXT4_FS_SECURITY option
Commit Message
From: Simon Glass <simon.glass@canonical.com>
Add Kconfig option to make security labels support optional. The
xattr_security.c file and xattr.h already have proper #ifdef guards
with stub functions when disabled.
Security labels require extended attributes, so this option depends
on EXT4_XATTR.
They are unlikely to be useful in U-Boot but is included for
completeness.
Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
---
fs/ext4l/Kconfig | 11 +++++++++++
fs/ext4l/Makefile | 1 +
2 files changed, 12 insertions(+)
@@ -153,3 +153,14 @@ config EXT4_FS_POSIX_ACL
ACLs require extended attributes support (EXT4_XATTR).
If unsure, say N.
+
+config EXT4_FS_SECURITY
+ bool "Enable ext4 security labels"
+ depends on FS_EXT4L && EXT4_XATTR
+ help
+ Enable security labels support for ext4 filesystems. This
+ provides an extended attribute handler for file security
+ labels used by security modules like SELinux.
+
+ Security labels require extended attributes support (EXT4_XATTR).
+ If unsure, say N.
@@ -20,3 +20,4 @@ obj-$(CONFIG_EXT4_XATTR) += xattr.o xattr_hurd.o xattr_trusted.o \
obj-$(CONFIG_EXT4_INLINE_DATA) += inline.o
obj-$(CONFIG_EXT4_INDIRECT) += indirect.o
obj-$(CONFIG_EXT4_FS_POSIX_ACL) += acl.o
+obj-$(CONFIG_EXT4_FS_SECURITY) += xattr_security.o