Re: [PATCH v3 3/4] exec: unify do_execve/compat_do_execve code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> @@ -1510,11 +1528,27 @@ int do_execve(const char *filename,
>  	const char __user *const __user *__envp,
>  	struct pt_regs *regs)
>  {
> -	struct conditional_ptr argv = { .native = __argv };
> -	struct conditional_ptr envp = { .native = __envp };
> +	struct conditional_ptr argv = { .ptr.native = __argv };
> +	struct conditional_ptr envp = { .ptr.native = __envp };
>  	return do_execve_common(filename, argv, envp, regs);
>  }
>  
> +#ifdef CONFIG_COMPAT
> +int compat_do_execve(char *filename,
> +	compat_uptr_t __user *__argv,
> +	compat_uptr_t __user *__envp,
> +	struct pt_regs *regs)
> +{
> +	struct conditional_ptr argv = {
> +		.is_compat = true, .ptr.compat = __argv,
> +	};

Please don't mind to compress a line.

	struct conditional_ptr argv = {
		.is_compat = true,
		.ptr.compat = __argv,
	};

is more good readability.


Other parts looks very good to me.
	Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@xxxxxxxxxxxxxx>



--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxxx  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]