-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Fix aarch64 assembly for bignum multiplication #4968
Fix aarch64 assembly for bignum multiplication #4968
Conversation
Add memory constraints to the aarch64 inline assembly in MULADDC_STOP. This fixes an issue where Clang 12 and 13 were generating non-functional code on aarch64 platforms. See Mbed-TLS#4962, Mbed-TLS#4943 for further details. Signed-off-by: David Horstmann <david.horstmann@arm.com>
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.
LGTM and tested good on local arm machine.
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.
LGTM except I think we should combine the changelog entries.
I reviewed the code change and I verified that this fixes the bug with Clang 12 on Ubuntu 20.04, cross-compiling for aarch64 and testing with Qemu.
@@ -0,0 +1,4 @@ | |||
Bugfix | |||
* Add missing memory constraints in aarch64 inline assembly for |
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.
We probably should combine the two changelog entries that concern the same bug on different architectures.
Combine the changelog entries for the memory constraints fix on aarch64 and amd64, since these are essentially fixing the same issue. Signed-off-by: David Horstmann <david.horstmann@arm.com>
7500a0e
Add missing memory constraint in aarch64 bignum multiplication code to remedy Clang 12+ issues. Fixes #4962.
Part of the larger super-issue #4943.
Tested with the following steps:
Status
READY
Requires Backporting
Yes
Only to 2.x as
2.16
does not have this aarch64 assembly