linux/fs
Linus Torvalds 05e6295f7b fs.idmapped.v6.3
-----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQRAhzRXHqcMeLMyaSiRxhvAZXjcogUCY+5NlQAKCRCRxhvAZXjc
 orOaAP9i2h3OJy95nO2Fpde0Bt2UT+oulKCCcGlvXJ8/+TQpyQD/ZQq47gFQ0EAz
 Br5NxeyGeecAb0lHpFz+CpLGsxMrMwQ=
 =+BG5
 -----END PGP SIGNATURE-----

Merge tag 'fs.idmapped.v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/idmapping

Pull vfs idmapping updates from Christian Brauner:

 - Last cycle we introduced the dedicated struct mnt_idmap type for
   mount idmapping and the required infrastucture in 256c8aed2b ("fs:
   introduce dedicated idmap type for mounts"). As promised in last
   cycle's pull request message this converts everything to rely on
   struct mnt_idmap.

   Currently we still pass around the plain namespace that was attached
   to a mount. This is in general pretty convenient but it makes it easy
   to conflate namespaces that are relevant on the filesystem with
   namespaces that are relevant on the mount level. Especially for
   non-vfs developers without detailed knowledge in this area this was a
   potential source for bugs.

   This finishes the conversion. Instead of passing the plain namespace
   around this updates all places that currently take a pointer to a
   mnt_userns with a pointer to struct mnt_idmap.

   Now that the conversion is done all helpers down to the really
   low-level helpers only accept a struct mnt_idmap argument instead of
   two namespace arguments.

   Conflating mount and other idmappings will now cause the compiler to
   complain loudly thus eliminating the possibility of any bugs. This
   makes it impossible for filesystem developers to mix up mount and
   filesystem idmappings as they are two distinct types and require
   distinct helpers that cannot be used interchangeably.

   Everything associated with struct mnt_idmap is moved into a single
   separate file. With that change no code can poke around in struct
   mnt_idmap. It can only be interacted with through dedicated helpers.
   That means all filesystems are and all of the vfs is completely
   oblivious to the actual implementation of idmappings.

   We are now also able to extend struct mnt_idmap as we see fit. For
   example, we can decouple it completely from namespaces for users that
   don't require or don't want to use them at all. We can also extend
   the concept of idmappings so we can cover filesystem specific
   requirements.

   In combination with the vfs{g,u}id_t work we finished in v6.2 this
   makes this feature substantially more robust and thus difficult to
   implement wrong by a given filesystem and also protects the vfs.

 - Enable idmapped mounts for tmpfs and fulfill a longstanding request.

   A long-standing request from users had been to make it possible to
   create idmapped mounts for tmpfs. For example, to share the host's
   tmpfs mount between multiple sandboxes. This is a prerequisite for
   some advanced Kubernetes cases. Systemd also has a range of use-cases
   to increase service isolation. And there are more users of this.

   However, with all of the other work going on this was way down on the
   priority list but luckily someone other than ourselves picked this
   up.

   As usual the patch is tiny as all the infrastructure work had been
   done multiple kernel releases ago. In addition to all the tests that
   we already have I requested that Rodrigo add a dedicated tmpfs
   testsuite for idmapped mounts to xfstests. It is to be included into
   xfstests during the v6.3 development cycle. This should add a slew of
   additional tests.

* tag 'fs.idmapped.v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/idmapping: (26 commits)
  shmem: support idmapped mounts for tmpfs
  fs: move mnt_idmap
  fs: port vfs{g,u}id helpers to mnt_idmap
  fs: port fs{g,u}id helpers to mnt_idmap
  fs: port i_{g,u}id_into_vfs{g,u}id() to mnt_idmap
  fs: port i_{g,u}id_{needs_}update() to mnt_idmap
  quota: port to mnt_idmap
  fs: port privilege checking helpers to mnt_idmap
  fs: port inode_owner_or_capable() to mnt_idmap
  fs: port inode_init_owner() to mnt_idmap
  fs: port acl to mnt_idmap
  fs: port xattr to mnt_idmap
  fs: port ->permission() to pass mnt_idmap
  fs: port ->fileattr_set() to pass mnt_idmap
  fs: port ->set_acl() to pass mnt_idmap
  fs: port ->get_acl() to pass mnt_idmap
  fs: port ->tmpfile() to pass mnt_idmap
  fs: port ->rename() to pass mnt_idmap
  fs: port ->mknod() to pass mnt_idmap
  fs: port ->mkdir() to pass mnt_idmap
  ...
2023-02-20 11:53:11 -08:00
..
9p fs.idmapped.v6.3 2023-02-20 11:53:11 -08:00
adfs fs: port ->setattr() to pass mnt_idmap 2023-01-19 09:24:02 +01:00
affs fs.idmapped.v6.3 2023-02-20 11:53:11 -08:00
afs fs.idmapped.v6.3 2023-02-20 11:53:11 -08:00
autofs fs: port ->permission() to pass mnt_idmap 2023-01-19 09:24:28 +01:00
befs
bfs fs: port inode_init_owner() to mnt_idmap 2023-01-19 09:24:28 +01:00
btrfs fs.idmapped.v6.3 2023-02-20 11:53:11 -08:00
cachefiles fs: port ->permission() to pass mnt_idmap 2023-01-19 09:24:28 +01:00
ceph fs.idmapped.v6.3 2023-02-20 11:53:11 -08:00
cifs fs.idmapped.v6.3 2023-02-20 11:53:11 -08:00
coda fs: port ->permission() to pass mnt_idmap 2023-01-19 09:24:28 +01:00
configfs fs: port ->permission() to pass mnt_idmap 2023-01-19 09:24:28 +01:00
cramfs
crypto fs: port inode_owner_or_capable() to mnt_idmap 2023-01-19 09:24:29 +01:00
debugfs fs: port ->rename() to pass mnt_idmap 2023-01-19 09:24:26 +01:00
devpts
dlm filelock: move file locking definitions to separate header file 2023-01-11 06:52:32 -05:00
ecryptfs fs: port xattr to mnt_idmap 2023-01-19 09:24:28 +01:00
efivarfs fs: port ->fileattr_set() to pass mnt_idmap 2023-01-19 09:24:27 +01:00
efs
erofs fs.idmapped.v6.3 2023-02-20 11:53:11 -08:00
exfat fs: port ->rename() to pass mnt_idmap 2023-01-19 09:24:26 +01:00
exportfs fs: port ->permission() to pass mnt_idmap 2023-01-19 09:24:28 +01:00
ext2 quota: port to mnt_idmap 2023-01-19 09:24:29 +01:00
ext4 fs.idmapped.v6.3 2023-02-20 11:53:11 -08:00
f2fs fs.idmapped.v6.3 2023-02-20 11:53:11 -08:00
fat fs: port vfs{g,u}id helpers to mnt_idmap 2023-01-19 09:24:30 +01:00
freevxfs freevxfs: Kconfig: fix spelling 2023-01-31 16:44:08 -08:00
fscache fscache: Use clear_and_wake_up_bit() in fscache_create_volume_work() 2023-01-30 12:51:54 +00:00
fuse fs.idmapped.v6.3 2023-02-20 11:53:11 -08:00
gfs2 fs.idmapped.v6.3 2023-02-20 11:53:11 -08:00
hfs fs.idmapped.v6.3 2023-02-20 11:53:11 -08:00
hfsplus fs: port inode_init_owner() to mnt_idmap 2023-01-19 09:24:28 +01:00
hostfs fs: port ->permission() to pass mnt_idmap 2023-01-19 09:24:28 +01:00
hpfs fs: port ->rename() to pass mnt_idmap 2023-01-19 09:24:26 +01:00
hugetlbfs fs: port inode_init_owner() to mnt_idmap 2023-01-19 09:24:28 +01:00
iomap New XFS code for 6.2: 2022-12-14 10:11:51 -08:00
isofs
jbd2 jbd2: switch jbd2_submit_inode_data() to use fs-provided hook for data writeout 2022-12-08 21:49:25 -05:00
jffs2 fs: port acl to mnt_idmap 2023-01-19 09:24:28 +01:00
jfs quota: port to mnt_idmap 2023-01-19 09:24:29 +01:00
kernfs fs: port xattr to mnt_idmap 2023-01-19 09:24:28 +01:00
ksmbd fs.idmapped.v6.3 2023-02-20 11:53:11 -08:00
lockd fs: remove locks_inode 2023-01-11 06:52:43 -05:00
minix fs: port inode_init_owner() to mnt_idmap 2023-01-19 09:24:28 +01:00
netfs
nfs fs.idmapped.v6.3 2023-02-20 11:53:11 -08:00
nfs_common filelock: move file locking definitions to separate header file 2023-01-11 06:52:32 -05:00
nfsd fs.idmapped.v6.3 2023-02-20 11:53:11 -08:00
nilfs2 fs.idmapped.v6.3 2023-02-20 11:53:11 -08:00
nls
notify
ntfs fs: port ->setattr() to pass mnt_idmap 2023-01-19 09:24:02 +01:00
ntfs3 fs.idmapped.v6.3 2023-02-20 11:53:11 -08:00
ocfs2 fs.idmapped.v6.3 2023-02-20 11:53:11 -08:00
omfs fs: port inode_init_owner() to mnt_idmap 2023-01-19 09:24:28 +01:00
openpromfs
orangefs fs.idmapped.v6.3 2023-02-20 11:53:11 -08:00
overlayfs fs.idmapped.v6.3 2023-02-20 11:53:11 -08:00
proc fs.idmapped.v6.3 2023-02-20 11:53:11 -08:00
pstore pstore updates for v6.2-rc1-fixes 2022-12-23 11:55:54 -08:00
qnx4
qnx6
quota fs: port vfs{g,u}id helpers to mnt_idmap 2023-01-19 09:24:30 +01:00
ramfs fs: port inode_init_owner() to mnt_idmap 2023-01-19 09:24:28 +01:00
reiserfs quota: port to mnt_idmap 2023-01-19 09:24:29 +01:00
romfs
smbfs_common
squashfs revert "squashfs: harden sanity check in squashfs_read_xattr_id_table" 2023-02-03 17:52:25 -08:00
sysfs
sysv fs: port inode_init_owner() to mnt_idmap 2023-01-19 09:24:28 +01:00
tracefs fs: port ->mkdir() to pass mnt_idmap 2023-01-19 09:24:26 +01:00
ubifs fs: port inode_init_owner() to mnt_idmap 2023-01-19 09:24:28 +01:00
udf fs.idmapped.v6.3 2023-02-20 11:53:11 -08:00
ufs fs: port inode_init_owner() to mnt_idmap 2023-01-19 09:24:28 +01:00
unicode
vboxsf fs: port ->rename() to pass mnt_idmap 2023-01-19 09:24:26 +01:00
verity
xfs fs.idmapped.v6.3 2023-02-20 11:53:11 -08:00
zonefs fs.idmapped.v6.3 2023-02-20 11:53:11 -08:00
aio.c aio: fix mremap after fork null-deref 2023-02-03 17:52:24 -08:00
anon_inodes.c
attr.c fs.idmapped.v6.3 2023-02-20 11:53:11 -08:00
bad_inode.c fs: port ->permission() to pass mnt_idmap 2023-01-19 09:24:28 +01:00
binfmt_elf_fdpic.c elfcore: Add a cprm parameter to elf_core_extra_{phdrs,data_size} 2023-01-05 15:12:12 +00:00
binfmt_elf_test.c
binfmt_elf.c elfcore: Add a cprm parameter to elf_core_extra_{phdrs,data_size} 2023-01-05 15:12:12 +00:00
binfmt_flat.c
binfmt_misc.c binfmt_misc: fix shift-out-of-bounds in check_special_flags 2022-12-02 13:57:04 -08:00
binfmt_script.c
buffer.c
char_dev.c chardev: fix error handling in cdev_device_add() 2022-12-02 17:48:59 +01:00
compat_binfmt_elf.c
coredump.c fs.idmapped.v6.3 2023-02-20 11:53:11 -08:00
d_path.c
dax.c fsdax: dax_unshare_iter() should return a valid length 2023-02-03 17:52:24 -08:00
dcache.c
direct-io.c
drop_caches.c
eventfd.c
eventpoll.c
exec.c fs: port i_{g,u}id_into_vfs{g,u}id() to mnt_idmap 2023-01-19 09:24:29 +01:00
fcntl.c fs.idmapped.v6.3 2023-02-20 11:53:11 -08:00
fhandle.c
file_table.c filelock: move file locking definitions to separate header file 2023-01-11 06:52:32 -05:00
file.c
filesystems.c
fs_context.c
fs_parser.c ext4: journal_path mount options should follow links 2022-12-01 10:46:54 -05:00
fs_pin.c
fs_struct.c
fs_types.c
fs-writeback.c for-6.2/writeback-2022-12-12 2022-12-15 18:09:48 -08:00
fsopen.c
init.c fs: port ->permission() to pass mnt_idmap 2023-01-19 09:24:28 +01:00
inode.c fs.idmapped.v6.3 2023-02-20 11:53:11 -08:00
internal.h fs: move mnt_idmap 2023-01-19 09:24:30 +01:00
ioctl.c fs: port inode_owner_or_capable() to mnt_idmap 2023-01-19 09:24:29 +01:00
Kconfig
Kconfig.binfmt
kernel_read_file.c
libfs.c fs.idmapped.v6.3 2023-02-20 11:53:11 -08:00
locks.c fs: remove locks_inode 2023-01-11 06:52:43 -05:00
Makefile fs: move mnt_idmap 2023-01-19 09:24:30 +01:00
mbcache.c ext4: fix deadlock due to mbcache entry corruption 2022-12-08 21:49:25 -05:00
mnt_idmapping.c fs: move mnt_idmap 2023-01-19 09:24:30 +01:00
mount.h
mpage.c
namei.c fs.idmapped.v6.3 2023-02-20 11:53:11 -08:00
namespace.c fs: move mnt_idmap 2023-01-19 09:24:30 +01:00
no-block.c
nsfs.c
open.c fs.idmapped.v6.3 2023-02-20 11:53:11 -08:00
pipe.c
pnode.c pnode: terminate at peers of source 2022-12-21 14:45:25 +01:00
pnode.h
posix_acl.c fs.idmapped.v6.3 2023-02-20 11:53:11 -08:00
proc_namespace.c
read_write.c iov_iter work; most of that is about getting rid of 2022-12-12 18:29:54 -08:00
readdir.c
remap_range.c fs: port i_{g,u}id_into_vfs{g,u}id() to mnt_idmap 2023-01-19 09:24:29 +01:00
select.c
seq_file.c
signalfd.c
splice.c
stack.c
stat.c fs.idmapped.v6.3 2023-02-20 11:53:11 -08:00
statfs.c
super.c misc pile 2022-12-12 18:38:47 -08:00
sync.c
sysctls.c
timerfd.c
userfaultfd.c mm/userfaultfd: enable writenotify while userfaultfd-wp is enabled for a VMA 2023-01-11 16:14:20 -08:00
utimes.c fs.idmapped.v6.3 2023-02-20 11:53:11 -08:00
xattr.c fs.idmapped.v6.3 2023-02-20 11:53:11 -08:00