[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.
    Alan Cox wrote:
    > > In such case, linus, here is your "reasonable" example. For PPro, it
    > > is faster to copy out-of-order, and if we wanted to use that for
    > > copy_to_user, you'd have your example.
    > I think there is a misunderstanding here.
    > Nothing in the standards says that
    > write(pipe_fd, halfmappedbuffer, 2*PAGE_SIZE)
    > 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

    write might be the easy case. But what about read?
    Is a failing read allowed to change the userspace

    Kasper Dupont -- der bruger for meget tid på usenet.
    For sending spam use
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 13:26    [W:0.024 / U:0.084 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site