Intel® Software Guard Extensions (Intel® SGX)
Discussion board focused on hardware-based isolation and memory encryption to provide extended code protection in solutions.

Intel SGX Pthreads

PYuhala
Principiante
3.527 Vistas

Hello,

The latest Intel SGX developer Reference for Linux* OS (version 2.12) specifies (from page 137) APIs provided by the SGX pthread library. However there is not any example Sample code that uses or shows how to use these APIs in SGX applications. More specifically, what are the associated header files to import, EDL files etc. 

I have tried using the API (pthread_create(...) etc) after adding "-lsgx_pthread" in my link options, but this alone does not seem to be enough; the said routines are not found by my compiler. 

0 kudos
1 Solución
JesusG_Intel
Moderador
3.514 Vistas

Hello PYuhala,

In addition to adding -lsgx_pthread to your link statement in the Makefile, you must...

  1. Copy sgxsdk/include/sgx_pthread.edl to your Enclave source directory.
  2. In Enclave.edl, add: from "sgx_pthread.edl" import *;
  3. In Enclave.cpp, add: #include "pthread.h"

 

Ver la solución en mensaje original publicado

3 Respuestas
JesusG_Intel
Moderador
3.515 Vistas

Hello PYuhala,

In addition to adding -lsgx_pthread to your link statement in the Makefile, you must...

  1. Copy sgxsdk/include/sgx_pthread.edl to your Enclave source directory.
  2. In Enclave.edl, add: from "sgx_pthread.edl" import *;
  3. In Enclave.cpp, add: #include "pthread.h"

 

PYuhala
Principiante
3.500 Vistas

Hello, 

Thank you for your response. Will do as you have said.

JesusG_Intel
Moderador
3.481 Vistas

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.


Responder