RFC Richacls
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest21 patches 2 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/21 | vfs: Minor documentation fixDocumentation/ Documentation/ | +7 | 0 replies | |
| 2/21 | vfs: Shrink struct posix_aclfs/ include/ | +5 | 0 replies | |
| 3/21 | vfs: Add IS_ACL() and IS_RICHACL() testsfs/ fs/ include/ +1 more | +21 | 0 replies | |
| 4/21 | vfs: Add MAY_CREATE_FILE and MAY_CREATE_DIR permission flagsfs/ include/ | +26 | 0 replies | |
| 5/21 | vfs: Add MAY_DELETE_SELF and MAY_DELETE_CHILD permission flagsfs/ include/ | +13 | 0 replies | |
| 6/21 | vfs: Make the inode passed to inode_change_ok non-constfs/ include/ | +2 | 0 replies | |
| 7/21 | vfs: Add permission flags for setting file attributesfs/ include/ | +70 | 0 replies | |
| 8/21 | richacl: In-memory representation and helper functionsfs/ fs/ include/ | +307 | 0 replies | |
| 9/21 | richacl: Permission mapping functionsfs/ include/ | +163 | 0 replies | |
| 10/21 | richacl: Compute maximum file masks from an aclfs/ include/ | +129 | 0 replies | |
| 11/21 | richacl: Update the file masks in chmod()fs/ include/ | +41 | 0 replies | |
| 12/21 | richacl: Permission check algorithmfs/ include/ | +113 | 0 replies | |
| 13/21 | richacl: Create-time inheritancefs/ fs/ fs/ +1 more | +136 | 0 replies | |
| 14/21 | richacl: Check if an acl is equivalent to a file modefs/ include/ | +55 | 0 replies | |
| 15/21 | richacl: Automatic Inheritancefs/ fs/ include/ | +38 | 0 replies | |
| 16/21 | richacl: xattr mapping functionsfs/ fs/ include/ | +179 | 0 replies | |
| 17/21 | vfs: Cache base_acl objects in inodesdrivers/ fs/ fs/ +4 more | +38 | 0 replies | |
| 18/21 | vfs: Cache richacl in struct inodefs/ fs/ fs/ +2 more | +102 | 0 replies | |
| 19/21 | vfs: Add richacl permission checkingfs/ fs/ | +52 | 0 replies | |
| 20/21 | ext4: Implement rich acl for ext4fs/ fs/ fs/ +9 more | +332 | 0 replies | |
| 21/21 | ext4: Add richacl feature flagfs/ fs/ | +36 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [RFC 00/21] Richacls
Hello,
here is an updated richacl patch queue, also available in git [1]. For those who might not know, richacls are an implementation of NFSv4 ACLs that cleanly integrates into the POSIX file permission model. The goal is to improve interoperability between Linux and other systems, mainly across the NFSv4 and CIFS/SMB protocols. A file system can either contain posix acls or richacls, but not both.
This patch queue includes the vfs and ext4 changes needed for local richacl support. A previous version of this patch queue was last posted about a year ago [2]; I have updated the patches to v4.0-rc1 and tried to incorporate the feedback from the previous discussion. The changes include:
* Introduction of a base_acl object type so that an inode can either cache a posix acl or a richacl largely without caring which of the two kinds it is dealing with.
* RCU support as for posix acls.
* Various cleanups and more documentation.
Things I'm not entirely happy with:
* A new get_richacl inode operation is introduced. This is needed because we need to perform permission checks in contexts where the dentry of the inode to check is not available and we cannot use the getxattr inode operation. It would be nice if we could either convert the getxattr inode operation to take an inode instead, or pass the dentries down to where the get_richacl inode operation is currently used.
* The base_acl code is rather ugly; maybe the previous version which was criticized wasn't so bad after all.
* It would be nice if the MAY_DELETE_SELF flag could override the sticky directory check as it did in the previous version of this patch queue. I couldn't come up with a clean way of achieving that, though.
Because the code has changed quite a bit since the last posting, I have removed the previous sign-offs.
At this point, I would like to ask for your feedback as to what should be changed before these patches can be merged, even if merging these patches alone doesn't make a while lot of sense. I will follow up with additional pieces to the puzzle like the nfsv4 support as I get them into shape again.
--
Which kind of acls an ext4 file system supports is determined by the "richacl" ext4 feature (mkfs.ext4 -O richacl or tune2fs -O richacl). The file system also needs to be mounted with the "acl" mount option, which is the default nowadays.
A version of e2fsprogs with support for the "richacl" feature can be found on github [3], but the feature can also be enabled "hard" in debugfs. Note that unpatched versions of e2fsck will not check file systems with the feature enabled though.
The acls themselves can be manipulated with the richacl command-line utility [4]. Some details on the permission model and examples of its use can be found at the richacl page, http://acl.bestbits.at/richacl/.
[1] git://git.kernel.org/pub/scm/linux/kernel/git/agruen/linux-richacl.git richacl
[2] http://lwn.net/Articles/596517/
[3] https://github.com/andreas-gruenbacher/e2fsprogs
[4] https://github.com/andreas-gruenbacher/richacl
Thanks,
Andreas
--
Andreas Gruenbacher (19):
vfs: Minor documentation fix
vfs: Shrink struct posix_acl
vfs: Add IS_ACL() and IS_RICHACL() tests
vfs: Add MAY_CREATE_FILE and MAY_CREATE_DIR permission flags
vfs: Add MAY_DELETE_SELF and MAY_DELETE_CHILD permission flags
vfs: Make the inode passed to inode_change_ok non-const
vfs: Add permission flags for setting file attributes
richacl: In-memory representation and helper functions
richacl: Permission mapping functions
richacl: Compute maximum file masks from an acl
richacl: Update the file masks in chmod()
richacl: Permission check algorithm
richacl: Create-time inheritance
richacl: Check if an acl is equivalent to a file mode
richacl: Automatic Inheritance
richacl: xattr mapping functions
vfs: Cache base_acl objects in inodes
vfs: Cache richacl in struct inode
vfs: Add richacl permission checking
Aneesh Kumar K.V (2):
ext4: Implement rich acl for ext4
ext4: Add richacl feature flag
Documentation/filesystems/porting | 8 +- Documentation/filesystems/vfs.txt | 3 + drivers/staging/lustre/lustre/llite/llite_lib.c | 2 +- fs/Kconfig | 3 + fs/Makefile | 2 + fs/attr.c | 81 ++- fs/ext4/Kconfig | 15 + fs/ext4/Makefile | 1 + fs/ext4/acl.c | 7 +- fs/ext4/acl.h | 12 +- fs/ext4/ext4.h | 6 +- fs/ext4/file.c | 6 +- fs/ext4/ialloc.c | 7 +- fs/ext4/inode.c | 10 +- fs/ext4/namei.c | 11 +- fs/ext4/richacl.c | 229 ++++++++ fs/ext4/richacl.h | 47 ++ fs/ext4/super.c | 41 +- fs/ext4/xattr.c | 6 + fs/ext4/xattr.h | 1 + fs/f2fs/acl.c | 4 +- fs/inode.c | 15 +- fs/namei.c | 108 +++- fs/posix_acl.c | 31 +- fs/richacl_base.c | 660 ++++++++++++++++++++++++ fs/richacl_inode.c | 67 +++ fs/richacl_xattr.c | 131 +++++ include/linux/fs.h | 47 +- include/linux/posix_acl.h | 12 +- include/linux/richacl.h | 329 ++++++++++++ include/linux/richacl_xattr.h | 47 ++ include/uapi/linux/fs.h | 3 +- 32 files changed, 1844 insertions(+), 108 deletions(-) create mode 100644 fs/ext4/richacl.c create mode 100644 fs/ext4/richacl.h create mode 100644 fs/richacl_base.c create mode 100644 fs/richacl_inode.c create mode 100644 fs/richacl_xattr.c create mode 100644 include/linux/richacl.h create mode 100644 include/linux/richacl_xattr.h
Signature · 1 line
2.1.0