linux-stable/fs/configfs
Christian Brauner 47291baa8d
namei: make permission helpers idmapped mount aware
The two helpers inode_permission() and generic_permission() are used by
the vfs to perform basic permission checking by verifying that the
caller is privileged over an inode. In order to handle idmapped mounts
we extend the two helpers with an additional user namespace argument.
On idmapped mounts the two helpers will make sure to map the inode
according to the mount's user namespace and then peform identical
permission checks to inode_permission() and generic_permission(). If the
initial user namespace is passed nothing changes so non-idmapped mounts
will see identical behavior as before.

Link: https://lore.kernel.org/r/20210121131959.646623-6-christian.brauner@ubuntu.com
Cc: Christoph Hellwig <hch@lst.de>
Cc: David Howells <dhowells@redhat.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: linux-fsdevel@vger.kernel.org
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: James Morris <jamorris@linux.microsoft.com>
Acked-by: Serge Hallyn <serge@hallyn.com>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-01-24 14:27:16 +01:00
..
configfs_internal.h configfs: calculate the symlink target only once 2019-09-11 12:46:14 +02:00
dir.c configfs: fix kernel-doc markup issue 2020-11-14 10:22:45 +01:00
file.c fs: configfs: delete repeated words in comments 2020-10-16 11:11:19 -07:00
inode.c docs: filesystems: convert configfs.txt to ReST 2020-05-05 09:23:25 -06:00
item.c docs: filesystems: convert configfs.txt to ReST 2020-05-05 09:23:25 -06:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
mount.c configfs: calculate the symlink target only once 2019-09-11 12:46:14 +02:00
symlink.c namei: make permission helpers idmapped mount aware 2021-01-24 14:27:16 +01:00