-
Notifications
You must be signed in to change notification settings - Fork 75
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
BUG_ON() when re-using RPC buffer to tee-supplicant #40
Comments
@jforissier Could you check the status of this issue with the new driver? |
Allocate shared memory buffers once for the write loop instead of repeatedly allocating and freeing them. The previous code was needed due to a bug/limitation in optee_linudriver [1]. Now that we are using the "generic driver", the code can be optimized. [1] OP-TEE/optee_linuxdriver#40 Signed-off-by: Jerome Forissier <[email protected]> Tested-by: Jerome Forissier <[email protected]> (HiKey)
@pascal-brand-st still OK with new driver: https://github.com/linaro-swg/linux/tree/optee_v9 |
Allocate shared memory buffers once for the write loop instead of repeatedly allocating and freeing them. The previous code was needed due to a bug/limitation in optee_linudriver [1]. Now that we are using the "generic driver", the code can be optimized. [1] OP-TEE/optee_linuxdriver#40 Signed-off-by: Jerome Forissier <[email protected]> Tested-by: Jerome Forissier <[email protected]> (HiKey) Reviewed-by: Jens Wiklander <[email protected]> Reviewed-by: Pascal Brand <[email protected]>
Allocate shared memory buffers once for the write loop instead of repeatedly allocating and freeing them. The previous code was needed due to a bug/limitation in optee_linudriver [1]. Now that we are using the "generic driver", the code can be optimized. [1] OP-TEE/optee_linuxdriver#40 Signed-off-by: Jerome Forissier <[email protected]> Tested-by: Jerome Forissier <[email protected]> (HiKey) Reviewed-by: Jens Wiklander <[email protected]> Reviewed-by: Pascal Brand <[email protected]>
Will not fix as https://github.com/OP-TEE/optee_linuxdriver is deprecated. The generic driver is now used (cf. https://github.com/OP-TEE/optee_os/blob/master/CHANGELOG.md#op-tee---version-200) |
In the code I am working on, data are sent in a loop to tee-supplicant. Two buffers are allocated using
thread_optee_rpc_alloc_payload()
(one for the request, one for the response) [here]. Thenthread_rpc_cmd()
is called several times [here], and finally the buffers are freed bythread_optee_rpc_free_payload()
[here].This code causes a kernel crash as
thread_rpc_cmd()
is called for the second time.There is no crash if the allocation and deallocation are moved inside the loop (see this commit).
Test environment: HiKey, project hikey_optee branch rpmbdev.
Please also note that the bug is not reproducible with the "generic driver".
The text was updated successfully, but these errors were encountered: