-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Description
Hi,
I just wanted to notice that dataSize and dataPosition informations are not restored when opening an object after closing it. I thought it has been fixed in this pull request but I still have the problem, maybe I'm missing something but I don't understand what it is, here is the code I use :
Code :
TEE_ObjectHandle object = TEE_HANDLE_NULL;
TEE_ObjectInfo info;
int object_id = 0;
char write_data[50] = {0};
uint32_t write_data_len = 50;
uint32_t flags = TEE_DATA_FLAG_ACCESS_WRITE | TEE_DATA_FLAG_ACCESS_READ;
TEE_CreatePersistentObject(TEE_STORAGE_PRIVATE, &object_id, sizeof(object_id),
flags, TEE_HANDLE_NULL, NULL, 0, &object);
TEE_WriteObjectData(object, write_data, write_data_len);
TEE_GetObjectInfo(object, &info);
MSG("Object data size : %zu and position : %zu", info.dataSize, info.dataPosition);
TEE_CloseObject(object);
TEE_OpenPersistentObject(TEE_STORAGE_PRIVATE, &object_id, sizeof(object_id),
flags, &object);
TEE_GetObjectInfo(object, &info);
MSG("Object data size : %zu and position : %zu", info.dataSize, info.dataPosition);
Output :
Object data size : 50 and position : 50
Object data size : 0 and position : 0
I'm using QEMU and optee_os master.
Thank you for your help.
Metadata
Metadata
Assignees
Labels
No labels