Intel® Software Guard Extensions (Intel® SGX)
Discussion board focused on hardware-based isolation and memory encryption to provide extended code protection in solutions.

Can OCALLs have a return value?

barratt__samathy
Beginner
733 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
733 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

0 Kudos
1 Reply
Juan_d_Intel
Employee
734 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.

0 Kudos
Reply