Re: copy_to_user in modules ?

Jens Axboe (axboe@image.dk)
Sat, 16 Oct 1999 00:35:35 +0200


On Fri, Oct 15 1999, Kesava Narasimhan wrote:
> Hi,
> I believe that we are advised to use copy_to_user() for converting to user
> space. But since this is not exported, are we supposed to export it(in
> ksyms.c), rebuild the kernel and then use it ? Suppose I want to write device
> drivers, the probability is very high that I will have it as a module and the
> probability is even higher that I'll have to use functions like
> copy_to_user/copy_from_user or the obsolete versions memcpy_tofs/memcpy_fromfs
> and these aren't exported. Looks like linux by nature, doesn't encourage
> modular devide drivers.
>
> Am I right or am I missing something ?
>
> Forgive me if this a stupid question.

You are missing something - look at the copy_to_user define
in asm/uacess.h. Of course copy_to/from_user works within a
module.

-- 
*  Jens Axboe <axboe@image.dk>
*  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/