Re: -EFAULT on invalid pointer

Chris Wedgwood (chris@cybernet.co.nz)
Tue, 20 Oct 1998 17:28:29 +1300


On Tue, Oct 20, 1998 at 06:17:26AM +0200, MOLNAR Ingo wrote:

> this makes no difference to the memory management application i
> outlined.

no, indeed it doesn't.

but whether the kernel returns EFAULT or not, might depend upon your
kernel version, which is the point I was making about not making too
many assumptions about the validity of passing possilby bogus
pointers and then checking for EFAULT.

In general, passing bogus pointers isn't something most applications
should do.

> 2.0 and 2.1 simply has a different granularity of detecting memory
> faults, but we have no information anyway where the fault occured,

in 2.1.x - we know, in the case of the example I quoted, that if the
file is over a certain size, where it occured, because the read will
be short.

-cw

-
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/