* [RESEND][PATCH] userns: use marco instead of magic number for max userns level
@ 2014-09-11 9:51 ` Chen Hanxiao
0 siblings, 0 replies; 8+ messages in thread
From: Chen Hanxiao @ 2014-09-11 9:51 UTC (permalink / raw)
To: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
Cc: Fabian Frederick, Serge Hallyn, Eric W. Biederman, Oleg Nesterov
Use marco instead of magic number
for max user namespace level.
Signed-off-by: Chen Hanxiao <chenhanxiao-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
---
kernel/user_namespace.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/kernel/user_namespace.c b/kernel/user_namespace.c
index aa312b0..5435489 100644
--- a/kernel/user_namespace.c
+++ b/kernel/user_namespace.c
@@ -47,6 +47,8 @@ static void set_cred_user_ns(struct cred *cred, struct user_namespace *user_ns)
cred->user_ns = user_ns;
}
+#define MAX_USER_NS_LEVEL 32
+
/*
* Create a new user namespace, deriving the creator from the user in the
* passed credentials, and replacing that user with the new root user for the
@@ -62,7 +64,7 @@ int create_user_ns(struct cred *new)
kgid_t group = new->egid;
int ret;
- if (parent_ns->level > 32)
+ if (parent_ns->level > MAX_USER_NS_LEVEL)
return -EUSERS;
/*
--
1.9.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [RESEND][PATCH] userns: use marco instead of magic number for max userns level
@ 2014-09-11 9:51 ` Chen Hanxiao
0 siblings, 0 replies; 8+ messages in thread
From: Chen Hanxiao @ 2014-09-11 9:51 UTC (permalink / raw)
To: containers, linux-kernel
Cc: Eric W. Biederman, Serge Hallyn, Oleg Nesterov, Fabian Frederick
Use marco instead of magic number
for max user namespace level.
Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
---
kernel/user_namespace.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/kernel/user_namespace.c b/kernel/user_namespace.c
index aa312b0..5435489 100644
--- a/kernel/user_namespace.c
+++ b/kernel/user_namespace.c
@@ -47,6 +47,8 @@ static void set_cred_user_ns(struct cred *cred, struct user_namespace *user_ns)
cred->user_ns = user_ns;
}
+#define MAX_USER_NS_LEVEL 32
+
/*
* Create a new user namespace, deriving the creator from the user in the
* passed credentials, and replacing that user with the new root user for the
@@ -62,7 +64,7 @@ int create_user_ns(struct cred *new)
kgid_t group = new->egid;
int ret;
- if (parent_ns->level > 32)
+ if (parent_ns->level > MAX_USER_NS_LEVEL)
return -EUSERS;
/*
--
1.9.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [RESEND][PATCH] userns: use marco instead of magic number for max userns level
2014-09-11 9:51 ` Chen Hanxiao
@ 2014-09-11 16:30 ` Serge Hallyn
-1 siblings, 0 replies; 8+ messages in thread
From: Serge Hallyn @ 2014-09-11 16:30 UTC (permalink / raw)
To: Chen Hanxiao
Cc: Fabian Frederick,
containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
Oleg Nesterov, linux-kernel-u79uwXL29TY76Z2rM5mHXA,
Eric W. Biederman
Quoting Chen Hanxiao (chenhanxiao-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org):
> Use marco instead of magic number
> for max user namespace level.
>
> Signed-off-by: Chen Hanxiao <chenhanxiao-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
Acked-by: Serge E. Hallyn <serge.hallyn-GeWIH/nMZzLQT0dZR+AlfA@public.gmane.org>
> ---
> kernel/user_namespace.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/kernel/user_namespace.c b/kernel/user_namespace.c
> index aa312b0..5435489 100644
> --- a/kernel/user_namespace.c
> +++ b/kernel/user_namespace.c
> @@ -47,6 +47,8 @@ static void set_cred_user_ns(struct cred *cred, struct user_namespace *user_ns)
> cred->user_ns = user_ns;
> }
>
> +#define MAX_USER_NS_LEVEL 32
> +
> /*
> * Create a new user namespace, deriving the creator from the user in the
> * passed credentials, and replacing that user with the new root user for the
> @@ -62,7 +64,7 @@ int create_user_ns(struct cred *new)
> kgid_t group = new->egid;
> int ret;
>
> - if (parent_ns->level > 32)
> + if (parent_ns->level > MAX_USER_NS_LEVEL)
> return -EUSERS;
>
> /*
> --
> 1.9.0
>
> _______________________________________________
> Containers mailing list
> Containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
> https://lists.linuxfoundation.org/mailman/listinfo/containers
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [RESEND][PATCH] userns: use marco instead of magic number for max userns level
@ 2014-09-11 16:30 ` Serge Hallyn
0 siblings, 0 replies; 8+ messages in thread
From: Serge Hallyn @ 2014-09-11 16:30 UTC (permalink / raw)
To: Chen Hanxiao
Cc: containers, linux-kernel, Fabian Frederick, Eric W. Biederman,
Oleg Nesterov
Quoting Chen Hanxiao (chenhanxiao@cn.fujitsu.com):
> Use marco instead of magic number
> for max user namespace level.
>
> Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
> ---
> kernel/user_namespace.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/kernel/user_namespace.c b/kernel/user_namespace.c
> index aa312b0..5435489 100644
> --- a/kernel/user_namespace.c
> +++ b/kernel/user_namespace.c
> @@ -47,6 +47,8 @@ static void set_cred_user_ns(struct cred *cred, struct user_namespace *user_ns)
> cred->user_ns = user_ns;
> }
>
> +#define MAX_USER_NS_LEVEL 32
> +
> /*
> * Create a new user namespace, deriving the creator from the user in the
> * passed credentials, and replacing that user with the new root user for the
> @@ -62,7 +64,7 @@ int create_user_ns(struct cred *new)
> kgid_t group = new->egid;
> int ret;
>
> - if (parent_ns->level > 32)
> + if (parent_ns->level > MAX_USER_NS_LEVEL)
> return -EUSERS;
>
> /*
> --
> 1.9.0
>
> _______________________________________________
> Containers mailing list
> Containers@lists.linux-foundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/containers
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [RESEND][PATCH] userns: use marco instead of magic number for max userns level
2014-09-11 9:51 ` Chen Hanxiao
@ 2014-09-11 18:17 ` Aristeu Rozanski
-1 siblings, 0 replies; 8+ messages in thread
From: Aristeu Rozanski @ 2014-09-11 18:17 UTC (permalink / raw)
To: Chen Hanxiao
Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
Serge Hallyn, Oleg Nesterov, linux-kernel-u79uwXL29TY76Z2rM5mHXA,
Fabian Frederick, Eric W. Biederman
On Thu, Sep 11, 2014 at 05:51:31PM +0800, Chen Hanxiao wrote:
> Use marco instead of magic number
> for max user namespace level.
patch is ok, but you might want to do s/marco/macro/
--
Aristeu
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [RESEND][PATCH] userns: use marco instead of magic number for max userns level
@ 2014-09-11 18:17 ` Aristeu Rozanski
0 siblings, 0 replies; 8+ messages in thread
From: Aristeu Rozanski @ 2014-09-11 18:17 UTC (permalink / raw)
To: Chen Hanxiao
Cc: containers, linux-kernel, Fabian Frederick, Serge Hallyn,
Eric W. Biederman, Oleg Nesterov
On Thu, Sep 11, 2014 at 05:51:31PM +0800, Chen Hanxiao wrote:
> Use marco instead of magic number
> for max user namespace level.
patch is ok, but you might want to do s/marco/macro/
--
Aristeu
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: [RESEND][PATCH] userns: use marco instead of magic number for max userns level
2014-09-11 18:17 ` Aristeu Rozanski
@ 2014-09-12 1:54 ` Chen, Hanxiao
-1 siblings, 0 replies; 8+ messages in thread
From: Chen, Hanxiao @ 2014-09-12 1:54 UTC (permalink / raw)
To: Aristeu Rozanski
Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
Serge Hallyn, Oleg Nesterov, linux-kernel-u79uwXL29TY76Z2rM5mHXA,
Fabian Frederick, Eric W. Biederman
> -----Original Message-----
> From: Aristeu Rozanski [mailto:aris-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org]
>
> On Thu, Sep 11, 2014 at 05:51:31PM +0800, Chen Hanxiao wrote:
> > Use marco instead of magic number
> > for max user namespace level.
>
> patch is ok, but you might want to do s/marco/macro/
>
Sorry for that typo..
Do I need to resend it?
Thanks,
- Chen
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: [RESEND][PATCH] userns: use marco instead of magic number for max userns level
@ 2014-09-12 1:54 ` Chen, Hanxiao
0 siblings, 0 replies; 8+ messages in thread
From: Chen, Hanxiao @ 2014-09-12 1:54 UTC (permalink / raw)
To: Aristeu Rozanski
Cc: containers, linux-kernel, Fabian Frederick, Serge Hallyn,
Eric W. Biederman, Oleg Nesterov
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="gb2312", Size: 503 bytes --]
> -----Original Message-----
> From: Aristeu Rozanski [mailto:aris@redhat.com]
>
> On Thu, Sep 11, 2014 at 05:51:31PM +0800, Chen Hanxiao wrote:
> > Use marco instead of magic number
> > for max user namespace level.
>
> patch is ok, but you might want to do s/marco/macro/
>
Sorry for that typo..
Do I need to resend it?
Thanks,
- Chen
ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2014-09-12 1:54 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-11 9:51 [RESEND][PATCH] userns: use marco instead of magic number for max userns level Chen Hanxiao
2014-09-11 9:51 ` Chen Hanxiao
[not found] ` <1410429091-7234-1-git-send-email-chenhanxiao-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2014-09-11 16:30 ` Serge Hallyn
2014-09-11 16:30 ` Serge Hallyn
2014-09-11 18:17 ` Aristeu Rozanski
2014-09-11 18:17 ` Aristeu Rozanski
[not found] ` <20140911181741.GU22290-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-09-12 1:54 ` Chen, Hanxiao
2014-09-12 1:54 ` Chen, Hanxiao
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.