On Sunday 08 April 2001 10:28, Lothar Krause wrote:
> Is there some way to get a shared memory area that has the same address in
> both kernel and user space?

AFAIK, kernel space normally maps it's memory in the high end of the 4 GB 
range (on x86), precisely in order to *avoid* collisions with user space 
mappings. (That way, you can avoid some linear->physic translation table 
swapping when entering kernel space; the mappnigs are always there, but just 
not accessible from user space.)

I think it should theoretically possible to map almost any physical memory to 
any free region, whether in kernel space or in user space, but I can't see 
how it could be done with less than reserving a part of the linear address 
space globally. (If *any* task could replace that mapping, you'd be in 
trouble when the RTL thread tries to access the shared area...)

It doesn't seem like a thing that would be explicitly supported, but there 
might be some shortcut.

Changing the access flags on memory pages allocated from the kernel heap 
could work, I guess, but without some further hacking (changing those pages 
upon switches between tasks with access and other tasks), it would mean that 
*any* task gets access to the memory. Major security hole. :-)


//David

.- M A I A -------------------------------------------------.
|      Multimedia Application Integration Architecture      |
| A Free/Open Source Plugin API for Professional Multimedia |
`----------------------> http://www.linuxaudiodev.com/maia -'
.- David Olofson -------------------------------------------.
| Audio Hacker - Open Source Advocate - Singer - Songwriter |
`--------------------------------------> [EMAIL PROTECTED] -'
-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
--
For more information on Real-Time Linux see:
http://www.rtlinux.org/rtlinux/

Reply via email to