Currently we have two proposals for custom RPC from a user TA
[1] #3270 (core: add a new pta to support any ree service for TA)
[2] #3292 (Generic RPC Support)
After a quick look I hope that the summary below isn't too far from the truth.
[1] routes the custom RPC to tee-supplicant which then either can call into a dynamic library or pass messages to another user space process.
[2] routes the custom RPC to a separate thread in the calling client.
With [1] the TA has to open a session to the service in normal world before it can start sending requests.
With [2] there's no need to open a new session, instead the requests are sent back using the clients session.
[2] requires changes in the kernel driver, in the OP-TEE part and in the framework, there's even changes in (extensions to) the user space API. [1] currently doesn't need any kernel changes.
In the original use case for which [2] was defined it seems to be a must to be able to receive and process the RPCs from the user TA in the calling process. I've also heard from other companies ideas about a similar way of receiving the RPCs from the TA. For [1] I don't know why this particular way of receiving the RPCs was selected.
Over all I'm more keen on [2] than [1] for the following reasons:
- The RPCs are something between the client and the TA only, no need to make modifications in tee-supplicant for each client/TA.
EDIT: Past [1] tee-supplicant will not be changed. However, it will have become dynamically extendable to execute code that is somewhat client and/or TA specific. With [2] the code would normally be contained in the client.
- Less complicated from TA point of view since the session already is established (no need for REE open and close session)
- It seems that with [2] the building blocks to implement something like [1] are available, but not the other way around.
I would of course like to see a solution that can support all use cases that has prompted these two pull requests. Regardless of which solution we'll start from there's bound to be further changes.
What does others think, @jforissier, @etienne-lms, @jbech-linaro?
@divneil, @HernanGatta, comments?
Currently we have two proposals for custom RPC from a user TA
[1] #3270 (core: add a new pta to support any ree service for TA)
[2] #3292 (Generic RPC Support)
After a quick look I hope that the summary below isn't too far from the truth.
[1] routes the custom RPC to tee-supplicant which then either can call into a dynamic library or pass messages to another user space process.
[2] routes the custom RPC to a separate thread in the calling client.
With [1] the TA has to open a session to the service in normal world before it can start sending requests.
With [2] there's no need to open a new session, instead the requests are sent back using the clients session.
[2] requires changes in the kernel driver, in the OP-TEE part and in the framework, there's even changes in (extensions to) the user space API. [1] currently doesn't need any kernel changes.
In the original use case for which [2] was defined it seems to be a must to be able to receive and process the RPCs from the user TA in the calling process. I've also heard from other companies ideas about a similar way of receiving the RPCs from the TA. For [1] I don't know why this particular way of receiving the RPCs was selected.
Over all I'm more keen on [2] than [1] for the following reasons:
EDIT: Past [1] tee-supplicant will not be changed. However, it will have become dynamically extendable to execute code that is somewhat client and/or TA specific. With [2] the code would normally be contained in the client.
I would of course like to see a solution that can support all use cases that has prompted these two pull requests. Regardless of which solution we'll start from there's bound to be further changes.
What does others think, @jforissier, @etienne-lms, @jbech-linaro?
@divneil, @HernanGatta, comments?