The HyperNews Linux KHG Discussion Pages

Question: How can the kernel copy directly data from one process to another process?

Forum: The Linux Kernel Hackers' Guide
Keywords: direct copy, user space, kernel space
Date: Sat, 06 Jun 1998 20:57:05 GMT
From: Jürgen Zeller <zeller@rupert.franken.de>

Hi,

in my first kernel-related project, i want to copy data in the kernel from one process to another.

I have the start point/size of the user-level buffers, but i found no way to do a _direct_ copy.

The copy takes place in a write() call of a character device driver, the source/size is the write buffer/size, the destinition is a other process, currently blocking in its read method.

Of course, i could do a kmalloc, copy to kernel, wake up the read, copy from the kmalloc'd area, kfree the area, but ... that is too much overhead.

Any hints?

Bye,

Jürgen