bcachefs: initialize security xattrs on inode creation#651
Closed
Komzpa wants to merge 1 commit into
Closed
Conversation
d034646 to
1cf1a9d
Compare
def6d9f to
669ada1
Compare
Owner
|
Merged to the testing branch — carried as |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
security_inode_init_security()from the bcachefs inode creation path so LSMs can provide initialsecurity.*xattrs.KEY_TYPE_XATTR_INDEX_SECURITY.Issue
koverstreet/bcachefs#642 reports that
chconfails on bcachefs with:The missing piece is that new bcachefs inodes do not run the security initialization callback that asks the active LSM for initial labels.
This still needs matching distro SELinux policy support for bcachefs as a labeled filesystem, as noted on koverstreet/bcachefs#664.
Provenance
The implementation comes from Reagan Bohan's koverstreet/bcachefs#664 payload commit. This branch was rebuilt at head
1cf1a9dcaa7213b86cbe980391deffc631bcc781so the carried commit is authored by Reagan Bohan, with the current bcachefs-tools adaptation kept in that ported commit rather than presented as a new Komzpa-authored squash.Tests
security.selinux.Validation
git diff --check origin/testing...HEADBINDGEN=/home/kom/.cargo/bin/bindgen make -j32 fs/fs/xattr.o fs/vfs/fs.o bcachefs1cf1a9dcaa7213b86cbe980391deffc631bcc781; merge state is CLEAN.