From 24b245a2f94e4984bc171597809a1d0140bb21ca Mon Sep 17 00:00:00 2001 From: Abhishek Mishra Date: Tue, 12 May 2026 17:57:02 +0000 Subject: [PATCH] fs/Kconfig: add CONFIG_FS_PERMISSION option Add a CONFIG_FS_PERMISSION Kconfig option for future filesystem permission support infrastructure. The option depends on CONFIG_SCHED_USER_IDENTITY and CONFIG_PSEUDOFS_ATTRIBUTES to ensure task credential tracking and pseudo-filesystem inode ownership/mode metadata are available before enabling the feature. The symbol defaults to n to preserve existing behavior for current configurations. No runtime permission enforcement is introduced by this commit. Signed-off-by: Abhishek Mishra --- fs/Kconfig | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/fs/Kconfig b/fs/Kconfig index 506632ad5a9..3631734c3e5 100644 --- a/fs/Kconfig +++ b/fs/Kconfig @@ -94,6 +94,27 @@ config PSEUDOFS_ATTRIBUTES Enable support for attributes(e.g. mode, uid, gid and time) in the pseudo file system. +config FS_PERMISSION + bool "Enable UNIX Filesystem Permission Support" + default n + depends on !DISABLE_PSEUDOFS_OPERATIONS + depends on SCHED_USER_IDENTITY + depends on PSEUDOFS_ATTRIBUTES + + ---help--- + Enable filesystem ownership and permission metadata + support for pseudoFS inodes. + + Requires SCHED_USER_IDENTITY and + PSEUDOFS_ATTRIBUTES for task credential tracking + and inode ownership/mode metadata support. + + This option alone does not enforce runtime + permission checks. + + comment "UNIX filesystem permission support requires SCHED_USER_IDENTITY=y, PSEUDOFS_ATTRIBUTES=y and DISABLE_PSEUDOFS_OPERATIONS=n" + depends on !SCHED_USER_IDENTITY || !PSEUDOFS_ATTRIBUTES || DISABLE_PSEUDOFS_OPERATIONS + config PSEUDOFS_SOFTLINKS bool "Pseudo-filesystem soft links" default n