On Thu, Oct 10, 2002 at 03:54:42PM +0200, Guennadi Liakhovetski wrote: > Is it possible to mmap a regular (new-empty) file in the user space, then > pass the pointer to the kernel and then copy_to_user to it?... There is no relation special between copy_to_user and mmaping whatsoever. All user-space memory is equivalent to copy_to_user (and all was in fact allocated by mmap). So, yes, it's possible (and it's actually what happend if you use pointer to such area to read call). But you should be aware, that copy_to_user only works for copying to current process (though it might be possible to copy to other with enough fiddling with memory maps). ------------------------------------------------------------------------------- Jan 'Bulb' Hudec <bulb@ucw.cz> -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/