lkml.org 
[lkml]   [2000]   [Jan]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Suspicious code in i2c-dev.c
On Sun, Jan 23 2000, Frodo Looijaard wrote:
> > 2. copy_to_user may fault, and if this is the case, the user will
> > never know (the user will not see the EFAULT error code returned).
>
> > There are more instances of point 2, including some with copy_from_user.
>
> Hmm. Can you elaborate on that? What exactly will happen when a
> copy_{to,from}_user faults? And what does a fault in this instance
> mean (cache miss?).

It means that copy_[to|from]_user tried to access memory that didn't
belong in the current process address space. In this case they
will return non-0 and -EFAULT should be returned to the process.

--
* Jens Axboe <axboe@suse.de>
* Linux CD-ROM Maintainer
* http://www.kernel.dk

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

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