-
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
ETA on sparc64 support restoration #292
Comments
I'm afraid there is a misunderstanding. In addition to the platform-specific assembly versions we do have a portable C version that works on all platforms and will be used when there is no assembly version for this platform. Disabling the broken assembly automatically enables the (hopefully not broken) C version. So everything should work on Sparc(64). Have you tried building on Sparc(64) recently? You should probably give it a try (including running the test suites). If you find any issue, please report them with the exact error messages and/or failing tests and we'll fix that ASAP. Fixing the assembly on the other hand is much lower priority than fixing a broken build would be. |
Yes, I have tried with a great deal of segfaults. 13 of the 69 test suites fail, the core files all show that the segfault is occurring on the mpi_mul_hlp function call. It isn't a very long function but the only thing occurred to me was that there was an issue with handling the bigendian numbers on Solaris sparc. The tests all run successfully on Solaris x86. Both hosts are Solaris 10 vintage. We have a great deal of heterogeneity in our environment so I need to build on older OS's for forward compatibility.
I'm afraid there is a misunderstanding. In addition to the platform-specific assembly versions we do have a portable C version that works on all platforms and will be used when there is no assembly version for this platform. Disabling the broken assembly automatically enables the (hopefully not broken) C version. So everything should work on Sparc(64).Have you tried building on Sparc(64) recently? You should probably give it a try (including running the test suites). If you find any issue, please report them with the exact error messages and/or failing tests and we'll fix that ASAP.Fixing the assembly on the other hand is much lower priority than fixing a broken build would be.— Script started on September 16, 2015 9:19:37 AM CDT test_suite_xtea ................................................... PASSFAILED (56 suites, 4783 tests run) script done on September 16, 2015 9:19:58 AM CDT Script started on September 16, 2015 9:21:09 AM CDT PASSED (72 / 72 tests (0 skipped)) PASSED (132 / 132 tests (0 skipped)) PASSED (77 / 77 tests (0 skipped)) PASSED (5 / 5 tests (0 skipped)) PASSED (9 / 9 tests (0 skipped)) PASSED (17 / 17 tests (0 skipped)) PASSED (53 / 53 tests (0 skipped)) PASSED (103 / 103 tests (0 skipped)) PASSED (59 / 59 tests (0 skipped)) |
Can you try disabling MBEDTLS_HAVE_ASM in config.h (you'll need to disable MBEDTLS_AESNI_C and MBEDTLS_PADLOCK_C too I think) and see if its changes anything? Looks like some wrong assembly is still used instead of the C version. (I'd be quite surprised if the C version was segfaulting.) I'll also fix the Perl warnings (they only happen when a test fails, which is probably why I never noticed them before). |
Manuel,Thank you so much for your assistance. Unsetting those #DEFINE's in config.h did the trick. The tests ran successfully.
Cheers
Can you try disabling MBEDTLS_HAVE_ASM in config.h (you'll need to disable MBEDTLS_AESNI_C and MBEDTLS_PADLOCK_C too I think) and see if its changes anything? Looks like some wrong assembly is still used instead of the C version. (I'd be quite surprised if the C version was segfaulting.)I'll also fix the Perl warnings (they only happen when a test fails, which is probably why I never noticed them before).— |
ARM Internal Ref: IOTSSL-514 |
As I don't have easy access to a Sparc(64) machine, could you please confirm if this commit fixes your issue (without modifications to Thanks in advance! |
* Mbed-TLS#292: Make psa_close_key(0) and psa_destroy_key(0) succeed * Mbed-TLS#299: Allow xxx_drbg_set_entropy_len before xxx_drbg_seed * Mbed-TLS#259: Check `len` against buffers size upper bound in PSA tests * Mbed-TLS#288: Add ECDSA tests with hash and key of different lengths * Mbed-TLS#305: CTR_DRBG: grab a nonce from the entropy source if needed * Mbed-TLS#316: Stop transactions from being reentrant * Mbed-TLS#317: getting_started: Make it clear that keys are passed in * Mbed-TLS#314: Fix pk_write with EC key to use a constant size for the private value * Mbed-TLS#298: Test a build without any asymmetric cryptography * Mbed-TLS#284: Fix some possibly-undefined variable warnings * Mbed-TLS#315: Define MBEDTLS_PK_SIGNATURE_MAX_SIZE
* Mbed-TLS#292: Make psa_close_key(0) and psa_destroy_key(0) succeed * Mbed-TLS#299: Allow xxx_drbg_set_entropy_len before xxx_drbg_seed * Mbed-TLS#259: Check `len` against buffers size upper bound in PSA tests * Mbed-TLS#288: Add ECDSA tests with hash and key of different lengths * Mbed-TLS#305: CTR_DRBG: grab a nonce from the entropy source if needed * Mbed-TLS#316: Stop transactions from being reentrant * Mbed-TLS#317: getting_started: Make it clear that keys are passed in * Mbed-TLS#314: Fix pk_write with EC key to use a constant size for the private value * Mbed-TLS#298: Test a build without any asymmetric cryptography * Mbed-TLS#284: Fix some possibly-undefined variable warnings * Mbed-TLS#315: Define MBEDTLS_PK_SIGNATURE_MAX_SIZE * Mbed-TLS#318: Finish side-porting commits from mbedtls-restricted that missed the split
* Mbed-TLS#292: Make psa_close_key(0) and psa_destroy_key(0) succeed * Mbed-TLS#299: Allow xxx_drbg_set_entropy_len before xxx_drbg_seed * Mbed-TLS#304: Make sure Asan failures are detected in 'make test' * Mbed-TLS#259: Check `len` against buffers size upper bound in PSA tests * Mbed-TLS#288: Add ECDSA tests with hash and key of different lengths * Mbed-TLS#305: CTR_DRBG: grab a nonce from the entropy source if needed * Mbed-TLS#316: Stop transactions from being reentrant * Mbed-TLS#317: getting_started: Make it clear that keys are passed in * Mbed-TLS#314: Fix pk_write with EC key to use a constant size for the private value * Mbed-TLS#298: Test a build without any asymmetric cryptography * Mbed-TLS#284: Fix some possibly-undefined variable warnings * Mbed-TLS#315: Define MBEDTLS_PK_SIGNATURE_MAX_SIZE * Mbed-TLS#318: Finish side-porting commits from mbedtls-restricted that missed the split * Mbed-TLS#321: Replace config.pl by config.py * Mbed-TLS#322: Update Mbed Crypto with latest Mbed TLS changes as of 2019-11-15 * Mbed-TLS#308: Small performance improvement of mbedtls_mpi_div_mpi() * Mbed-TLS#324: test_psa_constant_names: support key agreement, better code structure * Mbed-TLS#320: Link to the PSA crypto portal page from README.md * Mbed-TLS#293: Always gather MBEDTLS_ENTROPY_BLOCK_SIZE bytes of entropy * Mbed-TLS#310: Clarify test descriptions in test_suite_memory_buffer_alloc * Mbed-TLS#307: Add ASN.1 ENUMERATED tag support * Mbed-TLS#328: Remove dependency of crypto_values.h on crypto_extra.h * Mbed-TLS#325: Rename psa_asymmetric_{sign_verify} to psa_{sign,verify}_hash
Make psa_close_key(0) and psa_destroy_key(0) succeed
Is there a timeline as to when this assembly code may be fixed? I'd really like to utilize mbedtls but I have to support AIX/Linux32/Linux64/Solaris-x86/Solaris-sparc. Everything works except the sparc build. Any information on timing would be greatly appreciated. Thanks
@mpg Disable broken Sparc64 bn_mul assembly
mpg authored on Jun 24, 2014
414 /*
415 * The Sparc64 assembly is reported to be broken.
416 * Disable it for now, until we're able to fix it.
417 */
418 #if 0 && defined(sparc) && defined(sparc64)
The text was updated successfully, but these errors were encountered: