1. 15 Nov, 2019 2 commits
    • Jens Wiklander's avatar
      tee: optee: fix device enumeration error handling · 03212e34
      Jens Wiklander authored
      Prior to this patch in optee_probe() when optee_enumerate_devices() was
      called the struct optee was fully initialized. If
      optee_enumerate_devices() returns an error optee_probe() is supposed to
      clean up and free the struct optee completely, but will at this late
      stage need to call optee_remove() instead. This isn't done and thus
      freeing the struct optee prematurely.
      
      With this patch the call to optee_enumerate_devices() is done after
      optee_probe() has returned successfully and in case
      optee_enumerate_devices() fails everything is cleaned up with a call to
      optee_remove().
      
      Fixes: c3fa24af ("tee: optee: add TEE bus device enumeration support")
      Reviewed-by: default avatarSumit Garg <sumit.garg@linaro.org>
      Signed-off-by: default avatarJens Wiklander <jens.wiklander@linaro.org>
      03212e34
    • Sumit Garg's avatar
      tee: optee: Fix dynamic shm pool allocations · a249dd20
      Sumit Garg authored
      In case of dynamic shared memory pool, kernel memory allocated using
      dmabuf_mgr pool needs to be registered with OP-TEE prior to its usage
      during optee_open_session() or optee_invoke_func().
      
      So fix dmabuf_mgr pool allocations via an additional call to
      optee_shm_register().
      
      Also, allow kernel pages to be registered as shared memory with OP-TEE.
      
      Fixes: 9733b072 ("optee: allow to work without static shared memory")
      Signed-off-by: default avatarSumit Garg <sumit.garg@linaro.org>
      Signed-off-by: default avatarJens Wiklander <jens.wiklander@linaro.org>
      a249dd20
  2. 13 Oct, 2019 16 commits
  3. 12 Oct, 2019 22 commits