]> git.baikalelectronics.ru Git - kernel.git/commit
fs: make helpers idmap mount aware
authorChristian Brauner <christian.brauner@ubuntu.com>
Thu, 21 Jan 2021 13:19:43 +0000 (14:19 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Sun, 24 Jan 2021 13:27:20 +0000 (14:27 +0100)
commitbaf32546e288f2b28eae786c7381089f2ed61099
treed096bc02f780bdee69a701952d5568f4be9972c1
parent80a97da6ff1f48f0c5a529818d8a60ac2ccbd314
fs: make helpers idmap mount aware

Extend some inode methods with an additional user namespace argument. A
filesystem that is aware of idmapped mounts will receive the user
namespace the mount has been marked with. This can be used for
additional permission checking and also to enable filesystems to
translate between uids and gids if they need to. We have implemented all
relevant helpers in earlier patches.

As requested we simply extend the exisiting inode method instead of
introducing new ones. This is a little more code churn but it's mostly
mechanical and doesnt't leave us with additional inode methods.

Link: https://lore.kernel.org/r/20210121131959.646623-25-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>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
182 files changed:
Documentation/filesystems/vfs.rst
arch/powerpc/platforms/cell/spufs/inode.c
drivers/android/binderfs.c
fs/9p/acl.c
fs/9p/v9fs.h
fs/9p/v9fs_vfs.h
fs/9p/vfs_inode.c
fs/9p/vfs_inode_dotl.c
fs/adfs/adfs.h
fs/adfs/inode.c
fs/affs/affs.h
fs/affs/inode.c
fs/affs/namei.c
fs/afs/dir.c
fs/afs/inode.c
fs/afs/internal.h
fs/afs/security.c
fs/attr.c
fs/autofs/root.c
fs/bad_inode.c
fs/bfs/dir.c
fs/btrfs/acl.c
fs/btrfs/ctree.h
fs/btrfs/inode.c
fs/ceph/acl.c
fs/ceph/dir.c
fs/ceph/inode.c
fs/ceph/super.h
fs/cifs/cifsfs.c
fs/cifs/cifsfs.h
fs/cifs/dir.c
fs/cifs/inode.c
fs/cifs/link.c
fs/coda/coda_linux.h
fs/coda/dir.c
fs/coda/inode.c
fs/coda/pioctl.c
fs/configfs/configfs_internal.h
fs/configfs/dir.c
fs/configfs/inode.c
fs/configfs/symlink.c
fs/debugfs/inode.c
fs/ecryptfs/inode.c
fs/efivarfs/inode.c
fs/erofs/inode.c
fs/erofs/internal.h
fs/exfat/exfat_fs.h
fs/exfat/file.c
fs/exfat/namei.c
fs/ext2/acl.c
fs/ext2/acl.h
fs/ext2/ext2.h
fs/ext2/inode.c
fs/ext2/namei.c
fs/ext4/acl.c
fs/ext4/acl.h
fs/ext4/ext4.h
fs/ext4/inode.c
fs/ext4/namei.c
fs/f2fs/acl.c
fs/f2fs/acl.h
fs/f2fs/f2fs.h
fs/f2fs/file.c
fs/f2fs/namei.c
fs/fat/fat.h
fs/fat/file.c
fs/fat/namei_msdos.c
fs/fat/namei_vfat.c
fs/fuse/acl.c
fs/fuse/dir.c
fs/fuse/fuse_i.h
fs/gfs2/acl.c
fs/gfs2/acl.h
fs/gfs2/file.c
fs/gfs2/inode.c
fs/gfs2/inode.h
fs/hfs/dir.c
fs/hfs/hfs_fs.h
fs/hfs/inode.c
fs/hfsplus/dir.c
fs/hfsplus/hfsplus_fs.h
fs/hfsplus/inode.c
fs/hostfs/hostfs_kern.c
fs/hpfs/hpfs_fn.h
fs/hpfs/inode.c
fs/hpfs/namei.c
fs/hugetlbfs/inode.c
fs/jffs2/acl.c
fs/jffs2/acl.h
fs/jffs2/dir.c
fs/jffs2/fs.c
fs/jffs2/os-linux.h
fs/jfs/acl.c
fs/jfs/file.c
fs/jfs/jfs_acl.h
fs/jfs/jfs_inode.h
fs/jfs/namei.c
fs/kernfs/dir.c
fs/kernfs/inode.c
fs/kernfs/kernfs-internal.h
fs/libfs.c
fs/minix/file.c
fs/minix/inode.c
fs/minix/minix.h
fs/minix/namei.c
fs/namei.c
fs/nfs/dir.c
fs/nfs/inode.c
fs/nfs/internal.h
fs/nfs/namespace.c
fs/nfs/nfs3_fs.h
fs/nfs/nfs3acl.c
fs/nilfs2/inode.c
fs/nilfs2/namei.c
fs/nilfs2/nilfs.h
fs/ntfs/inode.c
fs/ntfs/inode.h
fs/ocfs2/acl.c
fs/ocfs2/acl.h
fs/ocfs2/dlmfs/dlmfs.c
fs/ocfs2/file.c
fs/ocfs2/file.h
fs/ocfs2/namei.c
fs/omfs/dir.c
fs/omfs/file.c
fs/orangefs/acl.c
fs/orangefs/inode.c
fs/orangefs/namei.c
fs/orangefs/orangefs-kernel.h
fs/overlayfs/dir.c
fs/overlayfs/inode.c
fs/overlayfs/overlayfs.h
fs/overlayfs/super.c
fs/posix_acl.c
fs/proc/base.c
fs/proc/fd.c
fs/proc/fd.h
fs/proc/generic.c
fs/proc/internal.h
fs/proc/proc_net.c
fs/proc/proc_sysctl.c
fs/proc/root.c
fs/ramfs/file-nommu.c
fs/ramfs/inode.c
fs/reiserfs/acl.h
fs/reiserfs/inode.c
fs/reiserfs/namei.c
fs/reiserfs/reiserfs.h
fs/reiserfs/xattr.c
fs/reiserfs/xattr.h
fs/reiserfs/xattr_acl.c
fs/stat.c
fs/sysv/file.c
fs/sysv/itree.c
fs/sysv/namei.c
fs/sysv/sysv.h
fs/tracefs/inode.c
fs/ubifs/dir.c
fs/ubifs/file.c
fs/ubifs/ubifs.h
fs/udf/file.c
fs/udf/namei.c
fs/udf/symlink.c
fs/ufs/inode.c
fs/ufs/namei.c
fs/ufs/ufs.h
fs/vboxsf/dir.c
fs/vboxsf/utils.c
fs/vboxsf/vfsmod.h
fs/xfs/xfs_acl.c
fs/xfs/xfs_acl.h
fs/xfs/xfs_iops.c
fs/zonefs/super.c
include/linux/fs.h
include/linux/nfs_fs.h
include/linux/posix_acl.h
ipc/mqueue.c
kernel/bpf/inode.c
mm/shmem.c
net/socket.c
security/apparmor/apparmorfs.c
security/integrity/evm/evm_secfs.c