Community
cancel
Showing results for 
Search instead for 
Did you mean: 
LowEntropyBody
Beginner
338 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
JesusG_Intel
Moderator
316 Views

Hello LowEntropyBody,


We are looking into your issue. Please stay tuned.


JesusG_Intel
Moderator
311 Views

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.


LowEntropyBody
Beginner
309 Views

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);
}
JesusG_Intel
Moderator
306 Views

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,


Reply