Re: Allocate userspace memory

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

 





Mulyadi Santosa napsal(a):
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?
I think technically it is possible. Although I don't know the exact how-to, it can be done by kmalloc(GFP_USER), and then creating proper VMA (or insert the page to a VMA).
this can be done how?

However, I suggest another way. Pre allocate a chunk of memory, then via interface such as /proc, pass the address to the related kernel function. Let your kernel function acknowledge this address and pass information to it.
the problem is that i do not know the size of data chunk before i ask kernel to fill it.

What do you think?

regards,

Mulyadi


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