Comments (8)
Glad to hear re-installing SGX-SDK helped. The last error means you are not linking to the PSW library, but to the SDK one.
Have a look at this issue in the linux-sgx repo:
I think you ought not to link to
/opt/intel/sgxsdk/lib64
, and you should definitely not copy files(!)Normally this is all not needed when you do the
$ source /opt/intel/sgxsdk/environment # add to ~/.bashrc to preserve across terminal sessions
from the SGX-Step README before you do the make, and every time you start a new bash session.Hope it helps. Let me know if things work now, or if problems persist, please output the full exact commands and output, including the output of
ldd ./app
Thank you very much, @jovanbulck it works now!
from sgx-step.
This error indicates that the linker doesn't find the customly patched SGX SDK. Did you make sure to patch and install the SGX SDK?
Please have a look at #24 and follow steps there, and let me know if this works for you so this issue can be closed.
If problems remain, please post output using ldd
and LD_LIBRARY_PATH
.
from sgx-step.
This error indicates that the linker doesn't find the customly patched SGX SDK. Did you make sure to patch and install the SGX SDK?
Please have a look at #24 and follow steps there, and let me know if this works for you so this issue can be closed.
If problems remain, please post output using
ldd
andLD_LIBRARY_PATH
.
Hello, when I did “2. Patch and install SGX SDK”, I met following error:
$sudo service aesmd status
● aesmd.service - Intel(R) Architectural Enclave Service Manager
Loaded: loaded (/lib/systemd/system/aesmd.service; disabled; vendor preset: enabled)
Active: inactive (dead)
4月 20 01:15:33 systemd[1]: Failed to start Intel(R) Architectural Enclave Servi>
4月 20 01:15:49 systemd[1]: aesmd.service: Scheduled restart job, restart counte>
4月 20 01:15:49 systemd[1]: Stopped Intel(R) Architectural Enclave Service Manag>
4月 20 01:15:49 systemd[1]: Starting Intel(R) Architectural Enclave Service Mana>
4月 20 01:15:49 systemd[588511]: aesmd.service: Failed to determine user credent>
4月 20 01:15:49 systemd[588511]: aesmd.service: Failed at step USER spawning /op>
4月 20 01:15:49 systemd[1]: aesmd.service: Control process exited, code=exited, >
4月 20 01:15:49 systemd[1]: aesmd.service: Failed with result 'exit-code'.
4月 20 01:15:49 systemd[1]: Failed to start Intel(R) Architectural Enclave Servi>
4月 20 01:15:55 systemd[1]: Stopped Intel(R) Architectural Enclave Service Manag>
$sudo service aesmd stop
$sudo service aesmd start
Job for aesmd.service failed because the control process exited with error code.
See "systemctl status aesmd.service" and "journalctl -xe" for details.
$systemctl status aesmd.service
● aesmd.service - Intel(R) Architectural Enclave Service Manager
Loaded: loaded (/lib/systemd/system/aesmd.service; disabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Wed 2022-04-20 01:28:25 CST; 11s ago
Process: 658964 ExecStartPre=/opt/intel/sgxpsw/aesm/linksgx.sh (code=exited, status=217/USER)
Then did "3. Build and run test applications", met following error:
[main.c] Creating enclave...
[init ../../../psw/ae/aesm_service/source/core/ipc/UnixCommunicationSocket.cpp:225] Failed to connect to socket /var/run/aesmd/aesm.socket
Error calling enclave at main.c:120 (rv=0x4001)
make: *** [Makefile:45: run] Aborted
from sgx-step.
Now it seems you linked to all required dependencies, but there seems to be an issue with you SGX PSW installation, as the aesmd
service is not running. The app then crashes naturally as it cannot communicate with the aesmd service.
I am not sure why your SGX PSW is not working, but I expect it is an issue in the linux-sgx project. This service used to crash frequently, and sometimes could be brought up successfully by $sudo service aesmd stop; $sudo service aesmd start
repeatedly until it works.
Also make sure your SGX driver is loaded correctly and check dmesg
?
Hope it helps!
from sgx-step.
Thanks a lot, @jovanbulck
It works now, I re-installed intel sgx at first, then re-installed sgx-step.
from sgx-step.
Sorry, @jovanbulck
I copy libsgx_urts.so from /opt/intel/sgxsdk/lib64 to the app uses, but met following error:
[main.c] Creating enclave...
Please use the correct uRTS library from PSW package.
Error calling enclave at main.c:120 (rv=0x1)
make: *** [Makefile:45: run] Aborted
from sgx-step.
Glad to hear re-installing SGX-SDK helped. The last error means you are not linking to the PSW library, but to the SDK one.
Have a look at this issue in the linux-sgx repo:
I think you ought not to link to /opt/intel/sgxsdk/lib64
, and you should definitely not copy files(!)
Normally this is all not needed when you do the $ source /opt/intel/sgxsdk/environment # add to ~/.bashrc to preserve across terminal sessions
from the SGX-Step README before you do the make, and every time you start a new bash session.
Hope it helps. Let me know if things work now, or if problems persist, please output the full exact commands and output, including the output of ldd ./app
from sgx-step.
glad to hear it works now!
from sgx-step.
Related Issues (20)
- Hyperlink of the approach to bypass devmem_is_allowed checks is unavailable HOT 3
- undefined symbol : sgx_get_aep HOT 10
- kernel panics when single-stepping [SOLVED: KPTI #PF for kernel IRQ] HOT 12
- error when running bench: [file.c] assertion '(f = fopen(path, "w"))' failed: No such file or directory HOT 6
- Work-in-progress Gramine port HOT 17
- Could add some explanation for each test application under app/ to README? HOT 1
- /dev/sgx-step would be uninstalled after os reboot HOT 2
- foreshadow/lvi building error , memcmp running error HOT 2
- os would always hang after running cpl/idt/memcmp HOT 8
- Refactor: page-fault abstraction in libsgxstep
- Could sgx-step support SGX in-kernel/dcap driver? HOT 2
- victim.base && "no enclave found in /proc/self/maps HOT 4
- Support multithreaded enclaves
- ./install_SGX_SDK.sh can't find python2 HOT 3
- Trying to run app/memcmp but gives assertion error HOT 5
- Questions regarding the use of unmap_alias and sim_reload HOT 3
- Questions regarding fs_reload_threshold in foreshadow HOT 1
- Refactor build system
- More questions regarding unmap_alias() and leaking data HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sgx-step.