* Kernel-User shared buffer
@ 2004-03-06 0:06 john moser
2004-03-06 21:05 ` Karim Yaghmour
0 siblings, 1 reply; 3+ messages in thread
From: john moser @ 2004-03-06 0:06 UTC (permalink / raw)
To: linux-kernel
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/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Kernel-User shared buffer
2004-03-06 0:06 Kernel-User shared buffer john moser
@ 2004-03-06 21:05 ` Karim Yaghmour
0 siblings, 0 replies; 3+ messages in thread
From: Karim Yaghmour @ 2004-03-06 21:05 UTC (permalink / raw)
To: bluefoxicy; +Cc: linux-kernel
john moser wrote:
> 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
--
Author, Speaker, Developer, Consultant
Pushing Embedded and Real-Time Linux Systems Beyond the Limits
http://www.opersys.com || karim@opersys.com || 1-866-677-4546
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Kernel-User shared buffer
[not found] <819206922@toto.iv>
@ 2004-03-09 0:49 ` Peter Chubb
0 siblings, 0 replies; 3+ messages in thread
From: Peter Chubb @ 2004-03-09 0:49 UTC (permalink / raw)
To: bluefoxicy; +Cc: linux-kernel
>>>>> "john" == john moser <bluefoxicy@linux.net> writes:
john> Hi. I'm trying to create a shared buffer for realtime
john> communication between the kernel and a userspace application.
john> All allocation is done for the userspace task in the kernel, and
john> the kernel is to write to the ram from within syscalls made by
john> other processes.
It's easier to go the other way. Get your application to map the
buffer from a filesystem that you provide. See, e.g., the code in
arch/ia64/kernel/perfmon.c.
--
Dr Peter Chubb http://www.gelato.unsw.edu.au peterc AT gelato.unsw.edu.au
The technical we do immediately, the political takes *forever*
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-03-09 0:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-06 0:06 Kernel-User shared buffer john moser
2004-03-06 21:05 ` Karim Yaghmour
[not found] <819206922@toto.iv>
2004-03-09 0:49 ` Peter Chubb
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox