The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Christian Brauner <brauner@kernel.org>
To: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
Cc: mszeredi@redhat.com, stgraber@stgraber.org,
	 linux-fsdevel@vger.kernel.org,
	Seth Forshee <sforshee@kernel.org>,
	 Miklos Szeredi <miklos@szeredi.hu>,
	Vivek Goyal <vgoyal@redhat.com>,
	 German Maglione <gmaglione@redhat.com>,
	Amir Goldstein <amir73il@gmail.com>,
	 Bernd Schubert <bschubert@ddn.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 00/11] fuse: basic support for idmapped mounts
Date: Fri, 16 Aug 2024 10:01:52 +0200	[thread overview]
Message-ID: <20240815-ehemaligen-duftstoffe-a5f2ab60ddc9@brauner> (raw)
In-Reply-To: <20240815092429.103356-1-aleksandr.mikhalitsyn@canonical.com>

On Thu, Aug 15, 2024 at 11:24:17AM GMT, Alexander Mikhalitsyn wrote:
> Dear friends,
> 
> This patch series aimed to provide support for idmapped mounts
> for fuse & virtiofs. We already have idmapped mounts support for almost all
> widely-used filesystems:
> * local (ext4, btrfs, xfs, fat, vfat, ntfs3, squashfs, f2fs, erofs, ZFS (out-of-tree))
> * network (ceph)
> 
> Git tree (based on torvalds/master):
> v3: https://github.com/mihalicyn/linux/commits/fuse_idmapped_mounts.v3
> current: https://github.com/mihalicyn/linux/commits/fuse_idmapped_mounts
> 
> Changelog for version 3:
> - introduce and use a new SB_I_NOIDMAP flag (suggested by Christian)
> - add support for virtiofs (+user space virtiofsd conversion)
> 
> Changelog for version 2:
> - removed "fs/namespace: introduce fs_type->allow_idmap hook" and simplified logic
> to return -EIO if a fuse daemon does not support idmapped mounts (suggested
> by Christian Brauner)
> - passed an "idmap" in more cases even when it's not necessary to simplify things (suggested
> by Christian Brauner)
> - take ->rename() RENAME_WHITEOUT into account and forbid it for idmapped mount case
> 
> Links to previous versions:
> v2: https://lore.kernel.org/linux-fsdevel/20240814114034.113953-1-aleksandr.mikhalitsyn@canonical.com
> tree: https://github.com/mihalicyn/linux/commits/fuse_idmapped_mounts.v2
> v1: https://lore.kernel.org/all/20240108120824.122178-1-aleksandr.mikhalitsyn@canonical.com/#r
> tree: https://github.com/mihalicyn/linux/commits/fuse_idmapped_mounts.v1
> 
> Having fuse (+virtiofs) supported looks like a good next step. At the same time
> fuse conceptually close to the network filesystems and supporting it is
> a quite challenging task.
> 
> Let me briefly explain what was done in this series and which obstacles we have.
> 
> With this series, you can use idmapped mounts with fuse if the following
> conditions are met:
> 1. The filesystem daemon declares idmap support (new FUSE_INIT response feature
> flags FUSE_OWNER_UID_GID_EXT and FUSE_ALLOW_IDMAP)
> 2. The filesystem superblock was mounted with the "default_permissions" parameter
> 3. The filesystem fuse daemon does not perform any UID/GID-based checks internally
> and fully trusts the kernel to do that (yes, it's almost the same as 2.)
> 
> I have prepared a bunch of real-world examples of the user space modifications
> that can be done to use this extension:
> - libfuse support
> https://github.com/mihalicyn/libfuse/commits/idmap_support
> - fuse-overlayfs support:
> https://github.com/mihalicyn/fuse-overlayfs/commits/idmap_support
> - cephfs-fuse conversion example
> https://github.com/mihalicyn/ceph/commits/fuse_idmap
> - glusterfs conversion example (there is a conceptual issue)
> https://github.com/mihalicyn/glusterfs/commits/fuse_idmap
> - virtiofsd conversion example
> https://gitlab.com/virtio-fs/virtiofsd/-/merge_requests/245

So I have no further comments on this and from my perspective this is:

Reviewed-by: Christian Brauner <brauner@kernel.org>

I would really like to see tests for this feature as this is available
to unprivileged users.

  parent reply	other threads:[~2024-08-16  8:01 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-15  9:24 [PATCH v3 00/11] fuse: basic support for idmapped mounts Alexander Mikhalitsyn
2024-08-15  9:24 ` [PATCH v3 01/11] fs/namespace: introduce SB_I_NOIDMAP flag Alexander Mikhalitsyn
2024-08-15  9:24 ` [PATCH v3 02/11] fs/fuse: add FUSE_OWNER_UID_GID_EXT extension Alexander Mikhalitsyn
2024-08-15  9:24 ` [PATCH v3 03/11] fs/fuse: support idmap for mkdir/mknod/symlink/create Alexander Mikhalitsyn
2024-08-15  9:24 ` [PATCH v3 04/11] fs/fuse: support idmapped getattr inode op Alexander Mikhalitsyn
2024-08-15  9:24 ` [PATCH v3 05/11] fs/fuse: support idmapped ->permission " Alexander Mikhalitsyn
2024-08-15  9:24 ` [PATCH v3 06/11] fs/fuse: support idmapped ->setattr op Alexander Mikhalitsyn
2024-08-15  9:24 ` [PATCH v3 07/11] fs/fuse: drop idmap argument from __fuse_get_acl Alexander Mikhalitsyn
2024-08-15  9:24 ` [PATCH v3 08/11] fs/fuse: support idmapped ->set_acl Alexander Mikhalitsyn
2024-08-15  9:24 ` [PATCH v3 09/11] fs/fuse: properly handle idmapped ->rename op Alexander Mikhalitsyn
2024-08-15  9:24 ` [PATCH v3 10/11] fs/fuse: allow idmapped mounts Alexander Mikhalitsyn
2024-08-15  9:24 ` [PATCH v3 11/11] fs/fuse/virtio_fs: " Alexander Mikhalitsyn
2024-08-16  8:01 ` Christian Brauner [this message]
2024-08-16  8:58   ` [PATCH v3 00/11] fuse: basic support for " Aleksandr Mikhalitsyn
2024-08-16 13:45     ` Aleksandr Mikhalitsyn
2024-08-19 11:34 ` Christian Brauner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240815-ehemaligen-duftstoffe-a5f2ab60ddc9@brauner \
    --to=brauner@kernel.org \
    --cc=aleksandr.mikhalitsyn@canonical.com \
    --cc=amir73il@gmail.com \
    --cc=bschubert@ddn.com \
    --cc=gmaglione@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --cc=mszeredi@redhat.com \
    --cc=sforshee@kernel.org \
    --cc=stgraber@stgraber.org \
    --cc=vgoyal@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox