Re: strict copy_from_user checks issues?

From: H. Peter Anvin
Date: Fri Jan 08 2010 - 19:15:53 EST


On 01/08/2010 04:07 PM, Arnd Bergmann wrote:
>
> Also, the calling conventions require you to write slightly more when
> you want to pass down an error value, e.g.
>
> return copy_to_user(uptr, &data, sizeof(data)) ? -EFAULT : 0;
>
> instead of
>
> return put_user(data, uptr);
>
> The latter form requires a macro instead of a function for the user copy,
> but we now have that anyway because of the size check.
>

Well... we already have the latter form?

-hpa

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