Re: allocate memory in userspace

From: Calin A. Culianu (calin@ajvar.org)
Date: Mon Jul 01 2002 - 13:39:53 EST


Why don't you just exec a process?

On Mon, 1 Jul 2002, 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.
>
> I read that it should be possible, but i cannot
> find any example or recipe on how to do it.
> It should work with do_mmap() and fd=-1 and
> MAP_ANON, but i jusst can't get it to work.
>
> Do you now any working example, or a good reference
> for the do_mmap() call?
>
> Thanks in advance,
>
> -timo
>
>

-
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:08 EST