public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
* Current state of CLONE_NEWUSER?
@ 2008-11-19 20:04 Michael Kerrisk
       [not found] ` <cfd18e0f0811191204r4ccaeaf4m4145e67f408543e0-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Michael Kerrisk @ 2008-11-19 20:04 UTC (permalink / raw)
  To: Serge Hallyn
  Cc: Subrata Modak, ebiederm-aS9lmoZGLiVWk0Htik3J/w, lkml,
	linux-man-u79uwXL29TY76Z2rM5mHXA, clg-NmTC/0ZBporQT0dZR+AlfA,
	herbert-dBHVzrDq9nF4Lj/PQRBjDg, dev-3ImXcnM4P+0

Hi Serge,

What is the current status of CLONE_NEWUSER?  I'm currently trying to
test this flag in preparation for documenting it in the clone(2) man
page, but am running into an ENOMEM error from the clone() call, which
seems to occur after a failure in kobject_init_and_add() in the
following call sequence:

clone_user_ns() --> alloc_uid() --> uids_user_create() -->
kobject_init_and_add()

Are there already some test programs somewhere?  Is there any
documentation already available for this flag?

Thanks,

Michael

-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
git://git.kernel.org/pub/scm/docs/man-pages/man-pages.git
man-pages online: http://www.kernel.org/doc/man-pages/online_pages.html
Found a bug? http://www.kernel.org/doc/man-pages/reporting_bugs.html
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Current state of CLONE_NEWUSER?
       [not found] ` <cfd18e0f0811191204r4ccaeaf4m4145e67f408543e0-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2008-11-20  1:41   ` Eric W. Biederman
       [not found]     ` <m1vdujdvi6.fsf-B27657KtZYmhTnVgQlOflh2eb7JE58TQ@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Eric W. Biederman @ 2008-11-20  1:41 UTC (permalink / raw)
  To: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w
  Cc: Serge Hallyn, Subrata Modak, lkml,
	linux-man-u79uwXL29TY76Z2rM5mHXA, clg-NmTC/0ZBporQT0dZR+AlfA,
	herbert-dBHVzrDq9nF4Lj/PQRBjDg, dev-3ImXcnM4P+0

"Michael Kerrisk" <mtk.manpages-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> writes:

> Hi Serge,
>
> What is the current status of CLONE_NEWUSER?  I'm currently trying to
> test this flag in preparation for documenting it in the clone(2) man
> page, but am running into an ENOMEM error from the clone() call, which
> seems to occur after a failure in kobject_init_and_add() in the
> following call sequence:
>
> clone_user_ns() --> alloc_uid() --> uids_user_create() -->
> kobject_init_and_add()
>
> Are there already some test programs somewhere?  Is there any
> documentation already available for this flag?

This code is definitely still under development.

When complete it should be able to create a new uid namespace,
as an unprivileged user.  Creating a new process with uid == gid == 0.
Have a full set of caps.  And have permission to do nothing on the system
except read world readable files and write world writable files.

Eric
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Current state of CLONE_NEWUSER?
       [not found]     ` <m1vdujdvi6.fsf-B27657KtZYmhTnVgQlOflh2eb7JE58TQ@public.gmane.org>
@ 2008-11-20 11:49       ` Michael Kerrisk
       [not found]         ` <cfd18e0f0811200349q788c2767i5164dc1c47e67925-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Michael Kerrisk @ 2008-11-20 11:49 UTC (permalink / raw)
  To: Eric W. Biederman
  Cc: Serge Hallyn, Subrata Modak, lkml,
	linux-man-u79uwXL29TY76Z2rM5mHXA, clg-NmTC/0ZBporQT0dZR+AlfA,
	herbert-dBHVzrDq9nF4Lj/PQRBjDg, dev-3ImXcnM4P+0

Hi Eric,

On Wed, Nov 19, 2008 at 8:41 PM, Eric W. Biederman
<ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org> wrote:
> "Michael Kerrisk" <mtk.manpages-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> writes:
>
>> Hi Serge,
>>
>> What is the current status of CLONE_NEWUSER?  I'm currently trying to
>> test this flag in preparation for documenting it in the clone(2) man
>> page, but am running into an ENOMEM error from the clone() call, which
>> seems to occur after a failure in kobject_init_and_add() in the
>> following call sequence:
>>
>> clone_user_ns() --> alloc_uid() --> uids_user_create() -->
>> kobject_init_and_add()
>>
>> Are there already some test programs somewhere?  Is there any
>> documentation already available for this flag?
>
> This code is definitely still under development.
>
> When complete it should be able to create a new uid namespace,
> as an unprivileged user.  Creating a new process with uid == gid == 0.
> Have a full set of caps.  And have permission to do nothing on the system
> except read world readable files and write world writable files.

Thanks for the info,

So the error I described is expected?

Cheers,

Michael

-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
git://git.kernel.org/pub/scm/docs/man-pages/man-pages.git
man-pages online: http://www.kernel.org/doc/man-pages/online_pages.html
Found a bug? http://www.kernel.org/doc/man-pages/reporting_bugs.html
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Current state of CLONE_NEWUSER?
       [not found]         ` <cfd18e0f0811200349q788c2767i5164dc1c47e67925-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2008-11-20 17:33           ` Eric W. Biederman
       [not found]             ` <m1zlju9u9z.fsf-B27657KtZYmhTnVgQlOflh2eb7JE58TQ@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Eric W. Biederman @ 2008-11-20 17:33 UTC (permalink / raw)
  To: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w
  Cc: Serge Hallyn, Subrata Modak, lkml,
	linux-man-u79uwXL29TY76Z2rM5mHXA, clg-NmTC/0ZBporQT0dZR+AlfA,
	herbert-dBHVzrDq9nF4Lj/PQRBjDg, dev-3ImXcnM4P+0

"Michael Kerrisk" <mtk.manpages-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> writes:

> Hi Eric,
>
> On Wed, Nov 19, 2008 at 8:41 PM, Eric W. Biederman
> <ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org> wrote:
>> "Michael Kerrisk" <mtk.manpages-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> writes:
>>
>>> Hi Serge,
>>>
>>> What is the current status of CLONE_NEWUSER?  I'm currently trying to
>>> test this flag in preparation for documenting it in the clone(2) man
>>> page, but am running into an ENOMEM error from the clone() call, which
>>> seems to occur after a failure in kobject_init_and_add() in the
>>> following call sequence:
>>>
>>> clone_user_ns() --> alloc_uid() --> uids_user_create() -->
>>> kobject_init_and_add()
>>>
>>> Are there already some test programs somewhere?  Is there any
>>> documentation already available for this flag?
>>
>> This code is definitely still under development.
>>
>> When complete it should be able to create a new uid namespace,
>> as an unprivileged user.  Creating a new process with uid == gid == 0.
>> Have a full set of caps.  And have permission to do nothing on the system
>> except read world readable files and write world writable files.
>
> Thanks for the info,
>
> So the error I described is expected?

I don't think so.  Serge?

Eric
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Current state of CLONE_NEWUSER?
       [not found]             ` <m1zlju9u9z.fsf-B27657KtZYmhTnVgQlOflh2eb7JE58TQ@public.gmane.org>
@ 2008-11-21 15:07               ` Serge E. Hallyn
       [not found]                 ` <20081121150710.GA10705-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Serge E. Hallyn @ 2008-11-21 15:07 UTC (permalink / raw)
  To: Eric W. Biederman
  Cc: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w, Subrata Modak, lkml,
	linux-man-u79uwXL29TY76Z2rM5mHXA, clg-NmTC/0ZBporQT0dZR+AlfA,
	herbert-dBHVzrDq9nF4Lj/PQRBjDg, dev-3ImXcnM4P+0

Quoting Eric W. Biederman (ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org):
> "Michael Kerrisk" <mtk.manpages-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> writes:
> 
> > Hi Eric,
> >
> > On Wed, Nov 19, 2008 at 8:41 PM, Eric W. Biederman
> > <ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org> wrote:
> >> "Michael Kerrisk" <mtk.manpages-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> writes:
> >>
> >>> Hi Serge,
> >>>
> >>> What is the current status of CLONE_NEWUSER?  I'm currently trying to
> >>> test this flag in preparation for documenting it in the clone(2) man
> >>> page, but am running into an ENOMEM error from the clone() call, which
> >>> seems to occur after a failure in kobject_init_and_add() in the
> >>> following call sequence:
> >>>
> >>> clone_user_ns() --> alloc_uid() --> uids_user_create() -->
> >>> kobject_init_and_add()
> >>>
> >>> Are there already some test programs somewhere?  Is there any
> >>> documentation already available for this flag?
> >>
> >> This code is definitely still under development.
> >>
> >> When complete it should be able to create a new uid namespace,
> >> as an unprivileged user.  Creating a new process with uid == gid == 0.
> >> Have a full set of caps.  And have permission to do nothing on the system
> >> except read world readable files and write world writable files.
> >
> > Thanks for the info,
> >
> > So the error I described is expected?
> 
> I don't think so.  Serge?

I suspect you have the fair scheduler compiled in
(CONFIG_FAIR_GROUP_SCHED).  So when you create a new user namespace, it
tries to create a new /sys/kernel/uids/0 (or thereabouts) directory
which sysfs refuses.

The fix for this was rolled in as the last patch in the rejected large
network namespace/sysfs rework.  So we'll need another fix.  I suspect
following the same path as we did for making network namespaces work is
the best path for now.  (This being my last day of a week-long vacation
I won't be sending a patch today :)

-serge
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Current state of CLONE_NEWUSER?
       [not found]                 ` <20081121150710.GA10705-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
@ 2008-11-25 15:54                   ` Michael Kerrisk
  0 siblings, 0 replies; 6+ messages in thread
From: Michael Kerrisk @ 2008-11-25 15:54 UTC (permalink / raw)
  To: Serge E. Hallyn
  Cc: Eric W. Biederman, Subrata Modak, lkml,
	linux-man-u79uwXL29TY76Z2rM5mHXA, clg-NmTC/0ZBporQT0dZR+AlfA,
	herbert-dBHVzrDq9nF4Lj/PQRBjDg, dev-3ImXcnM4P+0

Hi Serge,

On Fri, Nov 21, 2008 at 10:07 AM, Serge E. Hallyn <serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org> wrote:
> Quoting Eric W. Biederman (ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org):
>> "Michael Kerrisk" <mtk.manpages-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> writes:
>>
>> > Hi Eric,
>> >
>> > On Wed, Nov 19, 2008 at 8:41 PM, Eric W. Biederman
>> > <ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org> wrote:
>> >> "Michael Kerrisk" <mtk.manpages-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> writes:
>> >>
>> >>> Hi Serge,
>> >>>
>> >>> What is the current status of CLONE_NEWUSER?  I'm currently trying to
>> >>> test this flag in preparation for documenting it in the clone(2) man
>> >>> page, but am running into an ENOMEM error from the clone() call, which
>> >>> seems to occur after a failure in kobject_init_and_add() in the
>> >>> following call sequence:
>> >>>
>> >>> clone_user_ns() --> alloc_uid() --> uids_user_create() -->
>> >>> kobject_init_and_add()
>> >>>
>> >>> Are there already some test programs somewhere?  Is there any
>> >>> documentation already available for this flag?
>> >>
>> >> This code is definitely still under development.
>> >>
>> >> When complete it should be able to create a new uid namespace,
>> >> as an unprivileged user.  Creating a new process with uid == gid == 0.
>> >> Have a full set of caps.  And have permission to do nothing on the system
>> >> except read world readable files and write world writable files.
>> >
>> > Thanks for the info,
>> >
>> > So the error I described is expected?
>>
>> I don't think so.  Serge?
>
> I suspect you have the fair scheduler compiled in
> (CONFIG_FAIR_GROUP_SCHED).

True.

> So when you create a new user namespace, it
> tries to create a new /sys/kernel/uids/0 (or thereabouts) directory
> which sysfs refuses.

Okay.

> The fix for this was rolled in as the last patch in the rejected large
> network namespace/sysfs rework.  So we'll need another fix.  I suspect
> following the same path as we did for making network namespaces work is
> the best path for now.  (This being my last day of a week-long vacation
> I won't be sending a patch today :)

Yep, I saw your patch, thanks.

Cheers,

Michael

-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
git://git.kernel.org/pub/scm/docs/man-pages/man-pages.git
man-pages online: http://www.kernel.org/doc/man-pages/online_pages.html
Found a bug? http://www.kernel.org/doc/man-pages/reporting_bugs.html
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-11-25 15:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-19 20:04 Current state of CLONE_NEWUSER? Michael Kerrisk
     [not found] ` <cfd18e0f0811191204r4ccaeaf4m4145e67f408543e0-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-11-20  1:41   ` Eric W. Biederman
     [not found]     ` <m1vdujdvi6.fsf-B27657KtZYmhTnVgQlOflh2eb7JE58TQ@public.gmane.org>
2008-11-20 11:49       ` Michael Kerrisk
     [not found]         ` <cfd18e0f0811200349q788c2767i5164dc1c47e67925-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-11-20 17:33           ` Eric W. Biederman
     [not found]             ` <m1zlju9u9z.fsf-B27657KtZYmhTnVgQlOflh2eb7JE58TQ@public.gmane.org>
2008-11-21 15:07               ` Serge E. Hallyn
     [not found]                 ` <20081121150710.GA10705-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2008-11-25 15:54                   ` Michael Kerrisk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox