linux-stable/Documentation/filesystems
Christian Brauner cac2f8b8d8
fs: rename current get acl method
The current way of setting and getting posix acls through the generic
xattr interface is error prone and type unsafe. The vfs needs to
interpret and fixup posix acls before storing or reporting it to
userspace. Various hacks exist to make this work. The code is hard to
understand and difficult to maintain in it's current form. Instead of
making this work by hacking posix acls through xattr handlers we are
building a dedicated posix acl api around the get and set inode
operations. This removes a lot of hackiness and makes the codepaths
easier to maintain. A lot of background can be found in [1].

The current inode operation for getting posix acls takes an inode
argument but various filesystems (e.g., 9p, cifs, overlayfs) need access
to the dentry. In contrast to the ->set_acl() inode operation we cannot
simply extend ->get_acl() to take a dentry argument. The ->get_acl()
inode operation is called from:

acl_permission_check()
-> check_acl()
   -> get_acl()

which is part of generic_permission() which in turn is part of
inode_permission(). Both generic_permission() and inode_permission() are
called in the ->permission() handler of various filesystems (e.g.,
overlayfs). So simply passing a dentry argument to ->get_acl() would
amount to also having to pass a dentry argument to ->permission(). We
should avoid this unnecessary change.

So instead of extending the existing inode operation rename it from
->get_acl() to ->get_inode_acl() and add a ->get_acl() method later that
passes a dentry argument and which filesystems that need access to the
dentry can implement instead of ->get_inode_acl(). Filesystems like cifs
which allow setting and getting posix acls but not using them for
permission checking during lookup can simply not implement
->get_inode_acl().

This is intended to be a non-functional change.

Link: https://lore.kernel.org/all/20220801145520.1532837-1-brauner@kernel.org [1]
Suggested-by/Inspired-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
2022-10-20 10:13:27 +02:00
..
caching Remove duplicate words inside documentation 2022-09-27 13:21:43 -06:00
cifs ksmbd: update documentation 2022-10-05 01:15:38 -05:00
ext4 Documentation: ext4: correct the document about superblock 2022-09-27 13:21:42 -06:00
nfs Documentation: Add an explanation of NFSv4 client identifiers 2022-05-17 15:33:21 -04:00
spufs Documentation: spufs: correct a duplicate word typo 2022-09-27 13:21:44 -06:00
9p.rst
adfs.rst
affs.rst
afs.rst AFS: Documentation: fix a few typos in afs.rst 2021-01-21 14:06:00 -07:00
api-summary.rst block: move fs/block_dev.c to block/bdev.c 2021-09-07 08:39:40 -06:00
autofs-mount-control.rst
autofs.rst docs: filesystems: Fix grammatical error "with" to "which" 2021-11-15 02:54:37 -07:00
automount-support.rst
befs.rst
bfs.rst
btrfs.rst Documentation: update btrfs list of features and link to readthedocs.io 2022-06-21 14:47:19 +02:00
ceph.rst ceph: remove Sage's git tree from documentation 2022-10-04 19:18:08 +02:00
coda.rst
configfs.rst
cramfs.rst
dax.rst Documentation/filesystem/dax: update DAX description on erofs 2022-03-16 09:38:38 +08:00
debugfs.rst debugfs: remove return value of debugfs_create_bool() 2021-05-21 20:59:03 +02:00
devpts.rst
directory-locking.rst
dlmfs.rst
dnotify.rst
ecryptfs.rst
efivarfs.rst
erofs.rst erofs: update documentation 2022-05-29 15:39:04 +08:00
ext2.rst ext2: remove nobh support 2022-08-02 12:34:04 -04:00
ext3.rst
f2fs.rst Documentation: filesystems: correct possessive "its" 2022-09-27 13:21:44 -06:00
fiemap.rst
files.rst file: Rename fcheck lookup_fd_rcu 2020-12-10 12:40:07 -06:00
fscrypt.rst fscrypt: Add HCTR2 support for filename encryption 2022-06-10 16:40:18 +08:00
fsverity.rst fs-verity: mention btrfs support 2022-07-15 23:42:30 -07:00
fuse-io.rst
fuse.rst fuse: Add module param for CAP_SYS_ADMIN access bypassing allow_other 2022-07-21 16:06:19 +02:00
gfs2-glocks.rst
gfs2-uevents.rst
gfs2.rst Documentation: Update filesystems/gfs2.rst 2020-12-01 00:25:20 +01:00
hfs.rst
hfsplus.rst
hpfs.rst
idmappings.rst Documentation: filesystems: correct possessive "its" 2022-09-27 13:21:44 -06:00
index.rst Documentation: remove reference to now removed mandatory-locking doc 2021-10-05 06:02:53 -04:00
inotify.rst
isofs.rst
journalling.rst
locking.rst fs: rename current get acl method 2022-10-20 10:13:27 +02:00
locks.rst docs: fs: locks.rst: update comment about mandatory file locking 2021-10-19 06:48:21 -04:00
mount_api.rst Documentation: mount_api: change kernel log wording 2020-12-03 15:53:13 -07:00
netfs_library.rst netfs: do not unlock and put the folio twice 2022-07-14 10:10:12 +02:00
nilfs2.rst
ntfs.rst
ntfs3.rst Doc/fs/ntfs3: Fix rst format and make it cleaner 2021-09-20 18:53:12 +03:00
ocfs2-online-filecheck.rst
ocfs2.rst
omfs.rst
orangefs.rst
overlayfs.rst Revert "ovl: turn of SB_POSIXACL with idmapped layers temporarily" 2022-07-15 22:10:51 +02:00
path-lookup.rst Merge branch 'work.namei' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2021-07-03 11:41:14 -07:00
path-lookup.txt
porting.rst fs: rename current get acl method 2022-10-20 10:13:27 +02:00
proc.rst mm: add NR_SECONDARY_PAGETABLE to count secondary page table uses. 2022-08-24 13:51:42 -07:00
qnx6.rst Documentation: filesystems: correct possessive "its" 2022-09-27 13:21:44 -06:00
quota.rst
ramfs-rootfs-initramfs.rst Documentation: Fix intiramfs script name 2021-07-18 23:48:14 +09:00
relay.rst
romfs.rst
seq_file.rst seq_file: document how per-entry resources are managed. 2021-02-26 09:41:05 -08:00
sharedsubtree.rst
splice.rst
squashfs.rst
sysfs.rst docs: filesystems: sysfs: Make text and code for ->show() consistent 2022-09-30 14:53:13 +02:00
sysv-fs.rst
tmpfs.rst tmpfs: fix Documentation nits 2020-12-15 12:13:39 -08:00
ubifs-authentication.rst
ubifs.rst Documentation: ubifs: Fix compression idiom 2022-10-10 13:01:10 -06:00
udf.rst
vfat.rst docs: filesystems: Fix a mundane typo 2021-03-25 11:51:23 -06:00
vfs.rst fs: rename current get acl method 2022-10-20 10:13:27 +02:00
virtiofs.rst
xfs-delayed-logging-design.rst Documentation: filesystems: correct possessive "its" 2022-09-27 13:21:44 -06:00
xfs-self-describing-metadata.rst
zonefs.rst documentation: zonefs: Document sysfs attributes 2022-04-26 14:53:06 +09:00