Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
81 Views

Core dump caused by calling ecall multiple times

 

I repeatedly call an ecall function. No operation was performed in the function, just return. At the beginning, it went smoothly, but after a while, a core dump occurred. After setting the HeapMaxSize in the configuration to be large, the error time is pushed back. Is there something left in sgx after ecall ends, causing memory overflow? Or is there any way I can solve this problem.

 

PS:

<EnclaveConfiguration>
<ProdID>0</ProdID>
<ISVSVN>0</ISVSVN>
<!-- 64M -->
<StackMaxSize>0x4000000</StackMaxSize>
<HeapMaxSize>0x4000000</HeapMaxSize>
<TCSNum>20</TCSNum>
<TCSPolicy>1</TCSPolicy>
<!-- Recommend changing 'DisableDebug' to 1 to make the enclave undebuggable for enclave release -->
<DisableDebug>0</DisableDebug>
<MiscSelect>0</MiscSelect>
<MiscMask>0xFFFFFFFF</MiscMask>
</EnclaveConfiguration>

 

Update:

When I set TCSPolicy = 0, this core dump issue will not occur

Labels (1)
0 Kudos
4 Replies
Highlighted
Moderator
59 Views

Re:Core dump caused by multi-threaded ecall

Hello LowEntropyBody,


We are looking into your issue. Please stay tuned.


Jesus Garcia, Intel Customer Support
0 Kudos
Highlighted
Moderator
54 Views

Re:Core dump caused by multi-threaded ecall

Hello LowEntropyBody,


Since you solved your problem by setting TCSPolicy to 0, do you still need help with this issue?


If you still need help, please send your source code so we can reproduce your issue.


Jesus Garcia, Intel Customer Support
0 Kudos
Highlighted
Beginner
52 Views

Re: Re:Core dump caused by multi-threaded ecall

I did a test, but I just found the error after calling ecall repeatedly.

I have a question. What are the effects of setting TCSpolicy to 0 and what are the security risks?

ecall like:

void ecall_srd_increase(const char *path)
{
    return;
}
 
trusted {
public void ecall_srd_increase([in, string] const char* path);
}
0 Kudos
Highlighted
Moderator
49 Views

Re:Core dump caused by multi-threaded ecall

Hello Yang, please read page 49 of the SGX Developer Guide for more info on the Thread Binding Policy: https://software.intel.com/sites/default/files/managed/33/70/intel-sgx-developer-guide.pdf.


Regards,


Jesus Garcia, Intel Customer Support
0 Kudos