Using OCALL, I want to get a copy of C string that is dynamically created in untrusted memory into my enclave. Thus, I have to use [out, string]
attribute.
However, I cannot do that because I have to add [in]
attribute as well. The problem is that I really don't know the size of string and I don't want an overhead (that comes with [in]
) from unnecessary copying of string from enclave to untrusted memory every time I make OCALL.
My edl file:
enclave {
trusted {
public void ecall_open(void);
};
untrusted {
void ocall_get_string([out, string] char* str);
};
};
error: string/wstring/sizefunc should be used with an 'in' attribute
Why do I have to add [in]
attribute?
Is there a way to avoid this overhead?