Re: Address translation

From: Jeff Dike (jdike@karaya.com)
Date: Tue Nov 21 2000 - 12:20:48 EST


ruben@trymedia.com said:
> Does anybody know a function or method in order to translate an user
> space pointer into a valid pointer in kernel mode?

> I'd like to avoid copying data (such as the 'copy_to_user' and
> 'copy_from_user' functions do) because it slows down my system.

The reason that everyone else uses copy_{to,from}_user is that there is no way
to guarantee that the userspace pointer is valid. That memory may have been
swapped out. The copy macros are prepared to fault the memory in. The rest
of the kernel is not.

                                Jeff

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



This archive was generated by hypermail 2b29 : Thu Nov 23 2000 - 21:00:21 EST