[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 3 Mar 2011 12:13:08 +0900 (JST)
From: KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
To: Oleg Nesterov <oleg@...hat.com>
Cc: kosaki.motohiro@...fujitsu.com,
Linus Torvalds <torvalds@...ux-foundation.org>,
Andrew Morton <akpm@...ux-foundation.org>,
LKML <linux-kernel@...r.kernel.org>,
linux-mm <linux-mm@...ck.org>, pageexec@...email.hu,
Solar Designer <solar@...nwall.com>,
Eugene Teo <eteo@...hat.com>,
Brad Spengler <spender@...ecurity.net>,
Roland McGrath <roland@...hat.com>,
Milton Miller <miltonm@....com>
Subject: Re: [PATCH v3 3/4] exec: unify do_execve/compat_do_execve code
> @@ -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@...fujitsu.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists