Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
core: tee_svc.c: allow to pass non-NULL memref of size 0
Allow TAs to pass non-NULL memref of size zero to other TAs by changing the non-NULL pointer into a NULL one in such a case. GP TEE Internal Core API does not forbid such memref parameter [1] whereas the previous implementation generated a TEE_ERROR_BAD_PARAMETERS error code when converting such memref buffer pointer into a physical memory address. This change is specifically needed to allow a TA to forward a REE client memref for which GP TEE Client API explicitly allows such non-NULL address zero sized memref [2]. It also makes the TA implementation more flexible when dealing with its own memref. [1] TEE Internal Core API Specification – Public Release v1.3.1, §4.9.4 "Operation Parameters in the Internal Client API" Table 4-15: "Interpretation of params[i] on Entry to Internal Client API" [2] TEE Client API Specification v1.0, §4.5.4 TEEC_RegisterSharedMemory, paragraph "Implementers' Notes" Signed-off-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr> Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>
- Loading branch information