[okl4-developer] Direct IPC from OKLinux userland processes to OKL4 services

Nelson Tam nelson at ok-labs.com
Thu Feb 28 18:11:26 EST 2008


Hi Damien,

On 26/02/2008, at 01:27, Damien Schulz wrote:

> is it possible to have IPC directly from OKLinux userland processes  
> - no matter if it is a good idea or not? So far I've written a  
> procfs module that is able to communicate with OKL4, but I'd like to  
> directly use the IDL interface in my user processes.
>
> If I understand it correctly, every linux process is started as an  
> OKL4 process, so it should be possible anyway. Is there a way to  
> simply allow IPC or would that require further changes in the  
> OKLinux fork() implementation?

I'm sorry about the confusion earlier.  Let me clarify a few things.

What I said in the previous email about OKLinux threads being able to  
use OKL4 services holds true for OKLinux _kernel_ threads only.  There  
are 2 threads in this category - called "timer_thread" and  
"main_thread".  You can find them in kernel-2.6.10-v1/arch/l4/kernel -  
take a look in sys_iguana.c and main.c.  These 2 threads have their  
own L4 space.

On the other hand, OKLinux _user_ threads runs your Linux userland  
processes in a different L4 space from the kernel threads.  The  
important thing here is that, L4 implements IPC security mechanisms on  
a per-L4-address-space basis.  While the OKLinux kernel space is given  
permission to IPC any thread in other spaces, the OKLinux user space  
is not allowed to do so.  Therefore, your OKLinux user processes won't  
be able to communicate with OKL4 services.

Now you might be asking why can't you just configure the IPC  
permissions so that the OKLinux user space can IPC everyone.  The  
short answer is that, the OKLinux kernel relies on some invariants on  
when and how OKLinux user threads get scheduled.  Once you allow  
OKLinux user threads to IPC freely, these invariants get violated.

I hope this answers your question.

Nelson.




More information about the Developer mailing list