Replies: 1 comment
-
The basic answer is, this is following the documentation for Intel's official edger8r tool for defining C apis for an enclave. This is basically C code with a few extra keywords and these [...] annotations, which are used in code gen but don't become part of the C API. edger8r is going to take the above and generate code for a C API: sgx_status_t ingest_enclave_call(const uint8_t* inbuf,
size_t inbuf_len,
uint8_t *outbuf,
size_t outbuf_len,
size_t* outbuf_used,
uint64_t* outbuf_retry_id); with all the [...] and such removed. Here, Possibly, the
This is not telling the C compiler that You can read more about the EDL file syntax in the Intel edger8r tool documentation. |
Beta Was this translation helpful? Give feedback.
-
I was hoping someone could shed clarity on how mobilecoin ensures pointer alignment with ecalls and ocalls. What guarantees correct alignment; are there any relevant compilation flags etc.
In this example, for instance,
outbuf_used
will be misaligned ifoutbuf
isn't padded resulting in a panic. Is there some magic somewhere to ensure this aligns correctly? It's the case that every[in, size=inbuf_len] const uint8_t*
and every[in, string] const char*
can cause misalignment is it not? Would love any clarity on how alignment is guaranteed hereBeta Was this translation helpful? Give feedback.
All reactions