<?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:Obtaining an enclave thread's stack address in Intel® Software Guard Extensions (Intel® SGX)</title>
    <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Obtaining-an-enclave-thread-s-stack-address/m-p/1198113#M3870</link>
    <description>&lt;P&gt;Hello PYuhala,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I cannot find a good way to get the stack pointer address from within an enclave.&lt;/P&gt;&lt;BR /&gt;</description>
    <pubDate>Thu, 06 Aug 2020 21:29:58 GMT</pubDate>
    <dc:creator>JesusG_Intel</dc:creator>
    <dc:date>2020-08-06T21:29:58Z</dc:date>
    <item>
      <title>Obtaining an enclave thread's stack address</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Obtaining-an-enclave-thread-s-stack-address/m-p/1197168#M3856</link>
      <description>&lt;P&gt;Hello, from my understanding creating a thread within an Intel SGX enclave is illegal, and can only be done outside. I use the &lt;STRONG&gt;pthread API&lt;/STRONG&gt; to create threads outside which then get into the enclave runtime. According to the SDM, all threads entering the enclave have their thread context (TCS, stack, TLS, etc) in the latter.&lt;/P&gt;
&lt;P&gt;I would like to know if the value returned by a posix call such as&amp;nbsp;&lt;STRONG&gt;&lt;SPAN style="font-family: inherit;"&gt;pthread_attr_getstack&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="font-family: inherit;"&gt;&amp;nbsp;(via an ocall)&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-family: inherit;"&gt;for such an enclave thread&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-family: inherit;"&gt;is the correct value of the corresponding thread's stack address given that the latter was spawned outside. If it is not, how then could one obtain the value of an enclave thread's stack address from within the enclave runtime ?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Aug 2020 07:06:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Obtaining-an-enclave-thread-s-stack-address/m-p/1197168#M3856</guid>
      <dc:creator>PYuhala</dc:creator>
      <dc:date>2020-08-04T07:06:15Z</dc:date>
    </item>
    <item>
      <title>Re:Obtaining an enclave thread's stack address</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Obtaining-an-enclave-thread-s-stack-address/m-p/1197719#M3863</link>
      <description>&lt;P&gt;Hello PYuhala,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Calling &lt;B&gt;pthread_att_getstack&lt;/B&gt; will not give you the value of the enclave's stack pointer as that is in protected memory and pthread will not have access to that. What is the purpose of getting the enclave thread's stack address?&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 05 Aug 2020 17:37:33 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Obtaining-an-enclave-thread-s-stack-address/m-p/1197719#M3863</guid>
      <dc:creator>JesusG_Intel</dc:creator>
      <dc:date>2020-08-05T17:37:33Z</dc:date>
    </item>
    <item>
      <title>Re: Re:Obtaining an enclave thread's stack address</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Obtaining-an-enclave-thread-s-stack-address/m-p/1197722#M3864</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.intel.com/t5/user/viewprofilepage/user-id/175"&gt;@JesusG_Intel&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Thank you for your answer. I linked my enclave code with a custom static library which invokes many routines of the "pthread" family such as "pthread_attr_getstack()". I am trying to port the said library to my enclave by redefining those routines as ocalls to the glibc variants out of the enclave. I have successfully re-implemented a good number of them (I know the latest SDK supports some pthreadxxx stuff too) via ocalls, and was stuck at the level of "pthread_attr_getstack()", as the value returned via an ocall would not be the correct value for the trusted stack, as you have pointed out.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Aug 2020 17:53:02 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Obtaining-an-enclave-thread-s-stack-address/m-p/1197722#M3864</guid>
      <dc:creator>PYuhala</dc:creator>
      <dc:date>2020-08-05T17:53:02Z</dc:date>
    </item>
    <item>
      <title>Re:Obtaining an enclave thread's stack address</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Obtaining-an-enclave-thread-s-stack-address/m-p/1198113#M3870</link>
      <description>&lt;P&gt;Hello PYuhala,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I cannot find a good way to get the stack pointer address from within an enclave.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 06 Aug 2020 21:29:58 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Obtaining-an-enclave-thread-s-stack-address/m-p/1198113#M3870</guid>
      <dc:creator>JesusG_Intel</dc:creator>
      <dc:date>2020-08-06T21:29:58Z</dc:date>
    </item>
    <item>
      <title>Re:Obtaining an enclave thread's stack address</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Obtaining-an-enclave-thread-s-stack-address/m-p/1201807#M3883</link>
      <description>&lt;P&gt;&lt;B&gt;Intel is no longer monitoring 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>Wed, 19 Aug 2020 19:56:09 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Obtaining-an-enclave-thread-s-stack-address/m-p/1201807#M3883</guid>
      <dc:creator>JesusG_Intel</dc:creator>
      <dc:date>2020-08-19T19:56:09Z</dc:date>
    </item>
  </channel>
</rss>

