linux-stable/fs/overlayfs
Christian Brauner 6c0a8bfb84
ovl: implement 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].

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

Now that we have added get and set acl inode operations that allow easy
access to the dentry we give overlayfs it's own get and set acl inode
operations.

Since overlayfs is a stacking filesystem it will use the newly added
posix acl api when retrieving posix acls from the relevant layer.

Since overlayfs can also be mounted on top of idmapped layers. If
idmapped layers are used overlayfs must take the layer's idmapping into
account after it retrieved the posix acls from the relevant layer.

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:30 +02:00
..
Kconfig docs: fix broken references to text files 2020-04-20 15:35:59 -06:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
copy_up.c tmpfile API change 2022-10-10 19:45:17 -07:00
dir.c ovl: implement get acl method 2022-10-20 10:13:30 +02:00
export.c ovl: drop WARN_ON() dentry is NULL in ovl_encode_fh() 2022-07-28 15:00:57 +02:00
file.c overlayfs: constify path 2022-09-01 17:38:07 -04:00
inode.c ovl: implement get acl method 2022-10-20 10:13:30 +02:00
namei.c overlayfs: constify path 2022-09-01 17:38:07 -04:00
overlayfs.h ovl: implement get acl method 2022-10-20 10:13:30 +02:00
ovl_entry.h ovl: support idmapped layers 2022-04-28 16:31:12 +02:00
readdir.c whack-a-mole: constifying struct path * 2022-10-06 17:31:02 -07:00
super.c tmpfile API change 2022-10-10 19:45:17 -07:00
util.c ovl: use vfs_tmpfile_open() helper 2022-09-24 07:00:00 +02:00