lkml.org 
[lkml]   [2010]   [Jan]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: strict copy_from_user checks issues?
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



\
 
 \ /
  Last update: 2010-01-09 01:19    [W:1.989 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site