Re: [PATCH v3 1/4] exec: introduce get_arg_ptr() helper

From: KOSAKI Motohiro
Date: Wed Mar 02 2011 - 22:01:25 EST


Hi

Sorry for the long delay. now I'm getting stuck sucky paper work. ;-)
In short, I don't find any issue in this patch. So, I'll test it at
this weekend if linus haven't merged it yet.

A few small and cosmetic comments are below. but anyway I don't want
keep this up in the air.
Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@xxxxxxxxxxxxxx>



> Introduce get_arg_ptr() helper, convert count() and copy_strings()
> to use it.
>
> No functional changes, preparation. This helper is trivial, it just
> reads the pointer from argv/envp user-space array.
>
> Signed-off-by: Oleg Nesterov <oleg@xxxxxxxxxx>
> ---
>
> fs/exec.c | 36 +++++++++++++++++++++++++-----------
> 1 file changed, 25 insertions(+), 11 deletions(-)
>
> --- 38/fs/exec.c~1_get_arg_ptr 2011-03-02 15:15:27.000000000 +0100
> +++ 38/fs/exec.c 2011-03-02 15:16:44.000000000 +0100
> @@ -395,6 +395,17 @@ err:
> return err;
> }
>
> +static const char __user *
> +get_arg_ptr(const char __user * const __user *argv, int argc)
> +{

[argc, argv] is natural order to me than [argv, argc].
and "get_" prefix are usually used for reference count incrementing
function in linux. so, i _personally_ prefer to call "user_arg_ptr".



--
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/