lkml.org 
[lkml]   [2002]   [May]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: AUDIT: copy_from_user is a deathtrap.
Date
From
> > must return PAGE_SIZE on an error. What it seems to say is that it if an error
> > is reported then no data got written down the actual pipe itself. Putting
> > 4K into the pipe then reporting Esomething is not allowed. Copying 4K into
> > a buffer faulting and erroring with Efoo then throwing away the buffer is
> > allowed
>
> So... Is copy_to_user allowed to copy more than it actually reported?
> Because if so, it might return 0/-EFAULT as well ;-).

The specification defines the API not the implementation. It only matters if
the user can't tell. 0/-EFAULT would be wrong as that is EOF. 0/0 or
-1/Efoo.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:26    [W:0.127 / U:0.540 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site