Re: [PATCH] Generic is_compat_task helper

From: Andrew Morton
Date: Fri Feb 17 2006 - 00:46:09 EST


Kyle McMartin <kyle@xxxxxxxxxxxxxxxx> wrote:
>
> Implement a generic is_compat_task function. It should only be used
> when absolutely necessary. For example, to clean up the per-architecture
> tests in drivers/input/evdev.c.
>
> Prototype is such that the existing asm-x86_64 helper needs no change.
>
> Architecture maintainers must add an appropriate implementation to
> asm/compat.h, if needed.
>
> ...
>
> +static inline int __is_compat_task(struct task_struct *t)
> +{
> + return (personality(t->personality) == PER_LINUX32);
> +}
> +

What continues to bug me about this (in a high-level hand-wavy sort of way)
is that this is an attribute of the mm_struct, not of the task_struct.

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