-
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
core: fix data abort during ftrace #6378
Conversation
28d52c4
to
df68c0b
Compare
Force push to please checkpatch. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>
|
With commit c10e3fa ("core: fix race in handling TA panic") the resources of a panicked TAs are released as early as possible, including the user space mapped ftrace buffer. However, the pointer to the ftrace buffer is stored in the ts_session for quick and easy access. The ftrace buffer is always retrieved with get_fbuf() that already have a few other checks to see if the buffer is currently available. So add a check to see that the TA hasn't panicked also. Fixes: c10e3fa ("core: fix race in handling TA panic") Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com> Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (vexpress-qemu_armv8a)
df68c0b
to
4331523
Compare
Tags applied. Did a |
Does this change disallows ftrace dump for user TAs which have panicked? |
No. I could obtain a dump for e.g., |
Enable test 11 again since the issue waw fixed in [1]. Link: OP-TEE/optee_os#6378 [1]. Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
With commit c10e3fa ("core: fix race in handling TA panic") the resources of a panicked TAs is released as early as possible, including the user space mapped ftrace buffer. However, the pointer to the ftrace buffer is stored in the ts_session for quick and easy access. The ftrace buffer is always retrieved with get_fbuf() that already have a few other checks to see if the buffer is currently available. So add a check to see that the TA hasn't panicked also.
Fixes: c10e3fa ("core: fix race in handling TA panic")