[lkml]   [2002]   [May]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: AUDIT: copy_from_user is a deathtrap.

    On Mon, 20 May 2002, Rusty Russell wrote:
    > If read always returns the amount read (ignoring any copy_to_user
    > errors), then you can repeat it by seeking backwards[1] and redoing the
    > read.


    > So copy_to_user can simply deliver a SIGSEGV and return "success", and
    > everything will work (except sockets, pipes, etc).

    I don't mind the SIGSEGV, but I refuse to make a stupid change that has
    absolutely _zero_ reason for it.

    The current "copy_to/from_user()" is perfectly fine. It's very simple to

    if (copy_from_user(xxx))
    return -EFAULT;

    and it is not AT ALL simpler to do

    ret = copy_from_user(xxx);
    if (ret)
    return ret;

    which is apparently your suggestion.

    So a lot of people didn't get it? Arnaldo seems to have fixed a lot of
    them already, and maybe you who apparently care can add _documentation_,
    but the fact is that there is no reason to make a less powerful interface.


    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.022 / U:45.772 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site