Backport 2.7: Fix the i386 MPI multiply helper assembly code #1849
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This is a backport of #1778 to the
mbedtls-2.7
branch, to fix GitHub issue #1550.The ebx register was used by the assembly code but not listed in the clobber list, so when the compiler chose to also use it, ebx was getting corrupted. I'm surprised this wasn't spotted sooner.
The fix is very simply to add the ebx register to the clobber list for the i386 inline assembly
for the multiply helper function.
This fixes both i386 and its SSE2 variant which was also broken.
Status
READY
Todos