IPC problem with dice-3.3.0

Marcel Selhorst m.selhorst at sirrix.com
Fri Mar 20 00:58:37 CET 2009

Hi Carsten,

>> This leads to compile errors due to conflicting declarations...
> I attached a patch for DICE. Could you check if it fixes this problem?

yes, thank you, the patch fixed the header problem.

>> The second problem I have regards IPC-calls:
>> > static CORBA_Environment env;
> This is wrong. Please use the DICE_DECLARE_ENV macro to declare and  
> properly initialize the CORBA environment:

thanks again, this solved my pagefault :)

Now the IPCs are working, but I identified another problem, that I am not able
to solve:

I have the following interface:

int register([in, size_is(name_len), max_is(MAX_NAME_LEN)] char  *name,
             [in]                                          long   name_len,
             [in]                                          long   in1,
             [out]                                         long  *out1,
             [out]                                         long   out2

long read   ([in]                                          long   in1,
             [in]                                          long   in2,
             [in]                                          long   bytes_to_read,
             [out, max_is(MAX_PAGE_SIZE)]                  char   read_buffer[]

The server is implemented as an L4Linux-task. I have three clients:

1) Native L4-client

works :)

2) L4Linux application

works aswell

3) L4Linux kernel module

fails... The kernel module registers itself during the __init phase via the
"register" function and this function also works.
But as soon as I try to execute a "read"-call, I get:

    --Unset id on stack (c)----------------------------------IP: 00401e30
[l4lx.cpu0] (10.05) jdb: g
failed CLI: 00000010.00000005

    --Unset id on stack (c)----------------------------------IP: 00401e30
[l4lx.cpu0] (10.05) jdb: g
failed STI: 00000010.00000005

The strange thing is, that the DICE-environmnent is set (otherwise the
names_query_name() and the register()-method would fail). I even tried to put
the env manually on the stack prior calling via:
  result = read(...);
But that didn't help either.

Do you have any idea, what I might be missing? I thought that this might have
something to do with the buffer's memory allocation, I even tried the
"prealloc_client" flag in the idl-file and I manually forced dice to use my own
CORBA_alloc methods using Linux kernels memory allocation:

void *CORBA_alloc(unsigned long size)
    return vmalloc(size);

void CORBA_free(void *addr)

> Btw.: With which flags do you call gcc (we are talking about C here,  
> right?) and which compiler version are you using?

gcc-params: -nostdlib -nostdinc -Wall -Werror -DL4API_l4v2 -I [alotofincludes]
dice-params: -fforce-corba-alloc -fforce-c-bindings -nostdinc -P-DL4API_l4v2
-P-I/include [...] and some more includes

Thanks again,
Sirrix AG security technologies - http://www.sirrix.com
Marcel Selhorst      eMail: m.selhorst at sirrix.com
Tel +49(234) 61 0071-199    Fax +49(234) 61 0071-599
get my public key from keyserver, key id: 0x7C9821CC
Fingerprint 4138 E617 E62E 79D3 E663 BE5A 14E7 1CD8 7C98 21CC

Vorstand: Ammar Alkassar (Vors.), Ahmad-Reza Sadeghi, Christian Stüble
Vorsitzender des Aufsichtsrates: Prof. Dr. Kai Rannenberg
Sitz der Gesellschaft: Homburg/Saar, HRB 3857 Amtsgericht Saarbrücken

This message may contain confidential and/or privileged information.
If you are not the addressee, you must not use, copy, disclose or
take any action based on this message or any information herein.
If you have received this message in error, please advise the sender
immediately by reply e-mail and delete this message.

More information about the l4-hackers mailing list