<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Error calling enclave function: 2 By passing typedef struct in Intel® Software Guard Extensions (Intel® SGX)</title>
    <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Error-calling-enclave-function-2-By-passing-typedef-struct/m-p/1474235#M5695</link>
    <description>&lt;P&gt;Hello,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I have since figured out the issue. It turned out to be unrelated to the typedef struct.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;</description>
    <pubDate>Fri, 07 Apr 2023 15:37:23 GMT</pubDate>
    <dc:creator>jdafoe</dc:creator>
    <dc:date>2023-04-07T15:37:23Z</dc:date>
    <item>
      <title>Error calling enclave function: 2 By passing typedef struct</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Error-calling-enclave-function-2-By-passing-typedef-struct/m-p/1472124#M5688</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is the trusted part of my Enclave.edl file:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;enclave {&lt;/P&gt;
&lt;P&gt;include "sharedTypes.h"&lt;BR /&gt;from "sgx_tstdc.edl" import *;&lt;BR /&gt;from "sgx_pthread.edl" import *; &lt;BR /&gt;&lt;BR /&gt;trusted {&lt;/P&gt;
&lt;P&gt;public void ecall_init();&lt;BR /&gt;public void ecall_file_init([in, string] const char *fileName,[out] Tag *tag,[out, size=10, count=numBlocks] uint8_t **sigma, int numBlocks);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And this is where the function ecall_file_init is called:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;void app_file_init(sgx_enclave_id_t eid, const char *fileName, int numBlocks) {&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;// Initialize tag and sigma&lt;BR /&gt;Tag tag;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;// First, allocate memory for the array of pointers&lt;BR /&gt;uint8_t **sigma = malloc(numBlocks * sizeof(uint8_t *));&lt;/P&gt;
&lt;P&gt;// Then, allocate memory for each block of memory that each pointer points to&lt;BR /&gt;for (int i = 0; i &amp;lt; numBlocks; i++) {&lt;BR /&gt;sigma[i] = malloc((PRIME_LENGTH / &lt;LI-EMOJI id="lia_smiling-face-with-sunglasses" title=":smiling_face_with_sunglasses:"&gt;&lt;/LI-EMOJI&gt; * sizeof(uint8_t));&lt;/P&gt;
&lt;P&gt;// Initialize each block of memory to 0&lt;BR /&gt;memset(sigma[i], 0, (PRIME_LENGTH / &lt;LI-EMOJI id="lia_smiling-face-with-sunglasses" title=":smiling_face_with_sunglasses:"&gt;&lt;/LI-EMOJI&gt; * sizeof(uint8_t));&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;sgx_status_t status;&lt;BR /&gt;// Call ecall_file_init to initialize tag and sigma&lt;BR /&gt;status = ecall_file_init(eid, fileName, &amp;amp;tag, sigma, numBlocks);&lt;BR /&gt;if (status != SGX_SUCCESS) {&lt;BR /&gt;printf("Error calling enclave function: %d\n", status);&lt;BR /&gt;return;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;The Tag typedef struct:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;typedef struct Tag {&lt;BR /&gt;int n;&lt;BR /&gt;uint8_t prfKey[KEY_SIZE];&lt;BR /&gt;uint8_t alpha[PAGE_PER_BLOCK][PRIME_LENGTH / 8];&lt;BR /&gt;uint8_t MAC[MAC_SIZE];&lt;BR /&gt;} Tag;&lt;BR /&gt;&lt;BR /&gt;I am getting error #2 which indicates I am passing something into the ecall incorreclty. I suspect that it has something to do with tag. Any things I can try or solutions?&lt;/P&gt;</description>
      <pubDate>Sat, 01 Apr 2023 01:51:01 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Error-calling-enclave-function-2-By-passing-typedef-struct/m-p/1472124#M5688</guid>
      <dc:creator>jdafoe</dc:creator>
      <dc:date>2023-04-01T01:51:01Z</dc:date>
    </item>
    <item>
      <title>Re:Error calling enclave function: 2 By passing typedef struct</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Error-calling-enclave-function-2-By-passing-typedef-struct/m-p/1472366#M5690</link>
      <description>&lt;P&gt;Hi jdafoe,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thank you for your interest in Intel® SGX.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;As I am looking around for error #2, could you share the screenshot of this error?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px;"&gt;May I know what is your use cases in this status? -&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 16px; font-family: intel-clear;"&gt; status = ecall_file_init(eid, fileName, &amp;amp;tag, sigma, numBlocks);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Looking forward to hearing from you.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px;"&gt;Ken&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 03 Apr 2023 01:15:13 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Error-calling-enclave-function-2-By-passing-typedef-struct/m-p/1472366#M5690</guid>
      <dc:creator>KFPW_Intel</dc:creator>
      <dc:date>2023-04-03T01:15:13Z</dc:date>
    </item>
    <item>
      <title>Re:Error calling enclave function: 2 By passing typedef struct</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Error-calling-enclave-function-2-By-passing-typedef-struct/m-p/1474062#M5694</link>
      <description>&lt;P&gt;Hi jdafoe,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to follow up with you if you can share the screenshot of error #2 to assist your issue further.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Looking forward to hearing from you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ken&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 07 Apr 2023 03:23:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Error-calling-enclave-function-2-By-passing-typedef-struct/m-p/1474062#M5694</guid>
      <dc:creator>KFPW_Intel</dc:creator>
      <dc:date>2023-04-07T03:23:38Z</dc:date>
    </item>
    <item>
      <title>Re: Error calling enclave function: 2 By passing typedef struct</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Error-calling-enclave-function-2-By-passing-typedef-struct/m-p/1474235#M5695</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I have since figured out the issue. It turned out to be unrelated to the typedef struct.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Apr 2023 15:37:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Error-calling-enclave-function-2-By-passing-typedef-struct/m-p/1474235#M5695</guid>
      <dc:creator>jdafoe</dc:creator>
      <dc:date>2023-04-07T15:37:23Z</dc:date>
    </item>
    <item>
      <title>Re:Error calling enclave function: 2 By passing typedef struct</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Error-calling-enclave-function-2-By-passing-typedef-struct/m-p/1474739#M5696</link>
      <description>&lt;P&gt;Hi jdafoe,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I am glad to see that the issues that you faced have been solved.&lt;/P&gt;&lt;P&gt;This thread has been marked as solved and Intel will no longer monitor this thread. If you want a response from Intel in a follow-up question, please open a new thread.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ken&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 10 Apr 2023 00:35:22 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Error-calling-enclave-function-2-By-passing-typedef-struct/m-p/1474739#M5696</guid>
      <dc:creator>KFPW_Intel</dc:creator>
      <dc:date>2023-04-10T00:35:22Z</dc:date>
    </item>
  </channel>
</rss>

