lkml.org 
[lkml]   [2004]   [Sep]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] remember to check return value from __copy_to_user() in cdrom_read_cdda_old()
    On Tue, Sep 07, 2004 at 11:34:37AM +0200, Jens Axboe wrote:
    > On Tue, Sep 07 2004, Paul Mackerras wrote:
    > > Jens Axboe writes:
    > >
    > > > __copy_to_user is the unchecking version of copy_to_user.
    > >
    > > It doesn't range-check the address, but it does return non-zero
    > > (number of bytes not copied) if it encounters a fault writing to the
    > > user buffer.
    >
    > but it doesn't matter, if it returns non-zero then something happened
    > between the access_ok() and the actual copy because the user app did
    > something silly. so I don't care much really, I think the major point is
    > the kernel will cope.
    >
    > you could remove the access_ok() and change it to a copy_to_user()
    > instead, I don't care either way. it's the old and slow interface which
    > really never is used unless things have gone wrong anyways.

    access_ok() is far from being the only reason for error here. If area
    is unmapped, we shouldn't silently lose data without any indication of
    error.
    -
    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 14:05    [W:0.024 / U:29.752 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site