Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core: fix objectUsage handling for persistent objects #6505

Merged
merged 1 commit into from
Nov 30, 2023

Conversation

jenswi-linaro
Copy link
Contributor

Before this patch was the object usage field stored in the non-persistent part of an object handle, regardless of whether the storage object was persistent. This prevents updates to this field from being restored the next time the persistent object is opened. Updates to the field are also not replicated to eventual other open handles for the object. Fix this by storing the "usage" bits in a new obj_info_usage field in struct tee_pobj for persistent objects. Updates to the field are also written into secure storage to preserve the content the next time the object is opened.

Fixes: b010477 ("Open-source the TEE Core")
Closes: #6495

@jenswi-linaro
Copy link
Contributor Author

Fixing checkpatch complaint.

@jforissier
Copy link
Contributor

jforissier commented Nov 29, 2023

Fixes: b01047730e77 ("Open-source the TEE Core")

😮 quite a long-standing bug!

Reviewed-by: Jerome Forissier <[email protected]>

@jenswi-linaro
Copy link
Contributor Author

😮 quite a long-standing bug!

Yeah :-)

Tag applied.

Copy link
Contributor

@etienne-lms etienne-lms left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Acked-by: Etienne Carriere <[email protected]>

Before this patch was the object usage field stored in the
non-persistent part of an object handle, regardless of whether the
storage object was persistent. This prevents updates to this field from
being restored the next time the persistent object is opened. Updates to
the field are also not replicated to eventual other open handles for the
object. Fix this by storing the "usage" bits in a new obj_info_usage
field in struct tee_pobj for persistent objects. Updates to the field
are also written into secure storage to preserve the content the next
time the object is opened.

Fixes: b010477 ("Open-source the TEE Core")
Closes: OP-TEE#6495
Signed-off-by: Jens Wiklander <[email protected]>
Reviewed-by: Jerome Forissier <[email protected]>
Acked-by: Etienne Carriere <[email protected]>
@jenswi-linaro
Copy link
Contributor Author

Tag applied.

@jforissier jforissier merged commit 0f50ba5 into OP-TEE:master Nov 30, 2023
8 checks passed
@jenswi-linaro jenswi-linaro deleted the obj_usage branch November 30, 2023 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Modify obj usage for persistence object
3 participants