During Callback request from TZ, smcinvoke in and out buffers need
explicit cache operation with legacy smcinvoke.
Change-Id: I3eacd69901c1ce117017b2d59a28dfab83b5f3f9
smcinvoke.c:578:10: error: implicit declaration of function 'kthread_should_stop'
while (!kthread_should_stop()) {
smcinvoke.c:617:43: error: implicit declaration of function 'kthread_run'
smcinvoke[i].postprocess_kthread_task = kthread_run(
Change-Id: Id6a8b6844ec7ae00b55c81d3760a91da9d49a9ad
Signed-off-by: Patrick Daly <quic_pdaly@quicinc.com>
Because the device node of smcinvoke is published at the
beginning of the smcinvoke_probe(), the device node will
be ready while the smcinvoke is not initialized completely.
Hence the smcinvoke_release probably is called when the
smcinvoke driver is not ready. this case will lead to
smcinvoke crash issue.
To avoid this concurrency issue, we create the device node
at the end of the smcinvoke_probe.
Change-Id: I930685a24fb744893017c90c1881f13e2f2c3d7c
Signed-off-by: wenji <quic_wenji@quicinc.com>
1. When there is a large shambridge memory which is not
deleted in time, The shambridge in QTEE might be out of
memory. we met this issue in the TVM TUI unit test.
TrustedUISampleTest -vm --gtest_filter=*Basic_TUIStartStop*
2. To avoid being out of shambridge memory, we should postpone
the deletion of shambridge created by smcinvoke itself.
Change-Id: I2ef837339881c1dcd78a0da10fc848488c9819ca
Signed-off-by: wenji <quic_wenji@quicinc.com>
1.When the QTEE is busy with a high concurrency, the objects and shared
memory bridge will not be released and deleted in time, this will lead
to memory leakage issues in the QTEE.
2.To avoid the memory leakage in case of EBUSY, we add 2 exclusive worker
threads to postprocess the object release and shmbridge deletion
separately.
Change-Id: I94c656d191d5098f1c093650e4321e6b5353e45e
Signed-off-by: Nitin LNU <quic_nlakra@quicinc.com>
Acquire lock before delete_cb_txn_locked.
This API expects the lock is aquired before calling it
release the lock afterwards.
Also rename the api with_locked to state that api
needs to be called on locked mutex.
Change-Id: I6384ff60004da90b46904823e399c62c55ea4273
a validation added to check whether retrieved struct smcinvoke_file_data
inside the function get_server_id belongs to g_smcinvoke_fops or not.
Change-Id: I50bce93ab89759b4fdcb76e41f699d8199771fbd
Signed-off-by: Pavan Bobba <quic_pav@quicinc.com>
Add MODULE_IMPORT_NS for smcinvoke driver to ignore consider it as as
filesystem and not a driver.
Change-Id: I839b972f68f45f184f6a46de6779ac6adace9d38
pull commits
smcinvoke: Release lock for non critical region
When entering into non critical region make sure to release the lock and
increase reference for memobj instead of holding the lock and causing
memobj not to be released when third party module using it.
smcinvoke: Add support for splitbin
Remove hard limit on the number of splitbins available.
Let the TZ decide if the reassembled binary is good for usage.
cherrypicked from I6d7b5c3154c8c362be0a6bad2da1c4687191536d
Change-Id: Ibb12bc906fb3e995928a0b51b742e8193d737ba3