You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@teaclave.apache.org by "ivila (via GitHub)" <gi...@apache.org> on 2026/10/16 03:13:09 UTC
[PR] optee-teec: fix ConnectionMethods login codes and Context/Session Send-safety [teaclave-trustzone-sdk]
ivila opened a new pull request, #328:
URL: https://github.com/apache/teaclave-trustzone-sdk/pull/328
Two related `optee-teec` fixes:
1. **Correct `ConnectionMethods` login-code mapping.**
`ConnectionMethods` previously derived its discriminants implicitly, but
`TEEC_LOGIN_APPLICATION`, `TEEC_LOGIN_USER_APPLICATION` and
`TEEC_LOGIN_GROUP_APPLICATION` are `0x4`, `0x5`, `0x6` (there is no `0x3`),
so `login as u32` could pass a non-existent login code to
`TEEC_OpenSession`. The variants are now pinned to the `TEEC_LOGIN_*`
constants with `#[repr(u32)]` and `num_enum`, with an `Unknown(u32)`
catch-all and a round-trip unit test covering every constant.
2. **Remove hand-written `Send`/`Sync` from `Context` and `Session`.**
- `Context` now holds `Arc<Mutex<InnerContext>>`, which is automatically
`Send + Sync` because `raw::TEEC_Context` contains only scalars.
- `Session` stores the opaque handle in a private
`RawTeecSession(raw::TEEC_Session)` wrapper. A single, documented
`unsafe impl Send` lives on that wrapper; `Session` itself is derived.
- The raw handle is kept opaque and `optee-teec-sys` is untouched.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@teaclave.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@teaclave.apache.org
For additional commands, e-mail: dev-help@teaclave.apache.org
Re: [PR] optee-teec: fix ConnectionMethods login codes and Context/Session Send-safety [teaclave-trustzone-sdk]
Posted by "ivila (via GitHub)" <gi...@apache.org>.
ivila merged PR #328:
URL: https://github.com/apache/teaclave-trustzone-sdk/pull/328
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@teaclave.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@teaclave.apache.org
For additional commands, e-mail: dev-help@teaclave.apache.org