GithubHelp home page GithubHelp logo

adombeck / python-sgx Goto Github PK

View Code? Open in Web Editor NEW
31.0 3.0 6.0 1.51 MB

Python interface to the SGX SDK

License: GNU General Public License v3.0

Makefile 10.99% Python 57.98% C 29.03% Shell 2.01%
sgx python

python-sgx's People

Contributors

adombeck avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

python-sgx's Issues

python-sgx is not compatible with your fork of sgx driver and graphene, could you update the fork of sgx driver and graohene?

Sorry, I test on Ubuntu 16.04.2, the current python-sgx is still not compatible with your fork of sgx driver and graphene, could you update the fork of sgx driver and graohene?
The latest graphene contains the compatible sgx driver. I think that you can fork and patch a newer graphene and sgx driver for more DL developers to use your project!
@adombeck Thank you very much!

I used your newly fored submodules, but python-sgx can not be built and installed successfully, the reasons illustrated as follows:
(1)In graphene/Pal/src/host/Linux-SGX/sgx-driver/link-intel-driver.py of your forked graphene
isgx = raw_input('Enter the Intel sgx driver derctory: ')
if os.path.exists(isgx + '/isgx.h'):
it should be if os.path.exists(isgx + '/sgx.h'): for your forked sgx driver
(2)For /home/chengzi/Documents/python-sgx/graphene/Pal/src/host/Linux-SGX/sgx-driver/gsgx.h
#include <isgx.h>
#include <isgx_arch.h>
#include <isgx_user.h>
delete "i" for head files as follows:
#include <sgx.h>
#include <sgx_arch.h>
#include <sgx_user.h>
(3)In ./graphene/Pal/src/host/Linux-SGX/sgx-driver/isgx_ksyms.h
//extern IMPORT_KSYM(isgx_enclave_release); //wrong
extern IMPORT_KSYM(sgx_encl_release); //correct
(4) ./graphene/Pal/src/host/Linux-SGX/sgx-driver/gsgx_main.c:202:and 220: error: ‘isgx_enclave_release’ undeclared here (not in a function)
IMPORT_KSYM(isgx_enclave_release); //wrong
IMPORT_KSYM(sgx_encl_release); //correct
//if ((ret = LOOKUP_KSYM(isgx_enclave_release))) //wrong
if ((ret = LOOKUP_KSYM(sgx_encl_release))) //correct
(5)The error is occured when run sudo ./load.sh
Enter the Intel sgx driver derctory: /home/chengzi/Documents/python-sgx/linux-sgx-driver
linux-sgx-driver -> /home/chengzi/Documents/python-sgx/linux-sgx-driver
make -C /lib/modules/4.10.0-42-generic/build SUBDIRS=/home/chengzi/Documents/python-sgx/graphene/Pal/src/host/Linux-SGX/sgx-driver CFLAGS_MODULE="-DDEBUG -g -O0" modules
make[1]: Entering directory '/usr/src/linux-headers-4.10.0-42-generic'
Building modules, stage 2.
MODPOST 1 modules
make[1]: Leaving directory '/usr/src/linux-headers-4.10.0-42-generic'
insmod: ERROR: could not insert module graphene-sgx.ko: Invalid parameters

(6) FATAL: when run ./python.manifest.sgx scripts/helloworld.py , and CPU 100%
./python.manifest.sgx scripts/helloworld.py
manifest file: file:python.manifest.sgx
enclave created:
base: 0x0000000000000000
size: 0x0000000010000000
attr: 0x0000000000000007
xfrm: 0x0000000000000007
ssaframesize: 1
isvprodid: 0x00000000
isvsvn: 0x00000000
adding page to enclave: 000000000ffff000 [REG:R--] (manifest) measured
adding pages to enclave: 000000000fff6000-000000000fffe000 [REG:RW-] (ssa)
adding pages to enclave: 000000000fff1000-000000000fff5000 [TCS:---] (tcs)
adding pages to enclave: 000000000ffec000-000000000fff0000 [REG:RW-] (tls)
adding pages to enclave: 000000000ffdb000-000000000ffeb000 [REG:RW-] (stack)
adding pages to enclave: 000000000ffca000-000000000ffda000 [REG:RW-] (stack)
adding pages to enclave: 000000000ffb9000-000000000ffc9000 [REG:RW-] (stack)
adding pages to enclave: 000000000ffa8000-000000000ffb8000 [REG:RW-] (stack)
adding pages to enclave: 000000000bd76000-000000000bda4000 [REG:R-X] (code) measured
adding page to enclave: 000000000bfa4000 [REG:RW-] (data) measured
adding pages to enclave: 000000000bfa5000-000000000ffa7000 [REG:RW-] (bss)
adding pages to enclave: 0000000000400000-00000000006e9000 [REG:RWX] (code) measured
adding pages to enclave: 00000000008e8000-0000000000961000 [REG:RW-] (data) measured
adding pages to enclave: 0000000000961000-0000000000984000 [REG:RW-] (bss)
adding pages to enclave: 0000000000984000-000000000bd75000 [REG:RWX] (free)
adding pages to enclave: 0000000000010000-0000000000400000 [REG:RWX] (free)
enclave initializing:
enclave id: 0x000000000ffff000
enclave hash: 3a 24 14 cd 9f 77 2f 78 f4 6b 70 a0 a2 b2 66 ca 3f 8e 21 ce e5 32 05 8a 4b e4 1d f6 18 e3 a5 90
Get sealing key: e72f44bc654bd7d4161fe920639cce5
enclave (software) key hash: b4bbec653d49ce4b0cc48c45198807ff7f0a31ea279359f673e1ed9836f487f
trusted: [1] 2cdf459db6d2a82d87fd8f65cb28547bfe752d6763f6a91a52158feebb4573a7 file:/usr/bin/python
trusted: [2] a6048640494d327383021ff1b6527d8fd213e2a010e7094aad686bced1943f09 file:../../../../../Runtime/libsysdb.so
trusted: [16] e5448a9de1c4675ceb16278bcb46fbd6b0f797636096c144ac97c897a104dedd file:hosts
trusted: [17] 7e8ad76e0d200e93918ca2e93c99ff8ecd02071953bf1479819db3ac0dbb6d07 file:resolv.conf
trusted: [18] 76a5771adee7b9f36c7ae66eae78d72f325557500269107f2d98a7e3560a1808 file:gai.conf
allowed: file:/usr/lib/python2.7
allowed: file:scripts

sgx-ra-manager doesn't work

Hi,
After I compiled and did everything I tried running the sgx-ra-manager and it seems like it only runs the manifest and not the python file itself.
I opened an issue in graphene: gramineproject/graphene#203

If anyone here can help, I'll be glad :)

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.