All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH][cr][nit]: eclone() - Remove extra __user and add a comment
@ 2010-05-04  2:04 Sukadev Bhattiprolu
       [not found] ` <20100504020439.GA5098-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Sukadev Bhattiprolu @ 2010-05-04  2:04 UTC (permalink / raw)
  To: Oren Laadan
  Cc: Containers, christofferdall-77OGu6e99YhyO3AAkE1OcX9LOBIZ5rWg,
	linux-lFZ/pmaqli7XmaaqVzeoHQ


Sorry, I thought I had sent this minor patch out earlier, but I just
realized I had not.
---

From: Sukadev Bhattiprolu <sukadev-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
Date: Mon, 3 May 2010 11:38:16 -0700
Subject: [PATCH 1/1] eclone(): Remove extra __user and add a comment

As pointed out by Russel King, '__user' does not make sense on an integer
type. Remove it. Also add a comment on why we want 'stack_size' to be 0
on x86 and s390.

Signed-off-by: Sukadev Bhattiprolu <sukadev-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
---
 arch/s390/kernel/process.c |    5 ++++-
 arch/x86/kernel/process.c  |    5 ++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c
index efc7e8a..b00ffad 100644
--- a/arch/s390/kernel/process.c
+++ b/arch/s390/kernel/process.c
@@ -276,7 +276,7 @@ SYSCALL_DEFINE4(eclone, unsigned int, flags_low, struct clone_args __user *,
 	int __user *parent_tid_ptr;
 	int __user *child_tid_ptr;
 	unsigned long flags;
-	unsigned long __user child_stack;
+	unsigned long child_stack;
 	unsigned long stack_size;
 
 	rc = fetch_clone_args_from_user(uca, args_size, &kca);
@@ -288,6 +288,9 @@ SYSCALL_DEFINE4(eclone, unsigned int, flags_low, struct clone_args __user *,
 	child_tid_ptr =  (int __user *) kca.child_tid_ptr;
 
 	stack_size = (unsigned long) kca.child_stack_size;
+	/*
+	 * s390 does not need/use the stack_size. Ensure it is unused.
+	 */
 	if (stack_size)
 		return -EINVAL;
 
diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c
index 5abad20..8b1699a 100644
--- a/arch/x86/kernel/process.c
+++ b/arch/x86/kernel/process.c
@@ -268,7 +268,7 @@ sys_eclone(unsigned flags_low, struct clone_args __user *uca,
 	unsigned long flags;
 	int __user *parent_tidp;
 	int __user *child_tidp;
-	unsigned long __user stack;
+	unsigned long stack;
 	unsigned long stack_size;
 
 	rc = fetch_clone_args_from_user(uca, args_size, &kca);
@@ -286,6 +286,9 @@ sys_eclone(unsigned flags_low, struct clone_args __user *uca,
 	parent_tidp = (int *)(unsigned long)kca.parent_tid_ptr;
 	child_tidp = (int *)(unsigned long)kca.child_tid_ptr;
 
+	/*
+	 * x86 does not need/use the stack_size. Ensure it is unused.
+	 */
 	stack_size = (unsigned long)kca.child_stack_size;
 	if (stack_size)
 		return -EINVAL;

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

* Re: [PATCH][cr][nit]: eclone() - Remove extra __user and add a comment
       [not found] ` <20100504020439.GA5098-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
@ 2010-06-15  2:55   ` Oren Laadan
       [not found]     ` <4C16EBB1.7000806-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Oren Laadan @ 2010-06-15  2:55 UTC (permalink / raw)
  To: Sukadev Bhattiprolu
  Cc: serue-r/Jw6+rmf7HQT0dZR+AlfA, Containers,
	christofferdall-77OGu6e99YhyO3AAkE1OcX9LOBIZ5rWg,
	linux-lFZ/pmaqli7XmaaqVzeoHQ


Applied in ckpt-v22-dev (will be pushed soon)

Thanks,

Oren.

On 05/03/2010 10:04 PM, Sukadev Bhattiprolu wrote:
> 
> Sorry, I thought I had sent this minor patch out earlier, but I just
> realized I had not.
> ---
> 
> From: Sukadev Bhattiprolu <sukadev-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
> Date: Mon, 3 May 2010 11:38:16 -0700
> Subject: [PATCH 1/1] eclone(): Remove extra __user and add a comment
> 
> As pointed out by Russel King, '__user' does not make sense on an integer
> type. Remove it. Also add a comment on why we want 'stack_size' to be 0
> on x86 and s390.
> 
> Signed-off-by: Sukadev Bhattiprolu <sukadev-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
> ---
>  arch/s390/kernel/process.c |    5 ++++-
>  arch/x86/kernel/process.c  |    5 ++++-
>  2 files changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c
> index efc7e8a..b00ffad 100644
> --- a/arch/s390/kernel/process.c
> +++ b/arch/s390/kernel/process.c
> @@ -276,7 +276,7 @@ SYSCALL_DEFINE4(eclone, unsigned int, flags_low, struct clone_args __user *,
>  	int __user *parent_tid_ptr;
>  	int __user *child_tid_ptr;
>  	unsigned long flags;
> -	unsigned long __user child_stack;
> +	unsigned long child_stack;
>  	unsigned long stack_size;
>  
>  	rc = fetch_clone_args_from_user(uca, args_size, &kca);
> @@ -288,6 +288,9 @@ SYSCALL_DEFINE4(eclone, unsigned int, flags_low, struct clone_args __user *,
>  	child_tid_ptr =  (int __user *) kca.child_tid_ptr;
>  
>  	stack_size = (unsigned long) kca.child_stack_size;
> +	/*
> +	 * s390 does not need/use the stack_size. Ensure it is unused.
> +	 */
>  	if (stack_size)
>  		return -EINVAL;
>  
> diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c
> index 5abad20..8b1699a 100644
> --- a/arch/x86/kernel/process.c
> +++ b/arch/x86/kernel/process.c
> @@ -268,7 +268,7 @@ sys_eclone(unsigned flags_low, struct clone_args __user *uca,
>  	unsigned long flags;
>  	int __user *parent_tidp;
>  	int __user *child_tidp;
> -	unsigned long __user stack;
> +	unsigned long stack;
>  	unsigned long stack_size;
>  
>  	rc = fetch_clone_args_from_user(uca, args_size, &kca);
> @@ -286,6 +286,9 @@ sys_eclone(unsigned flags_low, struct clone_args __user *uca,
>  	parent_tidp = (int *)(unsigned long)kca.parent_tid_ptr;
>  	child_tidp = (int *)(unsigned long)kca.child_tid_ptr;
>  
> +	/*
> +	 * x86 does not need/use the stack_size. Ensure it is unused.
> +	 */
>  	stack_size = (unsigned long)kca.child_stack_size;
>  	if (stack_size)
>  		return -EINVAL;
> 
> 

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

* Re: [PATCH][cr][nit]: eclone() - Remove extra __user and add a comment
       [not found]     ` <4C16EBB1.7000806-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
@ 2010-06-15 22:43       ` Sukadev Bhattiprolu
       [not found]         ` <20100615224353.GA4985-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Sukadev Bhattiprolu @ 2010-06-15 22:43 UTC (permalink / raw)
  To: Oren Laadan
  Cc: serue-r/Jw6+rmf7HQT0dZR+AlfA, Containers,
	christofferdall-77OGu6e99YhyO3AAkE1OcX9LOBIZ5rWg,
	linux-lFZ/pmaqli7XmaaqVzeoHQ

Oh, well, Albert pointed out we could make all architectures specify
stack as base and offset so applications won't need #ifdefs. I am
planning on resending the eclone patchset with that change. So
the following change is not needed now.

Sukadev

Oren Laadan [orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org] wrote:
| 
| Applied in ckpt-v22-dev (will be pushed soon)
| 
| Thanks,
| 
| Oren.
| 
| On 05/03/2010 10:04 PM, Sukadev Bhattiprolu wrote:
| > 
| > Sorry, I thought I had sent this minor patch out earlier, but I just
| > realized I had not.
| > ---
| > 
| > From: Sukadev Bhattiprolu <sukadev-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
| > Date: Mon, 3 May 2010 11:38:16 -0700
| > Subject: [PATCH 1/1] eclone(): Remove extra __user and add a comment
| > 
| > As pointed out by Russel King, '__user' does not make sense on an integer
| > type. Remove it. Also add a comment on why we want 'stack_size' to be 0
| > on x86 and s390.
| > 
| > Signed-off-by: Sukadev Bhattiprolu <sukadev-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
| > ---
| >  arch/s390/kernel/process.c |    5 ++++-
| >  arch/x86/kernel/process.c  |    5 ++++-
| >  2 files changed, 8 insertions(+), 2 deletions(-)
| > 
| > diff --git a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c
| > index efc7e8a..b00ffad 100644
| > --- a/arch/s390/kernel/process.c
| > +++ b/arch/s390/kernel/process.c
| > @@ -276,7 +276,7 @@ SYSCALL_DEFINE4(eclone, unsigned int, flags_low, struct clone_args __user *,
| >  	int __user *parent_tid_ptr;
| >  	int __user *child_tid_ptr;
| >  	unsigned long flags;
| > -	unsigned long __user child_stack;
| > +	unsigned long child_stack;
| >  	unsigned long stack_size;
| >  
| >  	rc = fetch_clone_args_from_user(uca, args_size, &kca);
| > @@ -288,6 +288,9 @@ SYSCALL_DEFINE4(eclone, unsigned int, flags_low, struct clone_args __user *,
| >  	child_tid_ptr =  (int __user *) kca.child_tid_ptr;
| >  
| >  	stack_size = (unsigned long) kca.child_stack_size;
| > +	/*
| > +	 * s390 does not need/use the stack_size. Ensure it is unused.
| > +	 */
| >  	if (stack_size)
| >  		return -EINVAL;
| >  
| > diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c
| > index 5abad20..8b1699a 100644
| > --- a/arch/x86/kernel/process.c
| > +++ b/arch/x86/kernel/process.c
| > @@ -268,7 +268,7 @@ sys_eclone(unsigned flags_low, struct clone_args __user *uca,
| >  	unsigned long flags;
| >  	int __user *parent_tidp;
| >  	int __user *child_tidp;
| > -	unsigned long __user stack;
| > +	unsigned long stack;
| >  	unsigned long stack_size;
| >  
| >  	rc = fetch_clone_args_from_user(uca, args_size, &kca);
| > @@ -286,6 +286,9 @@ sys_eclone(unsigned flags_low, struct clone_args __user *uca,
| >  	parent_tidp = (int *)(unsigned long)kca.parent_tid_ptr;
| >  	child_tidp = (int *)(unsigned long)kca.child_tid_ptr;
| >  
| > +	/*
| > +	 * x86 does not need/use the stack_size. Ensure it is unused.
| > +	 */
| >  	stack_size = (unsigned long)kca.child_stack_size;
| >  	if (stack_size)
| >  		return -EINVAL;
| > 
| > 

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

* Re: [PATCH][cr][nit]: eclone() - Remove extra __user and add a comment
       [not found]         ` <20100615224353.GA4985-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
@ 2010-06-16 19:36           ` Oren Laadan
  0 siblings, 0 replies; 4+ messages in thread
From: Oren Laadan @ 2010-06-16 19:36 UTC (permalink / raw)
  To: Sukadev Bhattiprolu
  Cc: serue-r/Jw6+rmf7HQT0dZR+AlfA, Containers,
	christofferdall-77OGu6e99YhyO3AAkE1OcX9LOBIZ5rWg,
	linux-lFZ/pmaqli7XmaaqVzeoHQ


Since I haven't pushed this yet, do you want me to un-pull
this patch then ?

Sukadev Bhattiprolu wrote:
> Oh, well, Albert pointed out we could make all architectures specify
> stack as base and offset so applications won't need #ifdefs. I am
> planning on resending the eclone patchset with that change. So
> the following change is not needed now.
> 
> Sukadev
> 
> Oren Laadan [orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org] wrote:
> | 
> | Applied in ckpt-v22-dev (will be pushed soon)
> | 
> | Thanks,
> | 
> | Oren.
> | 
> | On 05/03/2010 10:04 PM, Sukadev Bhattiprolu wrote:
> | > 
> | > Sorry, I thought I had sent this minor patch out earlier, but I just
> | > realized I had not.
> | > ---
> | > 
> | > From: Sukadev Bhattiprolu <sukadev-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
> | > Date: Mon, 3 May 2010 11:38:16 -0700
> | > Subject: [PATCH 1/1] eclone(): Remove extra __user and add a comment
> | > 
> | > As pointed out by Russel King, '__user' does not make sense on an integer
> | > type. Remove it. Also add a comment on why we want 'stack_size' to be 0
> | > on x86 and s390.
> | > 
> | > Signed-off-by: Sukadev Bhattiprolu <sukadev-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
> | > ---
> | >  arch/s390/kernel/process.c |    5 ++++-
> | >  arch/x86/kernel/process.c  |    5 ++++-
> | >  2 files changed, 8 insertions(+), 2 deletions(-)
> | > 
> | > diff --git a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c
> | > index efc7e8a..b00ffad 100644
> | > --- a/arch/s390/kernel/process.c
> | > +++ b/arch/s390/kernel/process.c
> | > @@ -276,7 +276,7 @@ SYSCALL_DEFINE4(eclone, unsigned int, flags_low, struct clone_args __user *,
> | >  	int __user *parent_tid_ptr;
> | >  	int __user *child_tid_ptr;
> | >  	unsigned long flags;
> | > -	unsigned long __user child_stack;
> | > +	unsigned long child_stack;
> | >  	unsigned long stack_size;
> | >  
> | >  	rc = fetch_clone_args_from_user(uca, args_size, &kca);
> | > @@ -288,6 +288,9 @@ SYSCALL_DEFINE4(eclone, unsigned int, flags_low, struct clone_args __user *,
> | >  	child_tid_ptr =  (int __user *) kca.child_tid_ptr;
> | >  
> | >  	stack_size = (unsigned long) kca.child_stack_size;
> | > +	/*
> | > +	 * s390 does not need/use the stack_size. Ensure it is unused.
> | > +	 */
> | >  	if (stack_size)
> | >  		return -EINVAL;
> | >  
> | > diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c
> | > index 5abad20..8b1699a 100644
> | > --- a/arch/x86/kernel/process.c
> | > +++ b/arch/x86/kernel/process.c
> | > @@ -268,7 +268,7 @@ sys_eclone(unsigned flags_low, struct clone_args __user *uca,
> | >  	unsigned long flags;
> | >  	int __user *parent_tidp;
> | >  	int __user *child_tidp;
> | > -	unsigned long __user stack;
> | > +	unsigned long stack;
> | >  	unsigned long stack_size;
> | >  
> | >  	rc = fetch_clone_args_from_user(uca, args_size, &kca);
> | > @@ -286,6 +286,9 @@ sys_eclone(unsigned flags_low, struct clone_args __user *uca,
> | >  	parent_tidp = (int *)(unsigned long)kca.parent_tid_ptr;
> | >  	child_tidp = (int *)(unsigned long)kca.child_tid_ptr;
> | >  
> | > +	/*
> | > +	 * x86 does not need/use the stack_size. Ensure it is unused.
> | > +	 */
> | >  	stack_size = (unsigned long)kca.child_stack_size;
> | >  	if (stack_size)
> | >  		return -EINVAL;
> | > 
> | > 
> 

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

end of thread, other threads:[~2010-06-16 19:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-04  2:04 [PATCH][cr][nit]: eclone() - Remove extra __user and add a comment Sukadev Bhattiprolu
     [not found] ` <20100504020439.GA5098-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2010-06-15  2:55   ` Oren Laadan
     [not found]     ` <4C16EBB1.7000806-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2010-06-15 22:43       ` Sukadev Bhattiprolu
     [not found]         ` <20100615224353.GA4985-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2010-06-16 19:36           ` Oren Laadan

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.