lkml.org 
[lkml]   [2011]   [Mar]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v3 2/4] exec: introduce struct conditional_ptr
Date
> No functional changes, preparation.
>
> Introduce struct conditional_ptr, change do_execve() paths to use it
> instead of "char __user * const __user *argv".
>
> This makes the argv/envp arguments opaque, we are ready to handle the
> compat case which needs argv pointing to compat_uptr_t.
>
> Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
> Signed-off-by: Oleg Nesterov <oleg@redhat.com>
> ---
>
> fs/exec.c | 42 ++++++++++++++++++++++++++++++------------
> 1 file changed, 30 insertions(+), 12 deletions(-)
>
> --- 38/fs/exec.c~2_typedef_for_argv 2011-03-02 15:40:22.000000000 +0100
> +++ 38/fs/exec.c 2011-03-02 15:40:44.000000000 +0100
> @@ -395,12 +395,15 @@ err:
> return err;
> }
>
> -static const char __user *
> -get_arg_ptr(const char __user * const __user *argv, int argc)
> +struct conditional_ptr {

I _personally_ don't like "conditional". Its name is based on code logic.
It's unclear what mean "conditional". From data strucuture view, It is
"opaque userland pointer".

but again, it is my personal preference.

Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>





\
 
 \ /
  Last update: 2011-03-03 04:11    [W:0.210 / U:5.552 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site