-
Notifications
You must be signed in to change notification settings - Fork 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
Cipher buf fixes #6802
Cipher buf fixes #6802
Conversation
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.
Acked-by: Etienne Carriere <etienne.carriere@foss.st.com>
for commit
"libutee: process a full buffer immediately".
Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>
for commit
"libutee: handle buffer_two_blocks correctly".
The QEMUv8 make check failure puzzles me. It's an error in the 4003 case so it's relevant, but I can't reproduce it locally. I'm rerunning the test to see if it changes. |
It's the check with |
4327768
to
ba06618
Compare
Added "core: arm64: fix ce_aes_xts_{de,en}crypt()" before "libutee: handle buffer_two_blocks correctly", since the latter triggers the bug fixed by the former. Tag applied to "libutee: handle buffer_two_blocks correctly", note that PR #6791 is supposed to be merged first with "libutee: process a full buffer immediately". |
For "core: arm64: fix ce_aes_xts_{de,en}crypt()":
|
#6791 merged, please rebase. Thanks! |
In ce_aes_xts_encrypt() and ce_aes_xts_decrypt(), if the main interleave loop (.LxtsencNx or .LxtsdecNx) ends with all blocks completed the v7 register doesn't hold the needed .Lxts_mul_x needed to compute the next tweak correctly. So fix this by loading .Lxts_mul_x in v7 before ending the loop. Fixes: 06d2e41 ("core: add accelerated AES routines") Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
For operations with buffer_two_blocks true, calculate the required size of the out buffer (req_dlen) correctly in TEE_CipherUpdate(). tee_buffer_update() is fixed with a matching update. buffer_two_blocks set to true mandates buffering at least one block + a byte and at most two full blocks. Fix needed by TEE_ALG_AES_CTS and TEE_ALG_AES_XTS. Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>
ba06618
to
bf6ce84
Compare
Rebased and tag applied. |
The Hafnium build has failed on a network error, I will restart it.
|
This includes "libutee: process a full buffer immediately" cherry-picked from #6791 so please ignore that while reviewing this PR.
This fixes an issue found with updated xtest regression tests, OP-TEE/optee_test#741