Skip to content
Commit 73b4e490 authored by l00176142's avatar l00176142 Committed by Jérôme Forissier
Browse files

tee-supplicant: REE fs open file with O_SYNC flag



CFG_RPMB_FS=y and RPMB_EMU=0(use EMMC RPMB device). Power down when
writing file without the O_SYNC flag, dirf.db was cached by kernel,
some very old (more than two generations) version was in the file
system. If dirf.db and dirfile.db.hash (residing in RPMB) differ by
two versions, it will cause TEE_ERROR_SECURITY, and the file data
will lost.

Add O_SYNC flag in open file to fix this issue.
(fixed by Jens Wiklander)

Signed-off-by: default avatarJianhui Li <airbak.li@hisilicon.com>
Tested-by: Jianhui Li <airbak.li@hisilicon.com> (Hisilicon)
Reviewed-by: Jens Wiklander's avatarJens Wiklander <jens.wiklander@linaro.org>
parent 075c56ee
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment