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

From: Linus Torvalds
Date: Sat Mar 05 2011 - 15:53:34 EST


Ok, everything looks fine to me.

Except looking at this, I don't think this part:

On Sat, Mar 5, 2011 at 12:31 PM, Oleg Nesterov <oleg@xxxxxxxxxx> wrote:
>
>  struct user_arg_ptr {
> -       const char __user *const __user *native;
> +#ifdef CONFIG_COMPAT
> +       bool is_compat;
> +#endif
> +       union {
> +               const char __user *const __user *native;
> +               compat_uptr_t __user *compat;
> +       } ptr;
>  };

will necessarily even compile on an architecture that doesn't have any
'compat' support.

Do we even define 'compat_uptr_t' for that case? I don't think so.

So I suspect you need two of those annoying #ifdef's. Or we need to
have some way to guarantee that 'compat_uptr_t' exists.

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