[lkml]   [1998]   [Oct]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: bug in write(2) system call.
    Chris Wedgwood <> said:


    > Basically... if you pass bogus addresses and pointers to the kernel,
    > depending on what OS and version you are running, you might get an
    > EFAULT and you might not.

    This is (somewhat) OK.

    > There is no wrong or right way - and no simple fix other than DON'T

    You should try not to, but the kernel _can't_ just believe in your
    guarantees. For all it knows, you might be Kubys ;-)

    > In linux 2.0.x and more traditional kernels, the verify_area checks
    > will determine the address of bogus before reading or writing any
    > data, under 2.1.x and I think also NetBSD, if the start of the memory
    > range you spcific is legitimate, some data will be read and written.

    In the 2.1.xx kernels this mechanism was replaced by a nifty, no-overhead
    use of the MM to do the same thing: No checks, but if an illegal access is
    attempted, the kernel gets an exception. Look at your nearest Documentation
    Dr. Horst H. von Brand
    Departamento de Informatica Fono: +56 32 654431
    Universidad Tecnica Federico Santa Maria +56 32 654239
    Casilla 110-V, Valparaiso, Chile Fax: +56 32 797513

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    Please read the FAQ at

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