Comments (10)
did I miss something ?
Definitely: error checking ;)
Please add and then check where exactly it's failing.
from graphene.
I add the debug log, It can ensure that it's failed, when run to int** p2D=malloc2DArray(r,c);
I also try to add the implementation of int **malloc2DArray(int r,int c)
in the graphene/Pal/src/host/Linux-SGX/enclave_pf.c directly ,it could work. But I can't work when a split up the code to Separate file fo testmalloc.c.
This confuses me,could you give me some advice? did I need change some code in the makefile ?
from graphene.
Sorry, but I didn't understand your whole comment. Could you clean up/reword it?
from graphene.
Why are you adding this malloc2DArray()
? What happens if you just add log_debug("after malloc2Darry\n");
? Does Graphene-SGX then work all the time, without exceptions?
Why do you use the PPML example? The PPML example is extremely big and complex. You should start with a small test, preferrably written in C. This would give you much better control of what the application and Graphene are doing. Finally, you probably want to debug with GDB.
from graphene.
thanks for your reply @dimakuv
Actually,In my scene, all the data is be compressed to a zip file,then encrypt with wrapkey. I want to decrpyt the zip file and unzip to specify pretected directory when get the wrap key for apps. So that app like ppml could read the file directly and no need to unzip.
So, I want to add some code in int set_protected_files_key(const char* pf_key_hex)
to implement the function。
I try to port the zlib to Pal for unzip the file, but it's not work. when I run to unzip code, it will raise error as follow:
error: *** Unexpected exception occurred inside PAL at RIP = +0x00000047! ***
error: (untrusted PAL sent PAL event 0x2)
error: rax: 0x00000000 rcx: 0x7ffe43f95093 rdx: 0xff0f9a48 rbx: 0xfaadd4a0
rsp: 0xf2827a08 rbp: 0x00000003 rsi: 0x0000000a rdi: 0x0000000a
r8 : 0xfab1d3f7 r9 : 0xfefefefefefefeff r10: 0x00000000 r11: 0xfaafa67c
r12: 0xfa8a4c00 r13: 0x64cd7cf8 r14: 0x62c9b558 r15: 0xf2827f38
rflags: 0x00010202 rip: 0xfaae1047
debug: DkProcessExit: Returning exit code 1
is there any limits when add code to Pal ?
or for my scene, did you have any suggestion for me ? have any other solution that could decrypt the zip file and unzip it before app running.
from graphene.
is there any limits when add code to Pal ?
No, no limits. As long as the added code is correct, Graphene happily works and doesn't throw exceptions.
or for my scene, did you have any suggestion for me ? have any other solution that could decrypt the zip file and unzip it before app running.
Why are you trying to do this at the level of Graphene source code? Your scenario sounds like a change to TensorFlow scripts, not a change of internal Graphene workings.
from graphene.
No, no limits. As long as the added code is correct, Graphene happily works and doesn't throw exceptions.
Ok, I will check my code again.
I submit a commit to my persional rep later. If convenient, help me to review my code.
Why are you trying to do this at the level of Graphene source code? Your scenario sounds like a change to TensorFlow scripts, not a change of internal Graphene workings.
because we want to suitable for any apps which developed by any language and framework.
from graphene.
because we want to suitable for any apps which developed by any language and framework.
You could achieve this in a less intrusive way. I would recommend the premain way: #2347. In this way, your tiny helper program does your "decrypt the zip file" logic and then execve
s the actual application (which can be any language/framework).
from graphene.
Your solution is very excellent, I'll have a try to see if it fits my scene exactly.
from graphene.
@dimakuv I take your suggestion to put the unzip logic to premain, and it worked well.
Thanks again, Close.
from graphene.
Related Issues (20)
- Data transmission error with Python gRPC running in graphene HOT 9
- Huge performance drop when running pytorch training with graphene-sgx HOT 26
- Graphene-SGX: Syscalls wakes up early/prematurely on Server Machines HOT 12
- BUG() triggered during vfork and clone HOT 15
- With Go program, inside a docker container, bind fails with permission denied error, invalid handle error. HOT 7
- Workloads (Redis, Curl, R) failing with Out of memory PAL error after new manifest syntax to define lists of SGX trusted files. HOT 7
- Unable to Sign the graphenized Docker image using gsc sign-image: HOT 5
- RFC: Trusted files metadata sideloading
- [Error:38]Function not implemented. multiprocessing in graphene HOT 7
- How to transmit variables between SGX and untrusted environments HOT 4
- Function not implemented (src/ip.cpp:563) in testing GSC container HOT 2
- [Examples] Python Example Stuck Without Any Error Message HOT 1
- ModuleNotFoundError: No module named 'graphenelibos' HOT 5
- web server use golang, QPS(queries per second) is very low HOT 4
- File Listener Based on INOTIFY Throws Error HOT 1
- Issue with libprotobuf version. HOT 1
- Issue in Cloud Deployment to AKS HOT 3
- Decimal type prone to float rounding error. HOT 1
- pytorch sample config for better performance 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 graphene.