Kernel-User shared buffer
Hi.
I'm trying to create a shared buffer for realtime communication between the kernel and a userspace application. All allocation is done for the userspace task in the kernel, and the kernel is to write to the ram from within syscalls made by other processes.
I don't think remap_page_range will work for this application, but I am unsure, and I am unsure of its usage besides.
The basic logic is pretty much as follows:
task_t *acl_daemon = tskacld;
acldata *waclque;
waclque = kmalloc(sizeof(acldata), GFP_KERN); addr = map_to_user(acl_daemon, waclque, sizeof(acldata)); old_aclque->msg = msg;old_aclque->next = addr;old_aclque->eval = ACL_EVAL_EVAL;
pretty much, I want to map system memory to userspace per task, in the context of the core kernel. This is NOT a driver or loadable module.
If you could give me a source file and function name of a function that does this or does something similar, I could work from there. I've already tried making do_mmap() call a do_mmap_task() (which is the original do_mmap() with "current" replaced with "tsk", and tsk passed), but I don't think this helps me :/
_____________________________________________________________
Linux.Net -->Open Source to everyone
Powered by Linare Corporation
http://www.linare.com/
Quoted 5 lines · john moser
I'm trying to create a shared buffer for realtime communication between the kernel and a userspace application. All allocation is done for the userspace task in the kernel, and the kernel is to write to the ram from within syscalls made by other processes.
I'm not sure what you mean by "realtime", but have a look at relayfs:
http://www.opersys.com/relayfs/index.html
Karim
Signature · 3 lines
Author, Speaker, Developer, Consultant Pushing Embedded and Real-Time Linux Systems Beyond the Limits http://www.opersys.com || [email protected] || 1-866-677-4546