-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question about panic of TA2 in TA1-TA2 connection. #6701
Comments
I would guess at stage 3
There is no API function for a TA to request cancellation of a request it has sent to another TA. Actually there can't be as the client TA is still busy waiting its request to the other TA completes. |
Before step 3, TA2 has already panicked.
In fact, in the case of CA-TA, TEEC_InvokeCommand returns TEE_ERROR_TARGET_DEAD as expected. Please help if possible. |
step 1: TA1 invokes TA2 using calls Is that the scenario your are testing? If so, TA1 is not expected to call (edited: add few missing words) |
I've setup a quick test with OP-TEE qemu_virt env, playing and hacking with xtest regression_1016 and os_test TA and I see that OP-TEE behaves as expected:
I've tested this using latest OP-TEE (4.10.) but I strong think this behavior can be reproduced on OP-TEE tags 3.1x.0 and 3.2x.0. |
My bad! I've run my test on OP-TEE 3.19.0 and... indeed OP-TEE OS crashes when TA1 invokes TA2 after CA has made TA2 to panic. TEE core trace message looks a lot like the trace message you found:
I have not bisect to find where this situation got fixed between 3.19.0 tag and 4.1.0 tag. |
After some investigation, the issue you face is related to #6226 (that issue deals with a deadlock case and mentions the core crash you experienced). The issue was addressed though #6281 (commit c10e3fa and neighbors) with an added fixup (#6378 / commit 0a75d40). A regression test was added to cover the case, see OP-TEE/optee_test#693). (edited) |
Thank you so much for your help. |
I applied the 4 commits below. Is this correct? After applying the patch, it was confirmed that it operates as follows. |
Yes, I think you made it right. I think there is a conflict to resolve but IMHO it's quite obvious to sort it out. |
I applied the above 4 patches on optee 3.22, |
Testing process
1/ TA1 -> TA2 open session (TA_FLAGS: single instance, multi session flag)
2/ Force TEE_Panic on TA2
3/ TA1->TA2 invoke command (TEE_InvokeTACommand)
Result
No response from TA1.
Additional test
TA panic situation when connecting CA-TA through the same process
Result
When invoke command is performed from CA to TA, TEE_ERROR_TARGET_DEAD is immediately returned.
Inquiry
Is there any way for TA1 to know if TA2 is experiencing a panic or abnormal termination?
Also, in this situation, would it be meaningful to use the cancellationRequestTimeout parameter of TEE_InvokeTACommand?
The text was updated successfully, but these errors were encountered: