<?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 Hi, in Intel® Software Guard Extensions (Intel® SGX)</title>
    <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Catch-Segmentation-Fault-Error-in-an-Enclave/m-p/1138752#M2157</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Please refer to this query:&lt;/P&gt;

&lt;P&gt;&lt;A href="https://software.intel.com/en-us/forums/intel-software-guard-extensions-intel-sgx/topic/734597" target="_blank"&gt;https://software.intel.com/en-us/forums/intel-software-guard-extensions-intel-sgx/topic/734597&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 03 Jul 2017 13:08:55 GMT</pubDate>
    <dc:creator>Anusha_K_Intel</dc:creator>
    <dc:date>2017-07-03T13:08:55Z</dc:date>
    <item>
      <title>Catch Segmentation Fault Error in an Enclave</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Catch-Segmentation-Fault-Error-in-an-Enclave/m-p/1138750#M2155</link>
      <description>&lt;P&gt;Dear all,&lt;/P&gt;

&lt;P&gt;I am working on a project which would include some "inline assembly" code in the enclave. While in general this should work fine, one issue is that the relocation information of the assembly code is missing. In other words, there could probably exist a lot of segmentation fault issue in the enclave, something like:&lt;SPAN style="font-size: 1em;"&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;...
call 0x8080460  &amp;lt;--- this address (0x8080460) is incorrect, its new destination in the enclave should be 0x4040404
...&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;To handle such issue, currently what I am thinking is to intercept all the segmentation fault (&lt;SPAN style="font-size: 12px;"&gt;SIGSEGV) within the enclave, and re-direct the execution flow to its new destination during the runtime. This seems generally sound to me.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;I knew that SGX provides an exception handling routine (&lt;SPAN style="font-size: 12px;"&gt;sgx_register_exception_handler); however, according to this &lt;A href="https://software.intel.com/en-us/forums/intel-software-guard-extensions-intel-sgx/topic/734597"&gt;post&lt;/A&gt;, it seems that SGX exception handler simply cannot catch SIGSEGV exception.. I am unable to play with a SGX hardware so at this moment I assume this is true.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;So h&lt;SPAN style="font-size: 1em;"&gt;ere is my question:&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;&amp;nbsp; &amp;nbsp; 1. Can I catch this &lt;/SPAN&gt;&lt;SPAN style="font-size: 12px;"&gt;SIGSEGV&lt;/SPAN&gt;&lt;SPAN style="font-size: 1em;"&gt;&amp;nbsp;exception within the&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 12px;"&gt;sgx_register_exception_handler?&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp; &amp;nbsp; 2. If not, w&lt;SPAN style="font-size: 1em;"&gt;hat is the recommended way, the best practice to capture&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 12px;"&gt;SIGSEGV exception in an enclave for my problem?&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 12px;"&gt;Thank you, any advice or suggestion would be strongly appreciated!&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 12px;"&gt;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 01 Jul 2017 20:48:05 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Catch-Segmentation-Fault-Error-in-an-Enclave/m-p/1138750#M2155</guid>
      <dc:creator>Irene__GP</dc:creator>
      <dc:date>2017-07-01T20:48:05Z</dc:date>
    </item>
    <item>
      <title>One more question, is it</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Catch-Segmentation-Fault-Error-in-an-Enclave/m-p/1138751#M2156</link>
      <description>&lt;P&gt;One more question, is it possible to catch the&amp;nbsp;&lt;SPAN style="font-size: 12px;"&gt;SIGSEGV within the secure world (within SGX Enclave or some trusted computing base)? Or I have to catch it in the OS-level, which is not assumed as "trusted" in the SGX model...&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 01 Jul 2017 20:51:12 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Catch-Segmentation-Fault-Error-in-an-Enclave/m-p/1138751#M2156</guid>
      <dc:creator>Irene__GP</dc:creator>
      <dc:date>2017-07-01T20:51:12Z</dc:date>
    </item>
    <item>
      <title>Hi,</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Catch-Segmentation-Fault-Error-in-an-Enclave/m-p/1138752#M2157</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Please refer to this query:&lt;/P&gt;

&lt;P&gt;&lt;A href="https://software.intel.com/en-us/forums/intel-software-guard-extensions-intel-sgx/topic/734597" target="_blank"&gt;https://software.intel.com/en-us/forums/intel-software-guard-extensions-intel-sgx/topic/734597&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jul 2017 13:08:55 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Catch-Segmentation-Fault-Error-in-an-Enclave/m-p/1138752#M2157</guid>
      <dc:creator>Anusha_K_Intel</dc:creator>
      <dc:date>2017-07-03T13:08:55Z</dc:date>
    </item>
  </channel>
</rss>

