libteec: copy out partial shadow buffer

Without dynamic shared memory enabled (CFG_CORE_DYN_SHM=n) temporary
memrefs uses a shadow buffer to transport data to and from the kernel.

Prior to this patch in case the out length of such a buffer is larger
than the initial size then no copy out is performed even though some
relevant data may be available. Fix this by copying out as much data as
the shadow buffer can hold.

Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
Tested-by: Jerome Forissier <jerome@forissier.org>
Fixes: https://github.com/OP-TEE/optee_os/issues/5101
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
1 file changed
tree: 022bdc923ea569a80d884903fd9a1110107ee2b8
  1. .github/
  2. libckteec/
  3. libseteec/
  4. libteec/
  5. public/
  6. scripts/
  7. tee-supplicant/
  8. .gitattributes
  9. .gitignore
  10. .travis.yml
  11. Android.mk
  12. android_flags.mk
  13. CMakeLists.txt
  14. CMakeToolchain.txt
  15. config.mk
  16. flags.mk
  17. LICENSE
  18. Makefile
  19. README.md
  20. typedefs.checkpatch
README.md

OP-TEE Client API

This git contains source code for the non-secure side implementation of the OP-TEE project making up the client library and tee-supplicant.

All official OP-TEE documentation has moved to http://optee.readthedocs.io. The information that used to be here in this git can be found under optee_client.

// OP-TEE core maintainers