linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* RE: Exporting kernel memory to application
@ 2001-08-08 10:18 Nitin Dhingra
  2001-08-09 14:39 ` Andreas Bombe
  0 siblings, 1 reply; 4+ messages in thread
From: Nitin Dhingra @ 2001-08-08 10:18 UTC (permalink / raw)
  To: imran.badr; +Cc: linux-kernel

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/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Exporting kernel memory to application
  2001-08-08 10:18 Exporting kernel memory to application Nitin Dhingra
@ 2001-08-09 14:39 ` Andreas Bombe
  0 siblings, 0 replies; 4+ messages in thread
From: Andreas Bombe @ 2001-08-09 14:39 UTC (permalink / raw)
  To: Nitin Dhingra; +Cc: imran.badr, linux-kernel

On Wed, Aug 08, 2001 at 03:48:50PM +0530, Nitin Dhingra wrote:
> 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() 

When someone asks how to lock user buffers into kernel space they are
suggested to allocate the buffers in kernel and map them to user space
which is much cleaner, safer and everything.

That guy got it right on the first attempt.  Don't confuse him with
inferior solutions.

-- 
Andreas E. Bombe <andreas.bombe@munich.netsurf.de>    DSA key 0x04880A44

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Exporting kernel memory to application
  2001-08-07 22:24 ` Exporting kernel memory to application Imran Badr
@ 2001-08-07 23:31   ` Alan Cox
  0 siblings, 0 replies; 4+ messages in thread
From: Alan Cox @ 2001-08-07 23:31 UTC (permalink / raw)
  To: imran.badr; +Cc: linux-kernel

> 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Exporting kernel memory to application
  2001-08-07 22:12 Linux 2.4.7-ac8 Keith Owens
@ 2001-08-07 22:24 ` Imran Badr
  2001-08-07 23:31   ` Alan Cox
  0 siblings, 1 reply; 4+ messages in thread
From: Imran Badr @ 2001-08-07 22:24 UTC (permalink / raw)
  To: linux-kernel


Hi,

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.

Thanks,
Imran Badr.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2001-08-09 14:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-08 10:18 Exporting kernel memory to application Nitin Dhingra
2001-08-09 14:39 ` Andreas Bombe
  -- strict thread matches above, loose matches on Subject: below --
2001-08-07 22:12 Linux 2.4.7-ac8 Keith Owens
2001-08-07 22:24 ` Exporting kernel memory to application Imran Badr
2001-08-07 23:31   ` Alan Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).