Intel® Software Guard Extensions (Intel® SGX)
Use hardware-based isolation and memory encryption to provide more code protection in your solutions.

Can OCALLs have a return value?

barratt__samathy
Beginner
373 Views

Hey,

I'm sure this question is answered somewhere in the documentation, but I havent managed to find it, and can't seem to impliment an ocall with a return value.

Is a ocall returning a value possible? Can one do it with pointers, or would that be blocked due to untrusted code attempting to acess trusted memory?

Thanks

0 Kudos
1 Solution
Juan_d_Intel
Employee
373 Views

OCALLs can return values. You may use pointers but you'll have to specify attributes if you want to copy data out from/back into the enclave.

For additional information, have a look at the Developer Reference, Enclave Development Basics / Calling Functions outside the Enclave and Enclave Development Basics / Enclave Definition Language Syntax / Pointers.

View solution in original post

1 Reply
Juan_d_Intel
Employee
374 Views

OCALLs can return values. You may use pointers but you'll have to specify attributes if you want to copy data out from/back into the enclave.

For additional information, have a look at the Developer Reference, Enclave Development Basics / Calling Functions outside the Enclave and Enclave Development Basics / Enclave Definition Language Syntax / Pointers.

Reply