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

TEE_SetTAPersistentTime() is not persistent accross reboots #4577

Open
jforissier opened this issue Apr 27, 2021 · 3 comments
Open

TEE_SetTAPersistentTime() is not persistent accross reboots #4577

jforissier opened this issue Apr 27, 2021 · 3 comments
Labels

Comments

@jforissier
Copy link
Contributor

The TEE Internal Core API specification for function TEE_SetTAPersistentTime() mentions:

The modification is atomic and persistent across device reboots.

The current implementation keeps time offsets in memory and therefore does not comply to the requirement.

@jforissier jforissier added the bug label Apr 27, 2021
@Sadiq1811
Copy link
Contributor

Upon executing xtest 1006, i see the log from https://github.com/OP-TEE/optee_test/blob/master/ta/os_test/os_test.c#L577
is this log expected and related to this bug?

@Sadiq1811
Copy link
Contributor

Sadiq1811 commented Feb 23, 2022

Furthermore, after https://github.com/OP-TEE/optee_test/blob/master/ta/os_test/os_test.c#L592, TA time is printed as TA time 0.000.
It's a bit confusing because TEE_GetTAPersistentTime() returned with TEE_SUCCESS and isn't populating the time!!

@jforissier
Copy link
Contributor Author

@Sadiq1811 what you are observing is perfectly normal.

  • The first call to TEE_GetTAPersistentTime() returns TEE_ERROR_TIME_NOT_SET because TEE_SetTAPersistentTime() hasn't been called yet
  • The second call returns 0.000 because it happens immediately (less than one millisecond) after TEE_SetTAPersistentTime().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants