mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: ebiederm@xmission.com (Eric W. Biederman)
To: "Michael Kerrisk \(man-pages\)" <mtk.manpages@gmail.com>
Cc: lkml <linux-kernel@vger.kernel.org>,
	"linux-man\@vger.kernel.org" <linux-man@vger.kernel.org>,
	containers@lists.linux-foundation.org,
	Andy Lutomirski <luto@amacapital.net>,
	richard.weinberger@gmail.com,
	"Serge E. Hallyn" <serge@hallyn.com>
Subject: Re: For review: user_namespace(7) man page
Date: Tue, 09 Sep 2014 11:51:49 -0400	[thread overview]
Message-ID: <87oauookq2.fsf@x220.int.ebiederm.org> (raw)
In-Reply-To: <540F07CD.3080708@gmail.com> (Michael Kerrisk's message of "Tue, 09 Sep 2014 06:59:41 -0700")

"Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com> writes:

> On 08/30/2014 02:53 PM, Eric W. Biederman wrote:
>> "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com> writes:
> [...]
>
>
>>>        The initial user namespace has no parent namespace, but, for con‐
>>>        sistency, the kernel provides dummy user  and  group  ID  mapping
>>>        files  for  this namespace.  Looking at the uid_map file (gid_map
>>>        is the same) from a shell in the initial namespace shows:
>>>
>>>            $ cat /proc/$$/uid_map
>>>                     0          0 4294967295
>>>
>>>        This mapping tells us that the range starting at  user  ID  0  in
>>>        this namespace maps to a range starting at 0 in the (nonexistent)
>>>        parent namespace, and the length of  the  range  is  the  largest
>>>        32-bit unsigned integer.
>> 
>> Which deliberately leaves 4294967295 32bit (-1) unmapped.  (uid_t)-1 is
>> used in several interfaces (like setreuid) as a way to specify no uid
>> leaving it unmapped and unusuable guarantees that there will be no
>> confusion when using those kernel methods.
>
> So, I worked that piece into the text to give:
>
>        This  mapping  tells us that the range starting at user ID 0 in
>        this namespace maps to a range starting at 0 in  the  (nonexis‐
>        tent)  parent  namespace,  and  the  length of the range is the
>        largest 32-bit unsigned  integer.   (This  deliberately  leaves
>        4294967295  (the  32-bit  signed  -1  value) unmapped.  This is
>        deliberate: (uid_t) -1 is used  in  several  interfaces  (e.g.,
>        setreuid(2))  as  a  way  to  specify  "no  user  ID".  Leaving
>        setreuid(2)) unmapped and unusuable guarantees that there  will
         ^^^^ (uid_t) -1 (not setreuid(2)
>        be no confusion when using these interfaces.
>
> Okay?

Other than the typo fix above this looks good.

Eric

  reply	other threads:[~2014-09-09 15:52 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-20 23:36 Michael Kerrisk (man-pages)
2014-08-22 21:12 ` Serge E. Hallyn
2014-09-01 16:58   ` Michael Kerrisk (man-pages)
2014-08-30 21:53 ` Eric W. Biederman
2014-09-01 17:31   ` Michael Kerrisk (man-pages)
2014-09-02  1:05     ` Eric W. Biederman
2014-09-09 14:00       ` Michael Kerrisk (man-pages)
2014-09-09 16:16         ` Eric W. Biederman
2014-09-11 14:40           ` Michael Kerrisk (man-pages)
2014-09-09 13:59   ` Michael Kerrisk (man-pages)
2014-09-09 15:49     ` Eric W. Biederman
2014-09-11 14:40       ` Michael Kerrisk (man-pages)
2014-09-09 13:59   ` Michael Kerrisk (man-pages)
2014-09-09 15:51     ` Eric W. Biederman [this message]
2014-09-11 14:40       ` Michael Kerrisk (man-pages)
2014-09-01 20:57 ` Andy Lutomirski
2014-09-09 14:00   ` Michael Kerrisk (man-pages)
2014-09-09 16:05     ` Eric W. Biederman
2014-09-09 19:26       ` Andy Lutomirski
2014-09-09 19:39         ` Andy Lutomirski
2014-09-11 14:47         ` Michael Kerrisk (man-pages)
2014-09-11 15:15           ` Andy Lutomirski
2014-09-14  2:58             ` Michael Kerrisk (man-pages)
2014-09-11 14:46       ` Michael Kerrisk (man-pages)
2014-09-11 15:14         ` Andy Lutomirski
2014-09-14  2:42           ` Michael Kerrisk (man-pages)

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=87oauookq2.fsf@x220.int.ebiederm.org \
    --to=ebiederm@xmission.com \
    --cc=containers@lists.linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-man@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=mtk.manpages@gmail.com \
    --cc=richard.weinberger@gmail.com \
    --cc=serge@hallyn.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

Powered by JetHome