Kernel-User shared buffer

From: john moser
Date: Fri Mar 05 2004 - 19:08:34 EST


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/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/