Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Ya,
But allocating it in the kernel, and giving it to the user space (getting through pointers), I am unable to access the memory. I triesd with GFP_KERNEL & GFP_USER.
Can I use variable length array concept for pointers in the structures and giving it to the user space.
I'll have to dive into one of the kernel books for this one... but I imagine it would be easier to allocate the space in user space in pass it into the kernel via an ioctl or read call to a module in order to have the kernel populate it. As far as I know, you can't kmalloc space and pass it to a userspace process in any straight forward fashion.
I'm puzzled by this requirement. You can allocate shared-memory segments that processes may share among themselves. The kernel can, if it consents to do so, access anything. (So you could carve out the memory, and ask the kernel to do something with it.) But for memory in kernel space to be accessible by user processes is pretty a no-no. The closest thing that comes to that sort of thing is probably the mechanisms used by, for example, the /proc pseudo-filesystem. The mechanisms that are used to talk to things like the module auto-loader daemon (a privileged process in userland) are other examples.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.