RE: Exporting kernel memory to application

Nitin Dhingra (nitin.dhingra@dcmtech.co.in)
Wed, 8 Aug 2001 15:48:50 +0530


You can do that by using kiobuf's ( only in kernel 2.4.x ).
That way you could lock the user buffers in kernel but you
would have to allocate user buffer prior to using any kiobuf's functions
like map_user_kiobuf()

For example you could look at arch/cris/drivers/examples/kiobuftest.c

:),
Nitin

-----Original Message-----
From: Alan Cox [mailto:alan@lxorguk.ukuu.org.uk]
Sent: Tuesday, August 07, 2001 4:31 PM
To: imran.badr@cavium.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: Exporting kernel memory to application

> I am in a situation where it is required to export a kernel memory
> (allocated by kmalloc in the device driver) to the user application. I
would
> really appreciate any guidance or suggestion.

Look at the sound drivers, they do this, although with memory allocated
by get_free_pages() - the rest of the theory is the same
-
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/
-
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/