core: dump_ta_memstats(): check TA initialization completion before accessing it

Problem: In some concurrent cases, TA dump will try to
dump a TA which has not completed TA initialization and
the TA stack pointer isn't set. That causes a data abort
when accessing its stack.

Solution: Check the user TA initialization is completed or not.
If it is still being initialized, return TEE_ERROR_BAD_STATE.
https://github.com/OP-TEE/optee_os/issues/5905

Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Tested-by: Weizhao Jiang <weizhaoj@amazon.com>
Signed-off-by: Weizhao Jiang <weizhaoj@amazon.com>
1 file changed
tree: bcead7af1eb670d90096485e2361c98386338711
  1. .github/
  2. core/
  3. keys/
  4. ldelf/
  5. lib/
  6. mk/
  7. scripts/
  8. ta/
  9. .checkpatch.conf
  10. .gitattributes
  11. .gitignore
  12. CHANGELOG.md
  13. LICENSE
  14. MAINTAINERS
  15. Makefile
  16. README.md
  17. typedefs.checkpatch
README.md

OP-TEE Trusted OS

This git contains source code for the secure side implementation of OP-TEE project.

All official OP-TEE documentation has moved to http://optee.readthedocs.io.

// OP-TEE core maintainers