Comments (10)
Hm, there is clearly something wrong with linking to the correct patched URTS SGX library. It seems, however, you are trying several things at once.
Instead of invoking through make run, try directly invoking ./app with LD_LIBRARY_PATH and ldd to figure out which versions you are using. Perhaps try:
LD_LIBRARY_PATH=/usr/lib ./app
Also have a look at this recent similar issue: #43
from sgx-step.
it appears from the screenshots your default urts is under /lib/x86_64-linux-gnu/
, and as far as I see, you didn't nm
grep
this one, so it is probably from another non-patched SDK you installed there(?) In general, it is easiest if you remove/purge any other SDKs so only the patched one is left -- if not, you'll have to manually LD_LIBRARY_PATH
the correct path (under psw not sdk, otherwise you'll get the first error in your screenshot as discussed in #43)
hope it helps! let me know if/how your figure it out!
from sgx-step.
I have reinstalled sgxsdk and psw. and tried the above commands. Also when i try to load the /.install_sgx_driver.sh it gives me error .
from sgx-step.
So now it seems everything compiles well, that's good already!
You get a runtime error because the driver cannot be loaded -- this is a known issue in the linux-sgx-driver on recent Linux kernels, see #42
Did you pull the latest sgx-step version? Please note I recently rebased SGX-Step to use version v2.14 of the driver (plus also the latest linux-sgx SDK v2.16).
So hopefully everything should be fine if you pull the latest version of the sgx-step repo and do git submodule update
Let me know if it works out!
from sgx-step.
i have pulled the recent version of sgxstep and installed the driver downloaded from the https://download.01.org/intel-sgx/sgx-linux/2.16/distro/ubuntu20.04-server/ link.
When i try to run ./install_sgx_driver.sh it gives "" modprobe : isgx cannot be performed "" .
from sgx-step.
It seems like you're using the latest (upstream) Linux kernel driver. This is currently not supported on SGX-Step, see issue #39
Please make sure to build and use the linux-sgx-driver
as documented in the README.
Hope it helps!
from sgx-step.
can you please explain what to be done for latest driver.
i have dowgrading the linux driver to 5.8.* it also gives error "isgx operation not permitted"
from sgx-step.
Not sure what goes wrong. I cannot help if you are not more specific, please provide full detailed commands and terminal output (to be more readible: best to copy-paste here instead of screenshots)
The process for installing the out-of-tree Intel SGX driver is detailed here:
https://github.com/jovanbulck/sgx-step#1-build-and-load-devsgx-step
The latest version of the out-of-tree linux-sgx-driver is v2.14 so not 5.8.*, not sure what you are using.
from sgx-step.
yashwanth@yashwanth-ROG-Strix-G531GD-G531GD:~/sgx-step/kernel$ uname -r
5.8.0-63-generic
Above is the linux kernel driver version , not the sgx driver.
yashwanth@yashwanth-ROG-Strix-G531GD-G531GD:~/sgx-step/kernel$ ./install_SGX_driver.sh
make -C /lib/modules/5.8.0-63-generic/build M=/home/yashwanth/sgx-step/kernel/linux-sgx-driver modules
make[1]: Entering directory '/usr/src/linux-headers-5.8.0-63-generic'
CC [M] /home/yashwanth/sgx-step/kernel/linux-sgx-driver/sgx_main.o
CC [M] /home/yashwanth/sgx-step/kernel/linux-sgx-driver/sgx_page_cache.o
CC [M] /home/yashwanth/sgx-step/kernel/linux-sgx-driver/sgx_ioctl.o
CC [M] /home/yashwanth/sgx-step/kernel/linux-sgx-driver/sgx_vma.o
CC [M] /home/yashwanth/sgx-step/kernel/linux-sgx-driver/sgx_util.o
CC [M] /home/yashwanth/sgx-step/kernel/linux-sgx-driver/sgx_encl.o
CC [M] /home/yashwanth/sgx-step/kernel/linux-sgx-driver/sgx_encl2.o
LD [M] /home/yashwanth/sgx-step/kernel/linux-sgx-driver/isgx.o
MODPOST /home/yashwanth/sgx-step/kernel/linux-sgx-driver/Module.symvers
CC [M] /home/yashwanth/sgx-step/kernel/linux-sgx-driver/isgx.mod.o
LD [M] /home/yashwanth/sgx-step/kernel/linux-sgx-driver/isgx.ko
make[1]: Leaving directory '/usr/src/linux-headers-5.8.0-63-generic'
modprobe: ERROR: could not insert 'isgx': Operation not permitted
yashwanth@yashwanth-ROG-Strix-G531GD-G531GD:~/sgx-step/kernel$ make clean load
make -C /lib/modules/5.8.0-63-generic/build M=/home/yashwanth/sgx-step/kernel clean
make[1]: Entering directory '/usr/src/linux-headers-5.8.0-63-generic'
CLEAN /home/yashwanth/sgx-step/kernel/Module.symvers
make[1]: Leaving directory '/usr/src/linux-headers-5.8.0-63-generic'
sudo rmmod sgx-step.ko || true
rmmod: ERROR: Module sgx_step is not currently loaded
make -C /lib/modules/5.8.0-63-generic/build M=/home/yashwanth/sgx-step/kernel modules
make[1]: Entering directory '/usr/src/linux-headers-5.8.0-63-generic'
CC [M] /home/yashwanth/sgx-step/kernel/sgxstep.o
/home/yashwanth/sgx-step/kernel/sgxstep.c: In function ‘sgx_step_ioctl_edbgrd’:
/home/yashwanth/sgx-step/kernel/sgxstep.c:99:5: warning: ISO C90 forbids variable length array ‘buf’ [-Wvla]
99 | uint8_t buf[data->len];
| ^~~~~~~
/home/yashwanth/sgx-step/kernel/sgxstep.c: In function ‘sgx_step_get_pt_mapping’:
/home/yashwanth/sgx-step/kernel/sgxstep.c:148:14: warning: #warning 5-level page tables currently not supported by SGX-Step [-Wcpp]
148 | #warning 5-level page tables currently not supported by SGX-Step
| ^~~~~~~
/home/yashwanth/sgx-step/kernel/sgxstep.c:149:14: warning: #warning unfolding dummy p4d; try rebooting with no5lvl
kernel parameter if needed [-Wcpp]
149 | #warning unfolding dummy p4d; try rebooting with no5lvl
kernel parameter if needed
| ^~~~~~~
LD [M] /home/yashwanth/sgx-step/kernel/sgx-step.o
MODPOST /home/yashwanth/sgx-step/kernel/Module.symvers
CC [M] /home/yashwanth/sgx-step/kernel/sgx-step.mod.o
LD [M] /home/yashwanth/sgx-step/kernel/sgx-step.ko
make[1]: Leaving directory '/usr/src/linux-headers-5.8.0-63-generic'
sudo modprobe -a isgx msr
modprobe: ERROR: could not insert 'isgx': Operation not permitted
make: *** [Makefile:23: load] Error 1
I have installed the linux sgx sdriver from the link provided in the readme of this repo.
from sgx-step.
Okay, the error is clearly the modprobe
command. Try googling the "Operation not permitted" modrpobe error message.
It seems like you booted your Linux kernel in "secure" mode, which by default doesn't allow to load unsigned kernel drivers.
Try disabling secure boot in UEFI or via these commands (in a root shell): https://unix.stackexchange.com/a/543580
from sgx-step.
Related Issues (20)
- Hyperlink of the approach to bypass devmem_is_allowed checks is unavailable HOT 3
- ./app: undefined symbol: sgx_get_aep HOT 8
- 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 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
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.