[GIT PULL] vfsuid updates for v6.1

From: Christian Brauner
Date: Mon Oct 03 2022 - 07:21:29 EST


Hey Linus,

/* Summary */
Last cycle we introduced the new vfs{g,u}id_t types that we had agreed on. The
most important parts of the vfs have been converted but there are a few more
places we need to switch before we can remove the old helpers completely.

This cycle we converted all filesystems that called idmapped mount helpers
directly. The affected filesystems are f2fs, fat, fuse, ksmbd, overlayfs, and
xfs. We've sent patches for all of them. Looking at -next f2fs, ksmbd,
overlayfs, and xfs have all picked up these patches and they should land in
mainline during the v6.1 merge window.

So all filesystems that have a separate tree should send the vfsuid
conversion themselves. Onle the fat conversion is going through one of the
generic fs trees because there is no fat tree.

In order to change time settings on an inode fat checks that the caller either is
the owner of the inode or the inode's group is in the caller's group list. If
fat is on an idmapped mount we compare whether the inode mapped into the mount
is equivalent to the caller's fsuid. If it isn't we compare whether the inode's
group mapped into the mount is in the caller's group list. We now use the new
vfsuid based helpers for that.

(Note that I didn't see the fuse conversion patch being picked up in -next.
This is probably just an oversight. It is a very simple patch so if it doesn't
show up by the end of the merge window feel free to just pick it up directly
https://lore.kernel.org/all/20220909094021.940110-1-brauner@xxxxxxxxxx or let
use know and we can send it. We can probably also just send it during -rc2.)

/* Testing */
clang: Ubuntu clang version 14.0.0-1ubuntu1
gcc: gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0

All patches are based on v6.0-rc3 and have been sitting in linux-next. No build
failures or warnings were observed. All old and new tests in fstests,
selftests, and LTP pass without regressions. (Note, the fat patch got dropped
from -next on accident as I realized while writing the commit message.)

/* Conflicts */
At the time of creating this PR no merge conflicts were reported from
linux-next and no merge conflicts showed up doing a test-merge with current
mainline.

The following changes since commit b90cb1053190353cc30f0fef0ef1f378ccc063c5:

Linux 6.0-rc3 (2022-08-28 15:05:29 -0700)

are available in the Git repository at:

ssh://git@xxxxxxxxxxxxxxxxxxx/pub/scm/linux/kernel/git/vfs/idmapping.git tags/fs.vfsuid.fat.v6.1

for you to fetch changes up to 41d27f518b955ef4b75b02cc67392aef0809a78d:

fat: port to vfs{g,u}id_t and associated helpers (2022-09-20 11:09:31 +0200)

Please consider pulling these changes from the signed fs.vfsuid.fat.v6.1 tag.

Thanks!
Christian

----------------------------------------------------------------
fs.vfsuid.fat.v6.1

----------------------------------------------------------------
Christian Brauner (1):
fat: port to vfs{g,u}id_t and associated helpers

fs/fat/file.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)