Coder Social home page Coder Social logo

Comments (10)

jovanbulck avatar jovanbulck commented on June 22, 2024

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.

jovanbulck avatar jovanbulck commented on June 22, 2024

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.

yashwanthresham avatar yashwanthresham commented on June 22, 2024

1
2
3

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 .
4

from sgx-step.

jovanbulck avatar jovanbulck commented on June 22, 2024

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.

yashwanthresham avatar yashwanthresham commented on June 22, 2024

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 "" .
27 april
27_ap

from sgx-step.

jovanbulck avatar jovanbulck commented on June 22, 2024

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.

yashwanthresham avatar yashwanthresham commented on June 22, 2024

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.

jovanbulck avatar jovanbulck commented on June 22, 2024

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.

yashwanthresham avatar yashwanthresham commented on June 22, 2024

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.

jovanbulck avatar jovanbulck commented on June 22, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.