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
LoongArch64: Fix PR #22817 introduced performance regression of ChaCha20 #23301
Conversation
LGTM. But let's add "Fixes #23300." to the description so GitHub will link this PR with the issue. |
In that pull request, the input length check was moved forward, but the related ori instruction was missing, and it will cause input of any length down to the much slower scalar implementation. Fixes openssl#23300 CLA: trivial
Added, seems need to be reviewed again. |
My approve is useless anyway :(. We need to collect 3 approves from the OpenSSL maintainers AFAIU. |
Oh thanks, I didn't know that before, in that case let's waiting the maintainers for reviewing it. |
2 approves are sufficient. |
t3 maps to r15, Wasnt that then an uninitialized value that could have been set to an arbitrary number (possibly greater than 64 also?) |
More people that understand the code giving approvals is always welcome. |
Yes, at least it's almost always greater than 64 on Gentoo loong64, however on AOSC Linux with some safety enhancement, the $t3 register's value will be set to zero at the beginning of this function. |
We should add the missing initialization for |
Not useless. Community approvals help give committers the confidence to also approve. |
24 hours has passed since 'approval: done' was set, but as this PR has been updated in that time the label 'approval: ready to merge' is not being automatically set. Please review the updates and set the label manually. |
Merged to the master and 3.2 branches. Thank you for your contribution. |
The regression was introduced in PR #22817. In that pull request, the input length check was moved forward, but the related ori instruction was missing, and it will cause input of any length down to the much slower scalar implementation. Fixes #23300 CLA: trivial Reviewed-by: Shane Lontis <shane.lontis@oracle.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from #23301)
The regression was introduced in PR #22817. In that pull request, the input length check was moved forward, but the related ori instruction was missing, and it will cause input of any length down to the much slower scalar implementation. Fixes #23300 CLA: trivial Reviewed-by: Shane Lontis <shane.lontis@oracle.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from #23301) (cherry picked from commit 9710285)
In that pull request, the input length check was moved forward, but the related
ori $t3,$zero,64
instruction was missing, and it will cause input of any length down to the much slower scalar implementation. This fix that regression, and Fixes #23300.