[okl4-developer] Questions about pd_ref and roottask pagefault

yangxi yang.xi at nicta.com.au
Wed Apr 9 17:05:06 EST 2008


Hi all:
Yesterday, I re-installed UBUNTU to my laptop, with the same toolchain
but there is a roottask pagefault. When I copy the build system to
paulaner and compile it, the roottask disappear.

I figure out the reason is that in function get_pd(iguana_server.c),
there is the_pd = (struct pd *)(pd_ref & ~IID_MASK). But the return
value of pd_create(malloc in it) function is not always align on 8 bytes
bound. For example it return 0x80027824 for struct pd *. So the get_pd
will return the NULL and the pd_ext_l4_space(_pd) does not check whether
it is NULL and read the address of _pd->extension. After I change the_pd
= (struct pd*)(pd_ref), there is no page fault.

My question is
1)What is the function of (struct pd *)(pd_ref &~IID_MASK), what is the
function of the low 3 bits of pd_ref?
2)If iguana use the low three bits for other security function, why
malloc will return a pointer not align on 8 bytes?

Regards





More information about the Developer mailing list