All of lore.kernel.org
 help / color / mirror / Atom feed
From: ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org (Eric W. Biederman)
To: Miklos Szeredi <miklos-sUDqSbJrdHQHWmgEVkV9KA@public.gmane.org>
Cc: linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Linux Containers
	<containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org>,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] userns: Support fuse interacting with multiple user namespaces
Date: Mon, 12 Nov 2012 18:37:33 -0800	[thread overview]
Message-ID: <878va6i5xu.fsf@xmission.com> (raw)
In-Reply-To: <87625brr76.fsf-d8RdFUjzFsbxNFs70CDYszOMxtEWgIxa@public.gmane.org> (Miklos Szeredi's message of "Mon, 12 Nov 2012 12:33:33 +0100")

Miklos Szeredi <miklos-sUDqSbJrdHQHWmgEVkV9KA@public.gmane.org> writes:

> ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org (Eric W. Biederman) writes:
>
>> Use kuid_t and kgid_t in struct fuse_conn and struct fuse_mount_data.
>>
>> The connection between between a fuse filesystem and a fuse daemon is
>> established when a fuse filesystem is mounted and provided with a file
>> descriptor the fuse daemon created by opening /dev/fuse.
>>
>> For now restrict the communication of uids and gids between the fuse
>> filesystem and the fuse daemon to the initial user namespace.
>
> Why?
>
> I think far more logical would be to limit a single instance of the
> filesystem and the daemon to an arbitrary but *single* namespace.
> I.e. one fuse_conn <-> one user namespace.
>
> Is there a reason to treat the initial namespace specially?

Stepwise making this work.

The initial user namespace is special in that is the only user namespace
you can currently mount a filesystem in.

My goal with the posted patch is to support users on the other side of
the vfs that are in multiple user namespaces.  Which basically means
accepting kuid_t and kgid_t values and converting them to uid_t and
gid_t values where needed.

As for creating a version of fuse that can be mounted in different user
namespaces and can communicate with the fuse daemon in the user
namespace the filesystem was mounted in, I have a preliminary patch for
that.  My goal with that patch is to support unprivileged mounts of fuse
without the help of a suid root mount program.  But that patch is more
involved and not quite ready yet.

I want to get to the point that I can enable fuse and user namespaces at
the same time (what this patch allows) and then put in the effort to
fully take advantage of user namespaces.

Eric

WARNING: multiple messages have this Message-ID (diff)
From: ebiederm@xmission.com (Eric W. Biederman)
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: <linux-fsdevel@vger.kernel.org>,
	"Serge E. Hallyn" <serge@hallyn.com>,
	Linux Containers <containers@lists.linux-foundation.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] userns: Support fuse interacting with multiple user namespaces
Date: Mon, 12 Nov 2012 18:37:33 -0800	[thread overview]
Message-ID: <878va6i5xu.fsf@xmission.com> (raw)
In-Reply-To: <87625brr76.fsf@tucsk.pomaz.szeredi.hu> (Miklos Szeredi's message of "Mon, 12 Nov 2012 12:33:33 +0100")

Miklos Szeredi <miklos@szeredi.hu> writes:

> ebiederm@xmission.com (Eric W. Biederman) writes:
>
>> Use kuid_t and kgid_t in struct fuse_conn and struct fuse_mount_data.
>>
>> The connection between between a fuse filesystem and a fuse daemon is
>> established when a fuse filesystem is mounted and provided with a file
>> descriptor the fuse daemon created by opening /dev/fuse.
>>
>> For now restrict the communication of uids and gids between the fuse
>> filesystem and the fuse daemon to the initial user namespace.
>
> Why?
>
> I think far more logical would be to limit a single instance of the
> filesystem and the daemon to an arbitrary but *single* namespace.
> I.e. one fuse_conn <-> one user namespace.
>
> Is there a reason to treat the initial namespace specially?

Stepwise making this work.

The initial user namespace is special in that is the only user namespace
you can currently mount a filesystem in.

My goal with the posted patch is to support users on the other side of
the vfs that are in multiple user namespaces.  Which basically means
accepting kuid_t and kgid_t values and converting them to uid_t and
gid_t values where needed.

As for creating a version of fuse that can be mounted in different user
namespaces and can communicate with the fuse daemon in the user
namespace the filesystem was mounted in, I have a preliminary patch for
that.  My goal with that patch is to support unprivileged mounts of fuse
without the help of a suid root mount program.  But that patch is more
involved and not quite ready yet.

I want to get to the point that I can enable fuse and user namespaces at
the same time (what this patch allows) and then put in the effort to
fully take advantage of user namespaces.

Eric










  parent reply	other threads:[~2012-11-13  2:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-31  6:34 [PATCH] userns: Support fuse interacting with multiple user namespaces Eric W. Biederman
2012-10-31  6:34 ` Eric W. Biederman
     [not found] ` <87objjcfp4.fsf-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
2012-11-12 11:33   ` Miklos Szeredi
2012-11-12 11:33     ` Miklos Szeredi
2012-11-12 11:33     ` Miklos Szeredi
     [not found]     ` <87625brr76.fsf-d8RdFUjzFsbxNFs70CDYszOMxtEWgIxa@public.gmane.org>
2012-11-13  2:37       ` Eric W. Biederman [this message]
2012-11-13  2:37         ` Eric W. Biederman

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=878va6i5xu.fsf@xmission.com \
    --to=ebiederm-as9lmozglivwk0htik3j/w@public.gmane.org \
    --cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=miklos-sUDqSbJrdHQHWmgEVkV9KA@public.gmane.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.