Skip to content

fs/Kconfig: Add CONFIG_FS_PERMISSION option#18872

Merged
acassis merged 1 commit into
apache:masterfrom
Abhishekmishra2808:fs/add-fs-permission-kconfig
May 14, 2026
Merged

fs/Kconfig: Add CONFIG_FS_PERMISSION option#18872
acassis merged 1 commit into
apache:masterfrom
Abhishekmishra2808:fs/add-fs-permission-kconfig

Conversation

@Abhishekmishra2808
Copy link
Copy Markdown
Contributor

@Abhishekmishra2808 Abhishekmishra2808 commented May 12, 2026

Summary

This change introduces a new CONFIG_FS_PERMISSION Kconfig option intended to act as the configuration entry point for future VFS permission support in NuttX. The option depends on CONFIG_SCHED_USER_IDENTITY and CONFIG_PSEUDOFS_ATTRIBUTES, ensuring that task credential tracking and pseudo-filesystem inode ownership/mode metadata are available before the feature can be enabled. This commit only adds the configuration wiring and related help text; no runtime permission enforcement or access-control logic is introduced yet.

Part of GSoC #18458

Note: Please adhere to Contributing Guidelines.

Impact

This change does not modify existing filesystem behavior, permission checks, or runtime access control semantics. Existing configurations remain unaffected because the new option defaults to n. The impact is limited to Kconfig integration and dependency management, allowing future filesystem permission work to build on a consistent configuration foundation without silently enabling prerequisite features.

Testing

Build Succesful
WhatsApp Image 2026-05-12 at 8 21 08 PM

ostest
WhatsApp Image 2026-05-12 at 9 26 43 PM

ls -l (permission bits)
WhatsApp Image 2026-05-12 at 10 42 59 PM

make menuconfig
image

@github-actions github-actions Bot added Area: File System File System issues Size: S The size of the change in this PR is small labels May 12, 2026
@Abhishekmishra2808 Abhishekmishra2808 force-pushed the fs/add-fs-permission-kconfig branch from 020373b to e78218c Compare May 12, 2026 18:20
Comment thread fs/Kconfig Outdated
Copy link
Copy Markdown
Contributor

@linguini1 linguini1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please finish filling out the PR template.

Also, not really much point adding Kconfig options before any features exist. I would suggest adding these along with some initial logic first, otherwise people may think there is functionality which does not exist yet.

@Abhishekmishra2808 Abhishekmishra2808 force-pushed the fs/add-fs-permission-kconfig branch 2 times, most recently from 4275d50 to b9f2048 Compare May 13, 2026 10:45
@Abhishekmishra2808 Abhishekmishra2808 changed the title fs/Kconfig: Add CONFIG_FS_PERMISSION for VFS permission enforcement. fs/Kconfig: Add CONFIG_FS_PERMISSION option May 13, 2026
@Abhishekmishra2808
Copy link
Copy Markdown
Contributor Author

Thanks, @linguini1. I fixed the PR template and will add the initial logic shortly.

Copy link
Copy Markdown
Contributor

@PetervdPerk-NXP PetervdPerk-NXP left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't it be "File permissions"?

Comment thread fs/Kconfig Outdated
@acassis
Copy link
Copy Markdown
Contributor

acassis commented May 13, 2026

Shouldn't it be "File permissions"?

I suggested to change to "UNIX File-system Permission", in fact it is filesystem because it also applies to directories:

https://en.wikipedia.org/wiki/File-system_permissions

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 <mishra.abhishek2808@gmail.com>
@Abhishekmishra2808 Abhishekmishra2808 force-pushed the fs/add-fs-permission-kconfig branch from b9f2048 to 463c26f Compare May 14, 2026 00:18
@Abhishekmishra2808
Copy link
Copy Markdown
Contributor Author

Thanks for the review, @acassis and @PetervdPerk-NXP. I have fixed all the wording you suggested in the latest commit.

@acassis acassis merged commit 24b245a into apache:master May 14, 2026
41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: File System File System issues Size: S The size of the change in this PR is small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants