- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I tried to use Intel Pin to analyze a simple enclave project.The project is able to run in VS2013 ,simulation mode ,x64.(SDK1.6,PSW1.6)
But it appears a problem when i use Pin,as the following shows.
D:\tools\pin\source\tools\ManualExamples>pin -t obj-intel64\inscount0.dll -- obj-intel64\enclaveapp.exe
[sgx_create_enclavew ..\..\..\psw\urts\win\urts.cpp:83] Couldn't open file with CreateFile()
App: error 0x200f, failed to create enclave.
How could I solve this problem?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Did you run the application through command prompt or Local SGX Debugger?
If you are using the Local SGX Debugger, Please make sure change the "current working directory" pointing to $(OutDir) instead of $(ProjectDir) (Both App and Enclave)
Configuration Properties --> Debugging --> Working Directory --> $(OutDir).
Please look into below link for more information
- https://software.intel.com/en-us/forums/intel-software-guard-extensions-intel-sgx/topic/623738
- https://software.intel.com/en-us/forums/intel-software-guard-extensions-intel-sgx/topic/638067
-Surenthar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Selvaraj, Surenthar (Intel) wrote:
Hi,
Did you run the application through command prompt or Local SGX Debugger?
If you are using the Local SGX Debugger, Please make sure change the "current working directory" pointing to $(OutDir) instead of $(ProjectDir) (Both App and Enclave)
Configuration Properties --> Debugging --> Working Directory --> $(OutDir).
Please look into below link for more information
- https://software.intel.com/en-us/forums/intel-software-guard-extensions-intel-sgx/topic/623738
- https://software.intel.com/en-us/forums/intel-software-guard-extensions-intel-sgx/topic/638067
-Surenthar
hello
Thank you for your response.
I run the application through command prompt using intel pin.So how could I solve the problem...-_-
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Please Change the "current working directory" pointing to $(OutDir) instead of $(ProjectDir) (Both App and Enclave)
Configuration Properties --> Debugging --> Working Directory --> $(OutDir).
-Surenthar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Selvaraj, Surenthar (Intel) wrote:
Hi,
Please Change the "current working directory" pointing to $(OutDir) instead of $(ProjectDir) (Both App and Enclave)
Configuration Properties --> Debugging --> Working Directory --> $(OutDir).
-Surenthar
Hello
Through Local sgx debugger ,I have changed the "current working directory" pointing to $(OutDir) instead of $(ProjectDir) (Both App and Enclave) and it run without any problem.
But through command prompt using intel pin,the problem still exits.I wonder did anything go wrong there?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You seem to be running:
> D:\tools\pin\source\tools\ManualExamples>pin -t obj-intel64\inscount0.dll -- obj-intel64\enclaveapp.exe
So the "working directory" is "D:\tools\pin\source\tools\ManualExamples"
If your enclave is not located in the "working directory" you need to use absolute paths when calling create enclave or "cd" to the directory where the enclave is located and then run pin from there (using absolute path of the pin executable or adding its path to the PATH env var).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Francisco C. (Intel) wrote:
You seem to be running:
> D:\tools\pin\source\tools\ManualExamples>pin -t obj-intel64\inscount0.dll -- obj-intel64\enclaveapp.exe
So the "working directory" is "D:\tools\pin\source\tools\ManualExamples"
If your enclave is not located in the "working directory" you need to use absolute paths when calling create enclave or "cd" to the directory where the enclave is located and then run pin from there (using absolute path of the pin executable or adding its path to the PATH env var).
Hello
Actually my enclave was located in the "working directory" before.But I have used absolute paths when calling created enclave as you said.It runs without any problem.
Thank you.^_^
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Mr shn Y,
Recently my research will use pintools to do some instruments on SGX program, but always get into trouble with "cant open Enclave file". I notice that you have done some related work. Could you please tell how do you do your work with pintools? Thanks a lot.
Regards,
Bruce Yuan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In your code where you are creating enclaves, you should use the full path to the enclave file instead of only "enclave.signed.dll".
Francisco
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page