OpenVZ Forum


Home » Mailing lists » Devel » unshare() pid ns
unshare() pid ns [message #19827] Thu, 30 August 2007 05:29 Go to next message
Sukadev Bhattiprolu is currently offline  Sukadev Bhattiprolu
Messages: 413
Registered: August 2006
Senior Member
Pavel,

unshare() of pid ns seems to fail with -EINVAL in 2.6.23-rc3-mm1.
I thought we supported it in the earlier patchsets.  I guess
I missed that in the review of recent patchsets.

Did we remove/disable it on purpose ? I am not particular that we
support it though. Just want to make sure.

Suka
_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
Re: unshare() pid ns [message #19836 is a reply to message #19827] Thu, 30 August 2007 14:19 Go to previous messageGo to next message
Sukadev Bhattiprolu is currently offline  Sukadev Bhattiprolu
Messages: 413
Registered: August 2006
Senior Member
Pavel Emelianov [xemul@openvz.org] wrote:
| sukadev@us.ibm.com wrote:
| >Pavel,
| >
| >unshare() of pid ns seems to fail with -EINVAL in 2.6.23-rc3-mm1.
| >I thought we supported it in the earlier patchsets.  I guess
| >I missed that in the review of recent patchsets.
| 
| I disabled unsharing of pid namespaces because it's almost
| impossible. Look - you have to reattach all the pids to the
| task with saving its ids as seen in previous namespaces.

Agree. Eric pointed that out early on.
| 
| >Did we remove/disable it on purpose ? I am not particular that we
| >support it though. Just want to make sure.
| >
| >Suka
| >
_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
Re: unshare() pid ns [message #19837 is a reply to message #19827] Thu, 30 August 2007 13:34 Go to previous messageGo to next message
serue is currently offline  serue
Messages: 750
Registered: February 2006
Senior Member
Quoting Pavel Emelyanov (xemul@openvz.org):
> sukadev@us.ibm.com wrote:
>> Pavel,
>> unshare() of pid ns seems to fail with -EINVAL in 2.6.23-rc3-mm1.
>> I thought we supported it in the earlier patchsets.  I guess
>> I missed that in the review of recent patchsets.
>
> I disabled unsharing of pid namespaces because it's almost
> impossible. Look - you have to reattach all the pids to the
> task with saving its ids as seen in previous namespaces.

We agree, but thought you for some perverse reason preferred unshare to
clone for pidns :)

Thanks for clarifying.

-serge
_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
Re: unshare() pid ns [message #19839 is a reply to message #19827] Thu, 30 August 2007 14:35 Go to previous messageGo to next message
serue is currently offline  serue
Messages: 750
Registered: February 2006
Senior Member
Quoting Pavel Emelyanov (xemul@openvz.org):
> Serge E. Hallyn wrote:
> > Quoting Pavel Emelyanov (xemul@openvz.org):
> >> sukadev@us.ibm.com wrote:
> >>> Pavel,
> >>> unshare() of pid ns seems to fail with -EINVAL in 2.6.23-rc3-mm1.
> >>> I thought we supported it in the earlier patchsets.  I guess
> >>> I missed that in the review of recent patchsets.
> >> I disabled unsharing of pid namespaces because it's almost
> >> impossible. Look - you have to reattach all the pids to the
> >> task with saving its ids as seen in previous namespaces.
> > 
> > We agree, but thought you for some perverse reason preferred unshare to
> > clone for pidns :)
> 
> I did that in my first version of patches, but then realized
> that such problem (the need in reattaching pids) makes the
> unsharing ugly.
> 
> BTW, unsharing of a pid namespace is a valid operation, so I
> think I will enable it in the nearest future. I have some
> thought on how to make such a reattach ;)

Alrighty  :)

Of course it's not just the kernel ugliness, but also the userspace
ugliness, for instance the rumored (I haven't looked to confirm) caching
of pids by glibc.

But in the end if we can achieve symmetry between all the CLONE_NEW*
flags all the better.

-serge
_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
Re: unshare() pid ns [message #19845 is a reply to message #19827] Thu, 30 August 2007 08:10 Go to previous messageGo to next message
Pavel Emelianov is currently offline  Pavel Emelianov
Messages: 1149
Registered: September 2006
Senior Member
sukadev@us.ibm.com wrote:
> Pavel,
> 
> unshare() of pid ns seems to fail with -EINVAL in 2.6.23-rc3-mm1.
> I thought we supported it in the earlier patchsets.  I guess
> I missed that in the review of recent patchsets.

I disabled unsharing of pid namespaces because it's almost
impossible. Look - you have to reattach all the pids to the
task with saving its ids as seen in previous namespaces.

> Did we remove/disable it on purpose ? I am not particular that we
> support it though. Just want to make sure.
> 
> Suka
> 

_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
Re: unshare() pid ns [message #19853 is a reply to message #19837] Thu, 30 August 2007 14:11 Go to previous messageGo to next message
Pavel Emelianov is currently offline  Pavel Emelianov
Messages: 1149
Registered: September 2006
Senior Member
Serge E. Hallyn wrote:
> Quoting Pavel Emelyanov (xemul@openvz.org):
>> sukadev@us.ibm.com wrote:
>>> Pavel,
>>> unshare() of pid ns seems to fail with -EINVAL in 2.6.23-rc3-mm1.
>>> I thought we supported it in the earlier patchsets.  I guess
>>> I missed that in the review of recent patchsets.
>> I disabled unsharing of pid namespaces because it's almost
>> impossible. Look - you have to reattach all the pids to the
>> task with saving its ids as seen in previous namespaces.
> 
> We agree, but thought you for some perverse reason preferred unshare to
> clone for pidns :)

I did that in my first version of patches, but then realized
that such problem (the need in reattaching pids) makes the
unsharing ugly.

BTW, unsharing of a pid namespace is a valid operation, so I
think I will enable it in the nearest future. I have some
thought on how to make such a reattach ;)

> Thanks for clarifying.
> 
> -serge
> 

_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
Re: unshare() pid ns [message #19854 is a reply to message #19853] Thu, 30 August 2007 16:34 Go to previous message
Cedric Le Goater is currently offline  Cedric Le Goater
Messages: 443
Registered: February 2006
Senior Member
Hello Pavel ! 

Pavel Emelyanov wrote:
> Serge E. Hallyn wrote:
>> Quoting Pavel Emelyanov (xemul@openvz.org):
>>> sukadev@us.ibm.com wrote:
>>>> Pavel,
>>>> unshare() of pid ns seems to fail with -EINVAL in 2.6.23-rc3-mm1.
>>>> I thought we supported it in the earlier patchsets.  I guess
>>>> I missed that in the review of recent patchsets.
>>> I disabled unsharing of pid namespaces because it's almost
>>> impossible. Look - you have to reattach all the pids to the
>>> task with saving its ids as seen in previous namespaces.
>> We agree, but thought you for some perverse reason preferred unshare to
>> clone for pidns :)
> 
> I did that in my first version of patches, but then realized
> that such problem (the need in reattaching pids) makes the
> unsharing ugly.
> 
> BTW, unsharing of a pid namespace is a valid operation, so I
> think I will enable it in the nearest future. I have some
> thought on how to make such a reattach ;)

that would be also very useful to 'enter' such a namespace.

BTW, did you take a look at the sys_hijack() serge sent ? 

Thanks,

C.

_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
Previous Topic: Re: [-mm PATCH] Memory controller improve user interface
Next Topic: user namespaces config option
Goto Forum:
  


Current Time: Tue Jun 25 05:04:49 GMT 2024

Total time taken to generate the page: 0.02736 seconds