Skip to content

Commit

Permalink
core: fix access conflict status in rpmb fs that panics TA
Browse files Browse the repository at this point in the history
According to the GPD TEE Internal Core API specs, when creating
an existing persistent object without the overwrite flag, the OS
should return a TEE_ERROR_ACCESS_CONFLICT status.

This change fixes the RPMB FS layer. An effect of this correction
is that before this change, OS panicked TAs that requested such
forbidden object creation, as a TEE_ERROR_BAD_PARAMETERS return
value is considered by the API as an unexpected status.

Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU)
  • Loading branch information
etienne-lms committed Nov 7, 2017
1 parent 789e38a commit 19b958f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/tee/tee_rpmb_fs.c
Original file line number Diff line number Diff line change
Expand Up @@ -2251,7 +2251,7 @@ static TEE_Result rpmb_fs_rename_internal(struct tee_pobj *old,
res = read_fat(fh_new, NULL);
if (res == TEE_SUCCESS) {
if (!overwrite) {
res = TEE_ERROR_BAD_PARAMETERS;
res = TEE_ERROR_ACCESS_CONFLICT;
goto out;
}

Expand Down

0 comments on commit 19b958f

Please sign in to comment.