The HyperNews Linux KHG Discussion Pages

Question: Can I map kernel (device driver) memory into user space ?

Forum: The Linux Kernel Hackers' Guide
Date: Thu, 02 Apr 1998 15:28:36 GMT
From: Ronald Tonn <tonn@infotech.tu-chemnitz.de>

I'm trying to find out a way to map memory that has been allocated by a device driver (of course in kernel mode) into user space so that applications can have access to it.

This issue has come up while writing an ATM network driver. If send or receive buffers (allocated by the driver) could be passed directly to an application that makes use of the driver, data could be passed with a single-copy operation. e.g the application requests a send buffer from the driver, copies the data into it and then forces the driver to transmit the buffer.

Right now I'm using copy_from(to)_user in order to get the data from a user allocated buffer into the driver allocated send buffer and vice versa.

Any help would be much appreciated.

Thanks,

Ronald