linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* CLONE_NEWUSER documentation
@ 2007-08-05  9:35 Michael Kerrisk
  2007-08-05 12:36 ` Eric W. Biederman
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Kerrisk @ 2007-08-05  9:35 UTC (permalink / raw)
  To: Serge E. Hallyn
  Cc: lkml, Kirill Korotaev, Eric W. Biederman, Herbert Poetzl,
	Andrey Savochkin, Adrian Bunk, Cedric Le Goater, Chris Wright,
	Stephen Smalley, James Morris, Andrew Morgan

Hello Serge,

In 2.6.23-rc, your patch to add support for CLONE_NEWUSER is included.  Is
there there some for-userland-programmers documentation of this flag
somewhere?  Would you be able to send some documentation to me (ideally as
a patch to the clone.2 man page, but otherwise some plain text will do).

If this flag is also supported for unshare(), then could you please send me
a patch/text for that too?

Cheers,

Michael

-- 
Michael Kerrisk
maintainer of Linux man pages Sections 2, 3, 4, 5, and 7

Want to help with man page maintenance?  Grab the latest tarball at
http://www.kernel.org/pub/linux/docs/manpages/
read the HOWTOHELP file and grep the source files for 'FIXME'.

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

* Re: CLONE_NEWUSER documentation
  2007-08-05  9:35 CLONE_NEWUSER documentation Michael Kerrisk
@ 2007-08-05 12:36 ` Eric W. Biederman
  2007-08-06  6:36   ` Michael Kerrisk
  2007-08-06 13:09   ` Serge E. Hallyn
  0 siblings, 2 replies; 5+ messages in thread
From: Eric W. Biederman @ 2007-08-05 12:36 UTC (permalink / raw)
  To: Michael Kerrisk
  Cc: Serge E. Hallyn, lkml, Kirill Korotaev, Eric W. Biederman,
	Herbert Poetzl, Andrey Savochkin, Adrian Bunk, Cedric Le Goater,
	Chris Wright, Stephen Smalley, James Morris, Andrew Morgan

Michael Kerrisk <mtk-manpages@gmx.net> writes:

> Hello Serge,
>
> In 2.6.23-rc, your patch to add support for CLONE_NEWUSER is included.  Is
> there there some for-userland-programmers documentation of this flag
> somewhere?  Would you be able to send some documentation to me (ideally as
> a patch to the clone.2 man page, but otherwise some plain text will do).
>
> If this flag is also supported for unshare(), then could you please send me
> a patch/text for that too?

Currently this namespace is a work in progress marked with CONFIG_EXPERIMENTAL
because it is very much still experimental and under development.

There may be other omissions but the one I am most aware of is that
the in kernel user and group equality comparisons have not become been
transformed from the form uid1 == uid2 to user_namespace1 == user_namespace2 &&
uid1 == uid2.

Until that happens that user namespace remains incomplete and not very
useful.  So the advice to users for now that unless they want to help
finish this up do not use.

Eric

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

* Re: CLONE_NEWUSER documentation
  2007-08-05 12:36 ` Eric W. Biederman
@ 2007-08-06  6:36   ` Michael Kerrisk
  2007-08-06  6:48     ` Eric W. Biederman
  2007-08-06 13:09   ` Serge E. Hallyn
  1 sibling, 1 reply; 5+ messages in thread
From: Michael Kerrisk @ 2007-08-06  6:36 UTC (permalink / raw)
  To: Eric W. Biederman
  Cc: Serge E. Hallyn, lkml, Kirill Korotaev, Herbert Poetzl,
	Andrey Savochkin, Adrian Bunk, Cedric Le Goater, Chris Wright,
	Stephen Smalley, James Morris, Andrew Morgan

Eric W. Biederman wrote:
> Michael Kerrisk <mtk-manpages@gmx.net> writes:
> 
>> Hello Serge,
>>
>> In 2.6.23-rc, your patch to add support for CLONE_NEWUSER is included.  Is
>> there there some for-userland-programmers documentation of this flag
>> somewhere?  Would you be able to send some documentation to me (ideally as
>> a patch to the clone.2 man page, but otherwise some plain text will do).
>>
>> If this flag is also supported for unshare(), then could you please send me
>> a patch/text for that too?
> 
> Currently this namespace is a work in progress marked with CONFIG_EXPERIMENTAL
> because it is very much still experimental and under development.
> 
> There may be other omissions but the one I am most aware of is that
> the in kernel user and group equality comparisons have not become been
> transformed from the form uid1 == uid2 to user_namespace1 == user_namespace2 &&
> uid1 == uid2.
> 
> Until that happens that user namespace remains incomplete and not very
> useful.  So the advice to users for now that unless they want to help
> finish this up do not use.

And again: is CLONE_NEWUSER (to be)implemented for unshare()?

Thanks Eric.  I'm still not so clear though.  What is a user name space
intended to be, and how is it to be used?

Also, when will the implementation be complete?  If not by the 2.6.23 final
release, it seems unfortunate to expose this flag to userspace, since
further down the road, it will be difficult for userspace to tell whether
the kernel below it really supports the flag or not.  Or am I missing
something?

Cheers,

Michael

-- 
Michael Kerrisk
maintainer of Linux man pages Sections 2, 3, 4, 5, and 7

Want to help with man page maintenance?  Grab the latest tarball at
http://www.kernel.org/pub/linux/docs/manpages/
read the HOWTOHELP file and grep the source files for 'FIXME'.

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

* Re: CLONE_NEWUSER documentation
  2007-08-06  6:36   ` Michael Kerrisk
@ 2007-08-06  6:48     ` Eric W. Biederman
  0 siblings, 0 replies; 5+ messages in thread
From: Eric W. Biederman @ 2007-08-06  6:48 UTC (permalink / raw)
  To: Michael Kerrisk
  Cc: Serge E. Hallyn, lkml, Kirill Korotaev, Herbert Poetzl,
	Andrey Savochkin, Adrian Bunk, Cedric Le Goater, Chris Wright,
	Stephen Smalley, James Morris, Andrew Morgan

Michael Kerrisk <mtk-manpages@gmx.net> writes:

>
> And again: is CLONE_NEWUSER (to be)implemented for unshare()?

They all should be.  Only the pid namespace (not yet merged) looks
like a problem for unshare.

> Thanks Eric.  I'm still not so clear though.  What is a user name space
> intended to be, and how is it to be used?
>
> Also, when will the implementation be complete?  If not by the 2.6.23 final
> release, it seems unfortunate to expose this flag to userspace, since
> further down the road, it will be difficult for userspace to tell whether
> the kernel below it really supports the flag or not.  Or am I missing
> something?

Currently the code depends on CONFIG_USER_NS it is CONFIG_EXPERIMENTAL
and defaulting to N.

So no one should be shipping a production with it enabled, hopefully
that is enough, to avoid problems.  I think the current implementation
is usable for some small subset of usable.

The basic idea is so that you have different mappings between uid and
gid values (i.e. /etc/passwd stuff) and struct user in the kernel.
Allowing the kernel to know two users with the same uid are distinct.

When you combined all of the namespaces (and when the are finished)
you have what is effective a chroot jail that looks like it has
the kernel all to itself despite other programs running.

Eric

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

* Re: CLONE_NEWUSER documentation
  2007-08-05 12:36 ` Eric W. Biederman
  2007-08-06  6:36   ` Michael Kerrisk
@ 2007-08-06 13:09   ` Serge E. Hallyn
  1 sibling, 0 replies; 5+ messages in thread
From: Serge E. Hallyn @ 2007-08-06 13:09 UTC (permalink / raw)
  To: Eric W. Biederman
  Cc: Michael Kerrisk, Serge E. Hallyn, lkml, Kirill Korotaev,
	Herbert Poetzl, Andrey Savochkin, Adrian Bunk, Cedric Le Goater,
	Chris Wright, Stephen Smalley, James Morris, Andrew Morgan

Quoting Eric W. Biederman (ebiederm@xmission.com):
> Michael Kerrisk <mtk-manpages@gmx.net> writes:
> 
> > Hello Serge,
> >
> > In 2.6.23-rc, your patch to add support for CLONE_NEWUSER is included.  Is
> > there there some for-userland-programmers documentation of this flag
> > somewhere?  Would you be able to send some documentation to me (ideally as
> > a patch to the clone.2 man page, but otherwise some plain text will do).
> >
> > If this flag is also supported for unshare(), then could you please send me
> > a patch/text for that too?
> 
> Currently this namespace is a work in progress marked with CONFIG_EXPERIMENTAL
> because it is very much still experimental and under development.
> 
> There may be other omissions but the one I am most aware of is that
> the in kernel user and group equality comparisons have not become been
> transformed from the form uid1 == uid2 to user_namespace1 == user_namespace2 &&
> uid1 == uid2.

I think the two main omissions are that one, and the fact that there is
no concept of a capability mask or per-namespace/cross-namespace
capabilities.  What is implemented is separate accounting for the same
uid in different namespaces.

Until the shortcomings are addressed, depending on one's use case, one
may want to use selinux to control access across user namespaces.

> Until that happens that user namespace remains incomplete and not very
> useful.  So the advice to users for now that unless they want to help
> finish this up do not use.

thanks,
-serge

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

end of thread, other threads:[~2007-08-06 13:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-05  9:35 CLONE_NEWUSER documentation Michael Kerrisk
2007-08-05 12:36 ` Eric W. Biederman
2007-08-06  6:36   ` Michael Kerrisk
2007-08-06  6:48     ` Eric W. Biederman
2007-08-06 13:09   ` Serge E. Hallyn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).