libteec: Move OP-TEE defined fields into an imp struct#349
libteec: Move OP-TEE defined fields into an imp struct#349JLLinaro wants to merge 1 commit intoOP-TEE:masterfrom
Conversation
|
The automatic tests fail but that has been solved in the following pull request OP-TEE/optee_test#684 |
|
This LGTM, but as mentioned in #348, it changes the layout of |
|
This pull request has been marked as a stale pull request because it has been open (more than) 30 days with no activity. Remove the stale label or add a comment, otherwise this pull request will automatically be closed in 5 days. Note, that you can always re-open a closed issue at any time. |
|
This pull request has been marked as a stale pull request because it has been open (more than) 30 days with no activity. Remove the stale label or add a comment, otherwise this pull request will automatically be closed in 5 days. Note, that you can always re-open a closed issue at any time. |
|
@JLLinaro would you mind updating this PR so we can merge it? |
|
@jenswi-linaro version is now updated to 2.0.0 |
|
We need |
etienne-lms
left a comment
There was a problem hiding this comment.
Acked-by: Etienne Carriere <etienne.carriere@foss.st.com> for commit
"libteec: Move OP-TEE defined fields into an imp struct"
(with indentation issue fixed)
| bool dummy; | ||
| uint8_t flags; | ||
| } internal; | ||
| } imp; |
|
Please squash the second commit into the first one (and keep subject "libteec: Move OP-TEE defined fields into an imp struct"). |
dbe8282 to
c004dbb
Compare
|
There is a conflict, would you please rebase onto master, and also add the Acked-by: tags from Etienne and me? |
c004dbb to
b3c0606
Compare
| /* Implementation defined */ | ||
| TEEC_Context *ctx; | ||
| uint32_t session_id; | ||
| struct{ |
There was a problem hiding this comment.
Please add a space ( ), between struct and {.
|
Ping @JLLinaro |
| union { | ||
| bool dummy; | ||
| uint8_t flags; | ||
| } internal; |
There was a problem hiding this comment.
Is the dummy field still needed following this change? dummy was introduced in 4f3d4cb not to break the ABI. Here we are breaking it anyway, so while at it, I suggest some clean up:
| union { | |
| bool dummy; | |
| uint8_t flags; | |
| } internal; | |
| uint32_t flags; |
N.B.: If there is a wish to keep more flag bits for future use, then just declare flags as uint32_t (the structure will be padded anyway, so you will not make it any bigger).
There was a problem hiding this comment.
I agree. uint32_t flags; LGTM.
|
This pull request has been marked as a stale pull request because it has been open (more than) 30 days with no activity. Remove the stale label or add a comment, otherwise this pull request will automatically be closed in 5 days. Note, that you can always re-open a closed issue at any time. |
|
@JLLinaro any chance this could make it into the next release? (-rc1 is in 3 days). On the other hand, I am now wondering if this is a good idea. Who cares about this? Sure it is in the spec, but what difference does it make? Apps are not supposed to manipulate the |
|
The answer to your question is in #348 |
Ah, yes. It would be nice to mention in the commit description that the |
|
This pull request has been marked as a stale pull request because it has been open (more than) 30 days with no activity. Remove the stale label or add a comment, otherwise this pull request will automatically be closed in 5 days. Note, that you can always re-open a closed issue at any time. |
|
I think we need to explain to @JLLinaro that it's going to cost him a beer each time github reminds us that it's not done yet. :-) |
|
This pull request has been marked as a stale pull request because it has been open (more than) 30 days with no activity. Remove the stale label or add a comment, otherwise this pull request will automatically be closed in 5 days. Note, that you can always re-open a closed issue at any time. |
6e9f710 to
7d2763f
Compare
| union { | ||
| uint32_t flags; | ||
| } internal; |
There was a problem hiding this comment.
The union should not be needed, just make this uint32_t flags;.
GlobalPlatform TEE Client API Specification v1.0 specifies that the structs TEEC_Context, TEEC_Session, TEEC_SharedMemory, and TEEC_Operation shall have a user defined struct named imp. In OP-TEE the struct is not there and instead the user defined fields are declared directly in the top structs. This commit introduces the imp struct to better support using different implementations. The imp fields now represent the implementation defined parts of the structs that was previously declared directly in the top struct. All previously available parameters are preserved in the imp struct. The updated version of the imp structure makes it easier to create a binding for Rust. Adding the missing imp struct to the structs in OP-TEE is an ABI breakage which requires a version major update of libteec as explained by Jerome Forissier. Link: OP-TEE#348 Reported-by: Tom Hebb <tommyhebb@gmail.com> Signed-off-by: Julianus Larson <julianus.larson@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@foss.st.com> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Fixed spacing Signed-off-by: Julianus Larson <julianus.larson@linaro.org>
7d2763f to
ea8d960
Compare
|
Merged manually (with commit message slightly edited). |
GlobalPlatform TEE Client API Specification v1.0 specifies that the structs TEEC_Context, TEEC_Session, TEEC_SharedMemory, and TEEC_Operation shall have a user defined struct named imp. In OP-TEE the struct is not there and instead the user defined fields are declared directly in the top structs.
This commit introduces the imp struct to better support using different implementations. The imp fields now represent the implementation defined parts of the structs that was previously declared directly in the top struct. All previously available parameters are preserved in the imp struct.
Link: #348
Reported-by: Tom Hebb tommyhebb@gmail.com