Re: allocate memory in userspace

From: Brian Gerst (bgerst@didntduck.org)
Date: Tue Jul 02 2002 - 07:19:30 EST


Timo Benk wrote:
> Hi,
>
> I am a kernel newbie and i am writing a module. I
> need to allocate some memory in userspace because
> i want to access syscalls like open(), lstat() etc.
> I need to call these methods in the kernel, and in
> my special case there is no other way, but i
> do not want to reimplement all the syscalls.

What are you trying to do with this module? If you are needing to use
syscalls like open(), you are probably trying to do something that is
forbidden in kernel space. For example, trying to read a configuration
file.

Recommended reading:
http://www.linux.org.uk/~ajh/ols2002_proceedings.pdf.gz
The chapter named "How NOT to write kernel drivers", especially sections
7 and 8.

--
				Brian Gerst

- 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/



This archive was generated by hypermail 2b29 : Sun Jul 07 2002 - 22:00:09 EST