The level of init_user_ns shoule be 1.
Signed-off-by: Rui Xiang <[email protected]>
---
kernel/user.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/kernel/user.c b/kernel/user.c
index 69b4c3d..32da187 100644
--- a/kernel/user.c
+++ b/kernel/user.c
@@ -48,6 +48,7 @@ struct user_namespace init_user_ns = {
},
},
.count = ATOMIC_INIT(3),
+ .level = 1,
.owner = GLOBAL_ROOT_UID,
.group = GLOBAL_ROOT_GID,
.proc_inum = PROC_USER_INIT_INO,
--
1.8.2.2
On Tue, Aug 13, 2013 at 10:04 PM, Rui Xiang <[email protected]> wrote:
> The level of init_user_ns shoule be 1.
What's wrong with zero?
--Andy
>
> Signed-off-by: Rui Xiang <[email protected]>
> ---
> kernel/user.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/kernel/user.c b/kernel/user.c
> index 69b4c3d..32da187 100644
> --- a/kernel/user.c
> +++ b/kernel/user.c
> @@ -48,6 +48,7 @@ struct user_namespace init_user_ns = {
> },
> },
> .count = ATOMIC_INIT(3),
> + .level = 1,
> .owner = GLOBAL_ROOT_UID,
> .group = GLOBAL_ROOT_GID,
> .proc_inum = PROC_USER_INIT_INO,
> --
> 1.8.2.2
>
--
Andy Lutomirski
AMA Capital Management, LLC
On 2013/8/14 13:06, Andy Lutomirski wrote:
> On Tue, Aug 13, 2013 at 10:04 PM, Rui Xiang <[email protected]> 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.
but the initialization of level should be necessary.
Thanks.
> --Andy
>
>>
>> Signed-off-by: Rui Xiang <[email protected]>
>> ---
>> kernel/user.c | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/kernel/user.c b/kernel/user.c
>> index 69b4c3d..32da187 100644
>> --- a/kernel/user.c
>> +++ b/kernel/user.c
>> @@ -48,6 +48,7 @@ struct user_namespace init_user_ns = {
>> },
>> },
>> .count = ATOMIC_INIT(3),
>> + .level = 1,
>> .owner = GLOBAL_ROOT_UID,
>> .group = GLOBAL_ROOT_GID,
>> .proc_inum = PROC_USER_INIT_INO,
>> --
>> 1.8.2.2
>>
>
>
>
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 <[email protected]> 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.
Oleg.
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 <[email protected]> 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.