Re: Allocate userspace memory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, May 04, 2007 at 09:16:22AM +0200, Jirka Pirko wrote:
>  Hi
> 
>  I'm writing pseudo chardev and i need to pass some structure to userspace. 
>  It includes strings and pointers to other structures. I need to allocate 
>  userspace memory chunks and pass pointers to in into userspace process where 
>  it can be used. Is there any chance to do it?

No, have userspace allocate the memory, pass it to the kernel, fill it
up, and then pass it back.  Much easier that way.

Or use configfs/sysfs, passing structures in and out of the kernel is
not recommended for a large number of very good reasons (not the least
being 32/64bit reasons).

good luck,

greg k-h

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux