Skip to content

add CONFIG_F2FS_FS_SECURITY=y #2778

Closed
Closed

Description

@vch42

I think the CONFIG_F2FS_FS_SECURITY=y option should be enabled in the kernel.

It enables support for the XATTR security namespace, which atm is not supported due to this option currently not being set to yes.
The xattr security namespace is used by SELinux and is also a requirement for Samba4 AD/DC full support.

We already have XATTR and POSIX_ACL support enabled for F2FS, with user namespace support, it only makes sense to fully support XATTR on F2FS by also enabling CONFIG_F2FS_FS_SECURITY.

XATTR F2FS support added following: #2508

Thank you.

Activity

  1. JamesH65 commented on Jan 7, 2019

    @JamesH65
    Contributor

    Do you have any numbers for the impact this has on memory requriements and overall CPU performance impact?

  2. vch42 commented on Jan 18, 2019

    @vch42
    Author

    I don't have a comparative test for the memory usage and CPU performance with and without the feature enabled in the kernel, but I have a Pi with this enabled, which did not had it prior, and I do not see a noticeable difference in feel.
    Sure, this is only based on "feel" and my own impression on how the device behaves. It is in no way an exact test. Plus, I am not very sure how I can produce such numbers, I am not very versed in such benchmarking on Linux.
    However, not enabling the XATTR security namespace, but only the user namespace, leaves a lot of the uses of XATTR out of the picture due to lack of support. This increases the uselessness level of the previous activation of CONFIG_F2FS_FS_XATTR in the kernel.

  3. JamesH65 commented on Aug 1, 2019

    @JamesH65
    Contributor

    Did a quick recompile with this enabled - adds 352 bytes on the Pi4 zImage. Looking at the code, cannot see if having much of a effect on the performance, and it's only used when f2fs is being use I believe. So seems like an OK addition.

  4. JamesH65 commented on Aug 1, 2019

    @JamesH65
    Contributor
  5. popcornmix commented on Aug 1, 2019

    @popcornmix
    Collaborator

    Okay.

  6. JamesH65 commented on Sep 19, 2019

    @JamesH65
    Contributor

    @dom Not yet enabled - do we intend to do so?

  7. added
    Waiting for internal comment
    on Sep 19, 2019
  8. pelwell commented on Oct 18, 2021

    @pelwell
    Contributor

    This does indeed add very little code:

    f2fs_init_inode_metadata 518 -> 530 (+18)
    f2fs_add_regular_entry 5ec -> 5e8 (-4)
    f2fs_hash_filename 24c -> 248 (-4)
    f2fs_init_security 0 -> 34 (+34)
    f2fs_initxattrs 0 -> 7c (+7c)
    

    In fact the extra seems to get swallowed up in such a way that the memory map doesn't expand.

    ext4 has exactly the same initialisation hook, but it configures a different set of attributes.

    Since the code size change is negligible, and any (presumably tiny) runtime overhead only affects F2FS users (who might benefit from the change) I'm prepared to enable the config setting.

  9. added a commit that references this issue on Oct 18, 2021
  10. pelwell commented on Oct 18, 2021

    @pelwell
    Contributor

    See #4637.

  11. added a commit that references this issue on Oct 18, 2021
  12. added a commit that references this issue on Oct 19, 2021
  13. 25 remaining items

  14. added a commit that references this issue on Feb 7, 2022
  15. added a commit that references this issue on May 17, 2022
  16. added a commit that references this issue on May 24, 2022
  17. added a commit that references this issue on Sep 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Waiting for internal comment

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions