Re: How to exchange data between Kernel & User Space

Matti Aarnio (matti.aarnio@zmailer.org)
Wed, 26 Sep 2001 10:05:56 +0300


On Tue, Sep 25, 2001 at 11:11:24PM -0700, Kirill Ratkin wrote:
> Use mmap and see exmaple here:
> http://www.kernelnewbies.org/code/mmap/

That is partial possibility, but the example is
incomplete, and dangerous in case the machine
has more than about 800 MB memory. (E.g. it has,
and uses, HIGHMEM facility.)

It is also completely wrong approach in case
the interface does not need to be high bandwidth
payload delivering directly into user space,
but e.g. control some aspects of hardware.
("network interface" sounds, to me, very much
of NETDEV class device at which MMAP tricks
in general are wrong.)

The person asking for pointers didn't give
enough details for good advice. Supplying
the many ropes which Linux has for hanging
oneself is not a good advice.

> Regards,

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