Hi,
I have been seeing out of memory failures due to tee_shm_free() on kexec path. This issue in discussed in length at:
link: https://github.com/OP-TEE/optee_os/issues/3637 Driver: drivers/firmware/broadcom/tee_bnxt_fw.c
I have tried various experiments to try and debug this issue but haven't found a fix. All I have manged is to delay the occurrence of the issue.
Any pointers would be helpful.
Thanks, - Allen
Hi Allen,
On Wed, Jan 13, 2021 at 6:10 AM Allen Pais apais@linux.microsoft.com wrote:
Hi,
I have been seeing out of memory failures due to tee_shm_free() on kexec path. This issue in discussed in length at:
link: https://github.com/OP-TEE/optee_os/issues/3637 Driver: drivers/firmware/broadcom/tee_bnxt_fw.c
I have tried various experiments to try and debug this issue but haven't found a fix. All I have manged is to delay the occurrence of the issue.
Any pointers would be helpful.
I guess you've seen that optee_disable_shm_cache() must somehow be called in the kexec flow. I don't know how to do that though.
Cheers, Jens
I have been seeing out of memory failures due to tee_shm_free() on
kexec path. This issue in discussed in length at:
link: https://github.com/OP-TEE/optee_os/issues/3637 Driver: drivers/firmware/broadcom/tee_bnxt_fw.c
I have tried various experiments to try and debug this issue but
haven't found a fix. All I have manged is to delay the occurrence of the issue.
Any pointers would be helpful.
I guess you've seen that optee_disable_shm_cache() must somehow be called in the kexec flow. I don't know how to do that though.
Thank you Jens. I don't have much idea either, but will try out some experiments.
Thanks.
Jens,
I guess you've seen that optee_disable_shm_cache() must somehow be called in the kexec flow. I don't know how to do that though.
Calling optee_disable_shm_cache() in kexec path does not solve the problem.
I tested with the following changes,
static struct platform_driver optee_driver = { .probe = optee_probe, .remove = optee_remove, + .shutdown = optee_remove, .driver = { .name = "optee", .of_match_table = optee_dt_match, }, };
so with the above I can still reproduce the issue. I even tried a cleaner approach by implementing optee_shutdown,
+static int optee_shutdown(struct platform_device *pdev) +{ + struct optee *optee = platform_get_drvdata(pdev); + + optee_disable_shm_cache(optee); + + tee_device_unregister(optee->supp_teedev); + tee_device_unregister(optee->teedev); + +}
I haven't had much luck yet in finding a solution, let me know if you have any ideas.
Thanks, - Allen