Comments (7)
HI shujiecui,
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? This should be automatically taken care of when you use the "install_sdk.sh" script. The Makefiles by default expect a system-wide SDK installation under /opt/intel
. You can check if this is okay on your system, eg as follows:
jo@breuer:~$ objdump -D /opt/intel/sgxsdk/lib64/libsgx_urts.so | grep sgx_get_aep
0000000000000ab6 <sgx_get_aep>:
Let me know if this works for you!
from sgx-step.
Yes, I installed the driver and SDK with the scripts.
By running the above objdump command, I get: 0000000000000b86 <sgx_get_aep>:
By the way, I haven't disable C-States and SpeedStep technology in the BIOS. Does that matter?
from sgx-step.
Okay, so since the objdump lists the symbol, patching and installing went fine indeed. Did you make sure to source /opt/intel/sgxsdk/environment
in the same terminal as were you execute the make command, so that all environment variables are properly set? Also, to be sure you're not using old objects, try doing make clean
first?
Re C-States and SpeedStep: no, that's not crucial. Not needed at all if you don't do single-stepping and eg only page-table manipulations. In general speedstep may somewhat improve predictability when doing timer-based single-stepping, but I found that this is not required in practice. Current versions of sgx-step furthermore already try to fix the processor clock at runtime through the MSR interface.
from sgx-step.
yes, I did all that, but still not work
from sgx-step.
Without more information, I can only guess what's going wrong on your system. I suspect you may have another SGX-SDK installed earlier through apt or so that may interfere and leave global symbolic links and make that the default path will not find the patched SDK under /opt/intel/. You should check this and/or provide more details. Particularly, try finding out which dynamic library is being used by ldd
and then check whether or not it has the patches. It turns out on my system I use a patched /usr/lib/libsgx_urts.so
by default. You can manually override the desired library location using the LD_LIBRARY_PATH
environment variable, as shown below
jo@breuer:~/sgx-step-fresh/app/aep-redirect$ ldd ./app
linux-vdso.so.1 (0x00007ffebeb60000)
libsgx_urts.so => /usr/lib/libsgx_urts.so (0x00007f8330ee2000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f8330cc3000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f83308d2000)
libsgx_enclave_common.so.1 => /usr/lib/libsgx_enclave_common.so.1 (0x00007f83306cd000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f83304c9000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f8330140000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f832ff28000)
/lib64/ld-linux-x86-64.so.2 (0x00007f833130f000)
libsgx_launch.so.1 => /usr/lib/libsgx_launch.so.1 (0x00007f832fcdd000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f832f93f000)
libprotobuf.so.10 => /usr/lib/x86_64-linux-gnu/libprotobuf.so.10 (0x00007f832f4e6000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f832f2c9000)
jo@breuer:~/sgx-step-fresh/app/aep-redirect$ nm -g /usr/lib/libsgx_urts.so | grep aep
000000000000c070 T sgx_get_aep
000000000000c090 T sgx_set_aep
jo@breuer:~/sgx-step-fresh/app/aep-redirect$ LD_LIBRARY_PATH=/opt/intel/sgxsdk/lib64/ ldd ./app
linux-vdso.so.1 (0x00007ffc2d69c000)
libsgx_urts.so => /opt/intel/sgxsdk/lib64/libsgx_urts.so (0x00007fa3dce26000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fa3dcc07000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fa3dc816000)
/lib64/ld-linux-x86-64.so.2 (0x00007fa3dd231000)
jo@breuer:~/sgx-step-fresh/app/aep-redirect$ nm -g /opt/intel/sgxsdk/lib64/libsgx_urts.so | grep aep
0000000000000ab6 T sgx_get_aep
0000000000000acd T sgx_set_aep
from sgx-step.
Aha, you are right. LLD doesn't link to /opt../libsgx_urts.so. Instead, it links to /user/.../libsgx_urts.so, and this one doesn't have sgx_get_aep.
Thanks for your help.
from sgx-step.
glad it got figured out, closing this issue ^^
from sgx-step.
Related Issues (20)
- 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 HOT 2
- 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
- Compatibility with Linux 6.5 and later HOT 5
- [load_qe ../qe_logic.cpp:697] Error, call sgx_create_enclave QE fail [load_ Failed to load QE3: 0x4004 HOT 1
- Add x2APIC support HOT 1
- memcmp example fails to find the secret HOT 2
- SIGSEGV right after launch HOT 2
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.