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

Parse Error while using fixed array in ECALL



I'm enthusiastic about Intel SGX and I am trying to implement a simple auction program in SGX Enclave. While passing an array to the function(ECALL), I'm getting a parse error. Someone please help me out and suggest me how to pass array to the function(ECALL).

0 Kudos
1 Reply

Attribute: count
The count attribute is used to indicate a block of sizeof element pointed by
the pointer in bytes used for copy depending on the direction attribute. The
count and size attribute modifiers serve the same purpose. The number of
bytes copied by the trusted bridge or trusted proxy is the product of the
count and the size of the data type to which the parameter points. The count
may be either an integer constant or one of the parameters to the function.
Intel® Software Guard Extensions Developer Reference for Linux* OS
- 51 -
The size and count attribute modifiers may also be combined. In this case,
the trusted edge-routine will copy a number of bytes that is the product of
the count and size parameters (size*count) specified in the function declaration in the EDL file.
trusted {
// Copies cnt * sizeof(int) bytes
public void test_count([in, count=cnt] int* ptr, unsigned
// Copies cnt * len bytes
public void test_count_size([in, count=cnt, size=len] int*
ptr, unsigned cnt, size_t len);


Please refer the developer reference: Enclave Definition Language Syntax. please refer the doc Intel_SGX_Developer_Reference_Linux_2.8_Open_Source.pdf.  Here is the download linker

0 Kudos