Skip to content

Commit

Permalink
optee: remove registered shm argument size check
Browse files Browse the repository at this point in the history
We don't need to return error if output shm size is larger than
allocated buffer. This is pefrectly fine. In this way TEE or TA
reports that it needs larger buffer (as described in
TEE Client API Specification v1.0, section 3.2.5.).

Signed-off-by: Volodymyr Babchuk <[email protected]>
Tested-by: Jerome Forissier <[email protected]> (HiKey)
Reviewed-by: Joakim Bech <[email protected]>
  • Loading branch information
lorc authored and jenswi-linaro committed Oct 27, 2017
1 parent c7f82a0 commit 7e7a654
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions drivers/tee/optee/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,14 +116,6 @@ int optee_from_msg_param(struct tee_param *params, size_t num_params,
p->u.memref.shm_offs = mp->u.rmem.offs;
p->u.memref.shm = shm;

/* Check that the memref is covered by the shm object */
if (p->u.memref.size) {
size_t o = p->u.memref.shm_offs +
p->u.memref.size;

if (o > tee_shm_get_size(shm))
return -EINVAL;
}
break;

default:
Expand Down

0 comments on commit 7e7a654

Please sign in to comment.