<?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:SGX Threads behavior in Intel® Software Guard Extensions (Intel® SGX)</title>
    <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/SGX-Threads-behavior/m-p/1292706#M4699</link>
    <description>&lt;P&gt;&lt;B&gt;This thread has been marked as answered 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;/B&gt;&lt;/P&gt;&lt;BR /&gt;</description>
    <pubDate>Thu, 24 Jun 2021 00:52:34 GMT</pubDate>
    <dc:creator>JesusG_Intel</dc:creator>
    <dc:date>2021-06-24T00:52:34Z</dc:date>
    <item>
      <title>SGX Threads behavior</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/SGX-Threads-behavior/m-p/1290722#M4675</link>
      <description>&lt;P&gt;Hello All,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am getting some undefined behavior in SGX enclave while number of threads exceeds number of TCS mentioned in sgx config file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In configuration, TCS NUM is set to 10 and TCS Policy set to 1.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When the untrusted code created more than 10 threads, then I am facing some strange issues from Enclave. After changing TCS NUM to higher value the application running smoothly.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here, I am aware of number of threads allowed inside the SGX is restricted by number of Physical core. But I want to know what happens in Enclave when we run more number of threads than the value specified by TCS NUM.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Anand&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jun 2021 12:07:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/SGX-Threads-behavior/m-p/1290722#M4675</guid>
      <dc:creator>Anandakumar</dc:creator>
      <dc:date>2021-06-17T12:07:18Z</dc:date>
    </item>
    <item>
      <title>Re:SGX Threads behavior</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/SGX-Threads-behavior/m-p/1290828#M4678</link>
      <description>&lt;P&gt;Hello Anand,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;TCS_NUM indicates the number of Thread Control Structures to allocate for the enclave.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From &lt;A href="https://eprint.iacr.org/2016/086.pdf" rel="noopener noreferrer" target="_blank"&gt;SGX Explained&lt;/A&gt;: "The SGX implementation uses a Thread Control Structure (TCS) for each logical processor that executes an enclave’s code. It follows that an enclave’s author must provision at least as many TCS instances as the maximum number of concurrent threads that the enclave is intended to support."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A TCS consists of an entry point and pointer to the State Save Area and other features. Section 37.8 Thread Control Structure of Intel's &lt;A href="https://software.intel.com/content/www/us/en/develop/download/intel-64-and-ia-32-architectures-sdm-combined-volumes-3a-3b-3c-and-3d-system-programming-guide.html" rel="noopener noreferrer" target="_blank"&gt;Software Development Manual&lt;/A&gt; provides details of the contents of the TCS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you try to use more threads than the number of Thread Control Structures then the threads will not know how to enter the enclave because the TCS does not exist.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Refer to &lt;A href="https://software.intel.com/content/www/us/en/develop/documentation/sgx-developer-guide/top/threading-topics/thread-binding-policy.html" rel="noopener noreferrer" target="_blank"&gt;Thread Binding Policy&lt;/A&gt; for information on the TCS_POLICY.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Sincerely,&lt;/P&gt;&lt;P&gt;Jesus G.&lt;/P&gt;&lt;P&gt;Intel Customer Support&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 17 Jun 2021 19:47:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/SGX-Threads-behavior/m-p/1290828#M4678</guid>
      <dc:creator>JesusG_Intel</dc:creator>
      <dc:date>2021-06-17T19:47:18Z</dc:date>
    </item>
    <item>
      <title>Re:SGX Threads behavior</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/SGX-Threads-behavior/m-p/1292706#M4699</link>
      <description>&lt;P&gt;&lt;B&gt;This thread has been marked as answered 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;/B&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 24 Jun 2021 00:52:34 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/SGX-Threads-behavior/m-p/1292706#M4699</guid>
      <dc:creator>JesusG_Intel</dc:creator>
      <dc:date>2021-06-24T00:52:34Z</dc:date>
    </item>
  </channel>
</rss>

