Re: [PATCH] userns: initialize the depth of user_namespace chain
From: Rui Xiang
Date: Wed Aug 14 2013 - 21:51:47 EST
On 2013/8/15 2:43, Oleg Nesterov wrote:
> On 08/14, Rui Xiang wrote:
>>
>> On 2013/8/14 13:06, Andy Lutomirski wrote:
>>> On Tue, Aug 13, 2013 at 10:04 PM, Rui Xiang <rui.xiang@xxxxxxxxxx> wrote:
>>>> The level of init_user_ns shoule be 1.
>>>
>>> What's wrong with zero?
>>>
>>
>> No problem. It is just consistent with commit 8742f229b63, IMHO.
>
> Well, I am fine either way,
>
>> but the initialization of level should be necessary.
>
> but it is not necessary. This is just an "arbitrary" limit for now,
> 32 non-root namespaces. Perhaps we should count init_user_ns too.
>
> Hmm. but I just realized that "> 32" in create_user_ns() should be
> ">= 32" in this case.
>
Yes. If we need to count init_user_ns, this filed should be set to 1 in
init_user_ns, and "> 32" in create_user_ns() can limit 32 non-root
namespaces. And that depends on your design. :)
Thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/