On Fri, 2011-07-22 at 14:11 +0200, TRUONG Le Bao wrote:
> 
> Hello Community,
> 
Hello Truong,


> code0: Mapping 0x8000 bytes as RX from 0x100000 physical to 0xa0000000
> virtual for uart_test_moi
> 
> code0: Mapping 0x89000 bytes as RW from 0x108000 physical to
> 0xa0008000 virtual for uart_test_moi
> 
> Capability id:                  0
> 
> Capability resource id:         -1
> 
> Capability owner id:            1
> 
> Capability type:                Quantitative
> 
> Capability resource type:       Map Pool (PMDS)
> 

> 
> l4_capability_control() sharing of capabilities failed.


>  Could not complete CAP_CONTROL_SHARE request. err=-22
> 
> BUG in file: main.c function: cap_share_all_with_space line: 43
> 
> 
> So I do a little research and find that err = -22 which is about “When
> a capability struct is passed in buf but with invalid fields.”
> 
> I thinks the error come from function call :
> l4_capability_control(CAP_CONTROL_SHARE,
> 
>                                          CAP_SHARE_ALL_SPACE, 0)
> 

Is this call inserted by yourself or coming from a library? The problem
is that you are making a CAP_CONTROL_SHARE call.

We used to allow dynamic transfer of capabilities between software
components. For example, a container pager could dynamically pass
privileges to one of the resources it owns to other threads or
containers. However, novel as it may sound it made the system too
complex. Therefore we removed these features from the cap control call.

> I tried to create a capability struct for the parameter buf but it
> didn't work. I have read “CodeZero Embedded Hypervisor Documentation”
> and I looked for another example using  l4_capability_control but I
> didn't find anything useful.
> 
> Could you please help me to solve my problem ?
> 
Please check latest documentation, in particular I downloaded the docs
from here: http://www.l4dev.org/download both in the PDF document and
typing man l4_capability_control (install the manpages .deb for this) I
see that there are only  CAP_CONTROL_NCAPS, CAP_CONTROL_READ requests
that are allowed.

Thanks,
Bahadir


_______________________________________________
codezero-devel mailing list
codezero-devel@lists.l4dev.org
http://lists.l4dev.org/mailman/listinfo/codezero-devel_lists.l4dev.org

Reply via email to