Skip to content

Commit

Permalink
core: fix offset in assign_mobj_to_param_mem()
Browse files Browse the repository at this point in the history
Prior to this patch assign_mobj_to_param_mem() stored the offset
supplied with a non-contiguous buffer in mem->offs. Since that offset
already is stored inside the resulting MOBJ that offset is added twice.
This patch fixes this by initializing mem->offs to 0 instead.

Signed-off-by: Jens Wiklander <[email protected]>
  • Loading branch information
jenswi-linaro committed Jun 27, 2018
1 parent 0d39a8d commit 28587d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/arch/arm/tee/entry_std.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ static TEE_Result assign_mobj_to_param_mem(const paddr_t pa, const size_t sz,
false);
if (!mem->mobj)
return TEE_ERROR_BAD_PARAMETERS;
mem->offs = pa & SMALL_PAGE_MASK;
mem->offs = 0;
mem->size = sz;
return TEE_SUCCESS;
}
Expand Down

0 comments on commit 28587d6

Please sign in to comment.