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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to