-
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
MicroBlaze does not return from mbedtls_pk_parse_key with MBEDTLS_HAVE_ASM defined #2020
Comments
The application gets stuck in the do while loop here: https://github.com/ARMmbed/mbedtls/blob/6c34268e203d23bbfbfda3f7362dac8b9b9382bc/library/bignum.c#L1407 The |
ARM Internal Ref: IOTSSL-2540 |
Hi @IsaacJT Thanks for your bug report. We unfortunately don't have a way to reproduce this issue, so I've marked this as open for community contribution. Thanks! |
Fixed a bug that the little-endian Microblaze does not work when MBEDTLS_HAVE_ASM is defined.
Fixed a bug that the little-endian Microblaze does not work when MBEDTLS_HAVE_ASM is defined. Signed-off-by: Kazuyuki-kimura <[email protected]>
Fixed a bug that the little-endian Microblaze does not work when MBEDTLS_HAVE_ASM is defined. Signed-off-by: Kazuyuki-kimura <[email protected]> Signed-off-by: Kazuyuki Kimura <[email protected]>
Fixed a bug that the little-endian Microblaze does not work when MBEDTLS_HAVE_ASM is defined. Signed-off-by: Kazuyuki Kimura <[email protected]>
Fixed a bug that the little-endian Microblaze does not work when MBEDTLS_HAVE_ASM is defined. Signed-off-by: Kazuyuki Kimura <[email protected]>
I also runned into this issue when using mbedtls on a microblaze.
The attached diff file fixes include/mbedtls/nb_mul.h in branche 2.16 |
Fixed a bug that the little-endian Microblaze does not work when MBEDTLS_HAVE_ASM is defined. Signed-off-by: Kazuyuki Kimura <[email protected]> Signed-off-by: Dave Rodgman <[email protected]>
Fixed a bug that the little-endian Microblaze does not work when MBEDTLS_HAVE_ASM is defined. Signed-off-by: Kazuyuki Kimura <[email protected]> Signed-off-by: Dave Rodgman <[email protected]>
Description
Bug
OS
FreeRTOS
mbed TLS build:
Version: 2.12.0
OS version: 10.0
Configuration:
mbedtls_freertos.txt
Compiler and options (if you used a pre-built binary, please indicate how you obtained it): GCC 7.2.0 from Xilinx SDK 2018.1. Compiled with:
-O2 -mcpu=v10.0 -mxl-multiply-high -mno-xl-soft-div -mno-xl-soft-mul -mxl-barrel-shift -mxl-pattern-compare
Additional environment information: we are also using Mongoose web server. The MicroBlaze has been built with multiplier and divider hardware, branch prediction, and data and instruction caches.
Expected behavior
When parsing a buffer with
mbedtls_pk_parse_key
, the function should return.Actual behavior
The
mbedtls_pk_parse_key
never returns, and is stuck performing the multiplication in bignum.c.The function executes and returns correctly when compiling without MBEDTLS_HAVE_ASM defined.
Steps to reproduce
Attempt to parse a key with
mbedtls_pk_parse_key
on a MicroBlaze with MBEDTLS_HAVE_ASM defined.The text was updated successfully, but these errors were encountered: