linux-stable/fs/9p
Christian Brauner 079da62938
9p: implement set 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].

In order to build a type safe posix api around get and set acl we need
all filesystem to implement get and set acl.

So far 9p implemented a ->get_inode_acl() operation that didn't require
access to the dentry in order to allow (limited) permission checking via
posix acls in the vfs. Now that we have get and set acl inode operations
that take a dentry argument we can give 9p get and set acl inode
operations.

This is mostly a light refactoring of the codepaths currently used in 9p
posix acl xattr handler. After we have fully implemented the posix acl
api and switched the vfs over to it, the 9p specific posix acl xattr
handler and associated code will be removed.

Note, until the vfs has been switched to the new posix acl api this
patch is a non-functional change.

Link: https://lore.kernel.org/all/20220801145520.1532837-1-brauner@kernel.org [1]
Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
2022-10-20 10:13:28 +02:00
..
acl.c 9p: implement set acl method 2022-10-20 10:13:28 +02:00
acl.h 9p: implement set acl method 2022-10-20 10:13:28 +02:00
cache.c netfs: Fix gcc-12 warning by embedding vfs inode in netfs_i_context 2022-06-09 13:55:00 -07:00
cache.h 9p: Use fscache indexing rewrite and reenable caching 2022-01-10 11:53:06 +00:00
fid.c 9p: Fix some kernel-doc comments 2022-07-02 18:52:21 +09:00
fid.h 9p fid refcount: cleanup p9_fid_put calls 2022-07-02 18:52:21 +09:00
Kconfig 9p: Use fscache indexing rewrite and reenable caching 2022-01-10 11:53:06 +00:00
Makefile
v9fs.c netfs: Fix gcc-12 warning by embedding vfs inode in netfs_i_context 2022-06-09 13:55:00 -07:00
v9fs.h netfs: Further cleanups after struct netfs_inode wrapper introduced 2022-06-10 20:55:21 +01:00
v9fs_vfs.h 9p: fix a bunch of checkpatch warnings 2021-11-04 21:04:25 +09:00
vfs_addr.c 9p fid refcount: add p9_fid_get/put wrappers 2022-07-02 18:52:21 +09:00
vfs_dentry.c 9p fid refcount: add p9_fid_get/put wrappers 2022-07-02 18:52:21 +09:00
vfs_dir.c 9p fid refcount: add p9_fid_get/put wrappers 2022-07-02 18:52:21 +09:00
vfs_file.c 9p fid refcount: cleanup p9_fid_put calls 2022-07-02 18:52:21 +09:00
vfs_inode.c 9p fid refcount: cleanup p9_fid_put calls 2022-07-02 18:52:21 +09:00
vfs_inode_dotl.c 9p: implement set acl method 2022-10-20 10:13:28 +02:00
vfs_super.c 9p fid refcount: cleanup p9_fid_put calls 2022-07-02 18:52:21 +09:00
xattr.c 9p fid refcount: add p9_fid_get/put wrappers 2022-07-02 18:52:21 +09:00
xattr.h 9p: fix a bunch of checkpatch warnings 2021-11-04 21:04:25 +09:00