when the current process is doing a rpc call from optee, and if there
is a signal pending on the process, it will enter dead loop if the
tee-supplicant is working correctly, fix the problem by breaking out
the loop when the rpc job is finished.
Signed-off-by: Zeng Tao <prime.zeng(a)hisilicon.com>
---
drivers/tee/optee/supp.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/tee/optee/supp.c b/drivers/tee/optee/supp.c
index b4ea067..170dedb 100644
--- a/drivers/tee/optee/supp.c
+++ b/drivers/tee/optee/supp.c
@@ -107,6 +107,13 @@ u32 optee_supp_thrd_req(struct tee_context *ctx, u32 func, size_t num_params,
mutex_unlock(&supp->ctx_mutex);
if (interruptable)
break;
+
+ /*
+ * if there is signal pending, and the supplicant has finished
+ * the rpc job, we need to break out the loop
+ */
+ if (try_wait_for_completion(&supp->data_from_supp))
+ break;
}
ret = supp->ret;
--
2.7.4
Hello TEE POCs:
We came across Jens' 2015 patch:
https://github.com/linaro-swg/linux/commit/b8d05a0934b2
What is the status of the kernel client API below? Is it slated to go
upstream in the 4.16 or 4.17 kernel?
I ask because we have use cases that, if ported to the Generic TEE
interface, may require tee_shm_alloc() and friends to be available for use
cases such as the Linux soc-specific kernel entropy manager requesting TEE
side to provide PRNG data. The above patch would be a good starting point.
For instance, we were looking at using the following two APIs from Jens'
patch to open and close context objects. They will enable the clients to use
"tee_shm_alloc".
Cheers,
-thomas
Hi Guys,
I see fix for Variant3/meltdown is almost there. Congrats, that's quick.
Do you know of any device that officially supported and vulnerable to
variant 3?
Kris
Hi,
We shall be releasing OP-TEE 3.0.0 soon, so if you have pending pull
requests you'd like merged, please update them ASAP. Target date for the
release was January 19th but we may slip a bit due to Spectre and Meltdown.
As soon as the vulnerability patches are in, I'll create a -rc1 tag.
Thanks,
--
Jerome