optee: share TA binaries through a global UUID map - #1142
Open
Praveen K Paladugu (praveen-pk) wants to merge 9 commits into
Open
optee: share TA binaries through a global UUID map#1142Praveen K Paladugu (praveen-pk) wants to merge 9 commits into
Praveen K Paladugu (praveen-pk) wants to merge 9 commits into
Conversation
Sangho Lee (sangho2)
left a comment
Contributor
There was a problem hiding this comment.
Thanks for your effort! Yes, we should differentiate shim-global from runner-global. I left some comments/suggestions.
Praveen K Paladugu (praveen-pk)
force-pushed
the
global_ta_uuid
branch
2 times, most recently
from
August 11, 2026 19:55
7881679 to
321b69f
Compare
Contributor
Author
|
I confirmed that static TAs continue to function with this change. |
Praveen K Paladugu (praveen-pk)
force-pushed
the
global_ta_uuid
branch
from
August 12, 2026 19:54
2b68f9f to
66339be
Compare
Sangho Lee (sangho2)
approved these changes
Aug 12, 2026
Sangho Lee (sangho2)
left a comment
Contributor
There was a problem hiding this comment.
Looks good to me. Please take a look at the new comment.
Feel free to drop "[Draft]" from the title if it is ready to merge and replace optee with OP-TEE or OP-TEE shim. Thanks!
Move the TA UUID-to-binary map out of individual shim instances so TA binaries can be registered once and reused across instances. This global map is required to support Dyanamically Loading TAs and using them across sessions. Protect the map with a spin-based RwLock and expose shim methods for storing and retrieving TA binaries. Register the LVBS runner's embedded TA during BSP initialization and resolve new TA instances through the shared map. Signed-off-by: Praveen K Paladugu <prapal@linux.microsoft.com>
Restore TA_BINARIES, to keep supporting mulitple embedded binaries Signed-off-by: Praveen K Paladugu <prapal@linux.microsoft.com>
TaUuidMap is already sychronized with an interior RwLock. An Arc wrapping adds un-necessary reference counting overhead. Signed-off-by: Praveen K Paladugu <prapal@linux.microsoft.com>
This drops the need for deep copy while getting a binary. Signed-off-by: Praveen K Paladugu <prapal@linux.microsoft.com>
Now references to ta_uuid_map in shim object will be scoped to the lifetime of the shim object. Signed-off-by: Praveen K Paladugu <prapal@linux.microsoft.com>
Signed-off-by: Praveen K Paladugu <prapal@linux.microsoft.com>
Praveen K Paladugu (praveen-pk)
force-pushed
the
global_ta_uuid
branch
from
August 13, 2026 18:38
66339be to
42d35c3
Compare
ldelf stores TA in the UUID Map while loading it. Drop this redundant step. Signed-off-by: Praveen K Paladugu <prapal@linux.microsoft.com>
Praveen K Paladugu (praveen-pk)
force-pushed
the
global_ta_uuid
branch
2 times, most recently
from
August 13, 2026 21:22
e41b33d to
e681468
Compare
Drop ta_bin arg in ldelf casls from Linux Userland. Signed-off-by: Praveen K Paladugu <prapal@linux.microsoft.com>
Signed-off-by: Praveen K Paladugu <prapal@linux.microsoft.com>
Praveen K Paladugu (praveen-pk)
force-pushed
the
global_ta_uuid
branch
from
August 13, 2026 21:30
e681468 to
d25d45f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Move the TA UUID-to-binary map out of individual shim instances so TA binaries can be registered once and reused across instances. This global map is required to support Dyanamically Loading TAs and using them across sessions.
Protect the map with a spin-based RwLock and expose shim methods for storing and retrieving TA binaries.
Register the LVBS runner's embedded TA during BSP initialization and resolve new TA instances through the shared map.