All of lore.kernel.org
 help / color / mirror / Atom feed
From: ebiederm@xmission.com (Eric W. Biederman)
To: Steve French <smfrench@gmail.com>
Cc: linux-fsdevel@vger.kernel.org,
	Linux Containers <containers@lists.linux-foundation.org>,
	linux-kernel@vger.kernel.org,
	"Serge E. Hallyn" <serge@hallyn.com>,
	Steve French <sfrench@samba.org>
Subject: Re: [PATCH RFC 04/12] userns: Convert cifs to use kuid/kgid where appropriate
Date: Tue, 20 Nov 2012 09:22:42 -0800	[thread overview]
Message-ID: <87lidwqjdp.fsf@xmission.com> (raw)
In-Reply-To: <CAH2r5mt91Av7w6GQUPNu2A9EGRNbPGGAhMO=EobOMi5Cn8gh5g@mail.gmail.com> (Steve French's message of "Tue, 20 Nov 2012 10:56:40 -0600")

Steve French <smfrench@gmail.com> writes:

> Do you have a pointer to the background on kuid/kgid

You might try this lwn article
https://lwn.net/Articles/491310/

In a nutshell each user namespace has it's own view of uid_t and gid_t
values.  Those values are mapped into kernel internal kuid_t and kgid_t
values.  Then user space interfaces convert from kuid_t and kgid_t when
read from userspace.

The initial user namespace as a 1-1 identity mapping between kuid_t and
uid_t values.

kuid_t and kgid_t are not assignment compatible with uid_t and gid_t so
that if the conversions are left out a compile error results.

My strategy is to push kuid_t and kgid_t values as deeply into the
kernel data structures as possible so that there is a high propbability
that when we get it wrong a compile error will happen.

Eric

  reply	other threads:[~2012-11-20 17:22 UTC|newest]

Thread overview: 72+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-20 12:42 [PATCH RFC 0/12] Final userns conversions Eric W. Biederman
2012-11-20 12:42 ` Eric W. Biederman
2012-11-20 12:42 ` Eric W. Biederman
     [not found] ` <87pq38wimv.fsf-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
2012-11-20 12:43   ` [PATCH RFC 01/12] userns: Support 9p interacting with multiple user namespaces Eric W. Biederman
2012-11-20 12:43     ` Eric W. Biederman
2012-11-20 12:43     ` Eric W. Biederman
     [not found]     ` <1353415420-5457-1-git-send-email-ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
2012-11-20 12:43       ` [PATCH RFC 02/12] userns: Convert afs to use kuid/kgid where appropriate Eric W. Biederman
2012-11-20 12:43         ` Eric W. Biederman
2012-11-20 12:43         ` Eric W. Biederman
2012-11-20 12:43       ` [PATCH RFC 03/12] userns: Convert ceph " Eric W. Biederman
2012-11-20 12:43         ` Eric W. Biederman
2012-11-20 12:43         ` Eric W. Biederman
     [not found]         ` <1353415420-5457-3-git-send-email-ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
2012-11-20 16:48           ` Sage Weil
2012-11-20 16:48         ` Sage Weil
     [not found]           ` <alpine.DEB.2.00.1211200847110.7369-vIokxiIdD2AQNTJnQDzGJqxOck334EZe@public.gmane.org>
2012-11-20 17:15             ` Eric W. Biederman
2012-11-20 17:15               ` Eric W. Biederman
2012-11-20 12:43       ` [PATCH RFC 04/12] userns: Convert cifs " Eric W. Biederman
2012-11-20 12:43         ` Eric W. Biederman
2012-11-20 12:43         ` Eric W. Biederman
     [not found]         ` <1353415420-5457-4-git-send-email-ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
2012-11-20 16:56           ` Steve French
2012-11-20 17:22             ` Eric W. Biederman [this message]
     [not found]             ` <CAH2r5mt91Av7w6GQUPNu2A9EGRNbPGGAhMO=EobOMi5Cn8gh5g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-11-20 17:22               ` Eric W. Biederman
2012-11-25 12:47           ` Jeff Layton
2012-11-25 12:47             ` Jeff Layton
2012-11-20 12:43       ` [PATCH RFC 05/12] userns: Convert coda's " Eric W. Biederman
2012-11-20 12:43         ` Eric W. Biederman
2012-11-20 12:43         ` Eric W. Biederman
2012-11-20 12:43       ` [PATCH RFC 06/12] userns: Convert gfs2 " Eric W. Biederman
2012-11-20 12:43         ` Eric W. Biederman
2012-11-20 12:43         ` Eric W. Biederman
2012-11-22  9:47         ` [Cluster-devel] " Steven Whitehouse
2012-11-22  9:47           ` Steven Whitehouse
2012-11-22  9:47           ` Steven Whitehouse
2012-11-20 12:43       ` [PATCH RFC 07/12] userns: Convert ncpfs to use kuid and kgid " Eric W. Biederman
2012-11-20 12:43         ` Eric W. Biederman
2012-11-20 12:43         ` Eric W. Biederman
2012-11-20 12:43       ` [PATCH RFC 08/12] userns: Convert nfs and nfsd to use kuid/kgid " Eric W. Biederman
2012-11-20 12:43         ` Eric W. Biederman
2012-11-20 12:43         ` Eric W. Biederman
2012-11-20 12:43       ` [PATCH RFC 09/12] userns: Convert ocfs2 to use kuid and kgid " Eric W. Biederman
2012-11-20 12:43         ` Eric W. Biederman
2012-11-20 12:43         ` Eric W. Biederman
2012-11-21 19:51         ` Joel Becker
2013-02-13 17:12           ` Eric W. Biederman
2013-02-13 17:12             ` Eric W. Biederman
     [not found]         ` <1353415420-5457-9-git-send-email-ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
2012-11-21 19:51           ` Joel Becker
2012-11-21 19:59           ` Joel Becker
2012-11-21 19:59             ` Joel Becker
2013-02-13 17:41             ` Eric W. Biederman
2012-11-20 12:43       ` [PATCH RFC 10/12] userns: Convert xfs to use kuid/kgid/kprojid " Eric W. Biederman
2012-11-20 12:43         ` Eric W. Biederman
2012-11-20 12:43         ` Eric W. Biederman
2012-11-20 23:55         ` Dave Chinner
2012-11-21 19:52           ` Joel Becker
2012-11-21 19:52           ` Joel Becker
2013-02-13 18:13             ` Eric W. Biederman
2013-02-13 18:13               ` Eric W. Biederman
     [not found]               ` <87obfoxetf.fsf-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
2013-02-14  2:19                 ` Dave Chinner
2013-02-14  2:19                   ` Dave Chinner
2013-02-18  1:25                   ` Eric W. Biederman
2013-02-18  1:25                     ` Eric W. Biederman
     [not found]                     ` <87621qpg4o.fsf-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
2013-02-19  3:30                       ` Dave Chinner
2013-02-19  3:30                         ` Dave Chinner
     [not found]         ` <1353415420-5457-10-git-send-email-ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
2012-11-20 23:55           ` Dave Chinner
2012-11-20 12:43       ` [PATCH RFC 11/12] userns: Now that everything has been converted remove the unnecessary infrastructure Eric W. Biederman
2012-11-20 12:43         ` Eric W. Biederman
2012-11-20 12:43         ` Eric W. Biederman
2012-11-20 12:43       ` [PATCH RFC 12/12] userns: Remove the EXPERMINTAL kconfig tag Eric W. Biederman
2012-11-20 12:43         ` Eric W. Biederman
2012-11-20 12:43         ` Eric W. Biederman
2012-11-21  0:09   ` [PATCH RFC 0/12] Final userns conversions Dave Chinner
2012-11-21  0:09     ` Dave Chinner

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=87lidwqjdp.fsf@xmission.com \
    --to=ebiederm@xmission.com \
    --cc=containers@lists.linux-foundation.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=serge@hallyn.com \
    --cc=sfrench@samba.org \
    --cc=smfrench@gmail.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 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.