Skip to content
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

Temporary disable Crypto HW accelerator on UBLOX_EVK_ODIN_W2 #10088

Merged
merged 1 commit into from
Mar 15, 2019

Conversation

alekshex
Copy link
Contributor

@alekshex alekshex commented Mar 13, 2019

Description

Temporary disable work with Crypto HW accelerator on STM32F439xI chipset due to possible issue with it.
Switch to SW only.

Pull request type

[ ] Fix
[ ] Refactor
[ ] Target update
[X] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change

Reviewers

@Patater @netanelgonen @NirSonnenschein

Release Notes

for 5.12rc3

Attached full compliance tests log:

target platform_name test suite result elapsed_time (sec) copy_method
UBLOX_EVK_ODIN_W2-GCC_ARM UBLOX_EVK_ODIN_W2 components-target_psa-tests-compliance_attestation-test_a001 OK 28.09 default
UBLOX_EVK_ODIN_W2-GCC_ARM UBLOX_EVK_ODIN_W2 components-target_psa-tests-compliance_crypto-test_c001 OK 18.37 default
UBLOX_EVK_ODIN_W2-GCC_ARM UBLOX_EVK_ODIN_W2 components-target_psa-tests-compliance_crypto-test_c002 OK 19.38 default
UBLOX_EVK_ODIN_W2-GCC_ARM UBLOX_EVK_ODIN_W2 components-target_psa-tests-compliance_crypto-test_c003 OK 19.29 default
UBLOX_EVK_ODIN_W2-GCC_ARM UBLOX_EVK_ODIN_W2 components-target_psa-tests-compliance_crypto-test_c004 OK 19.26 default
UBLOX_EVK_ODIN_W2-GCC_ARM UBLOX_EVK_ODIN_W2 components-target_psa-tests-compliance_crypto-test_c005 OK 19.26 default
UBLOX_EVK_ODIN_W2-GCC_ARM UBLOX_EVK_ODIN_W2 components-target_psa-tests-compliance_crypto-test_c006 OK 20.18 default
UBLOX_EVK_ODIN_W2-GCC_ARM UBLOX_EVK_ODIN_W2 components-target_psa-tests-compliance_crypto-test_c007 OK 23.36 default
UBLOX_EVK_ODIN_W2-GCC_ARM UBLOX_EVK_ODIN_W2 components-target_psa-tests-compliance_crypto-test_c008 OK 19.31 default
UBLOX_EVK_ODIN_W2-GCC_ARM UBLOX_EVK_ODIN_W2 components-target_psa-tests-compliance_crypto-test_c009 OK 19.09 default
UBLOX_EVK_ODIN_W2-GCC_ARM UBLOX_EVK_ODIN_W2 components-target_psa-tests-compliance_crypto-test_c010 OK 19.25 default
UBLOX_EVK_ODIN_W2-GCC_ARM UBLOX_EVK_ODIN_W2 components-target_psa-tests-compliance_crypto-test_c011 OK 19.38 default
UBLOX_EVK_ODIN_W2-GCC_ARM UBLOX_EVK_ODIN_W2 components-target_psa-tests-compliance_crypto-test_c012 OK 19.19 default
UBLOX_EVK_ODIN_W2-GCC_ARM UBLOX_EVK_ODIN_W2 components-target_psa-tests-compliance_crypto-test_c013 OK 18.73 default
UBLOX_EVK_ODIN_W2-GCC_ARM UBLOX_EVK_ODIN_W2 components-target_psa-tests-compliance_crypto-test_c014 OK 18.98 default
UBLOX_EVK_ODIN_W2-GCC_ARM UBLOX_EVK_ODIN_W2 components-target_psa-tests-compliance_crypto-test_c015 OK 18.82 default
UBLOX_EVK_ODIN_W2-GCC_ARM UBLOX_EVK_ODIN_W2 components-target_psa-tests-compliance_crypto-test_c016 OK 19.32 default
UBLOX_EVK_ODIN_W2-GCC_ARM UBLOX_EVK_ODIN_W2 components-target_psa-tests-compliance_crypto-test_c017 OK 18.98 default
UBLOX_EVK_ODIN_W2-GCC_ARM UBLOX_EVK_ODIN_W2 components-target_psa-tests-compliance_crypto-test_c018 OK 18.53 default
UBLOX_EVK_ODIN_W2-GCC_ARM UBLOX_EVK_ODIN_W2 components-target_psa-tests-compliance_crypto-test_c019 OK 18.21 default
UBLOX_EVK_ODIN_W2-GCC_ARM UBLOX_EVK_ODIN_W2 components-target_psa-tests-compliance_crypto-test_c020 OK 18.91 default
UBLOX_EVK_ODIN_W2-GCC_ARM UBLOX_EVK_ODIN_W2 components-target_psa-tests-compliance_crypto-test_c021 OK 18.56 default
UBLOX_EVK_ODIN_W2-GCC_ARM UBLOX_EVK_ODIN_W2 components-target_psa-tests-compliance_crypto-test_c022 OK 19.41 default
UBLOX_EVK_ODIN_W2-GCC_ARM UBLOX_EVK_ODIN_W2 components-target_psa-tests-compliance_crypto-test_c023 OK 18.78 default
UBLOX_EVK_ODIN_W2-GCC_ARM UBLOX_EVK_ODIN_W2 components-target_psa-tests-compliance_crypto-test_c024 OK 19.26 default
UBLOX_EVK_ODIN_W2-GCC_ARM UBLOX_EVK_ODIN_W2 components-target_psa-tests-compliance_crypto-test_c025 OK 19.15 default
UBLOX_EVK_ODIN_W2-GCC_ARM UBLOX_EVK_ODIN_W2 components-target_psa-tests-compliance_crypto-test_c026 OK 19.04 default
UBLOX_EVK_ODIN_W2-GCC_ARM UBLOX_EVK_ODIN_W2 components-target_psa-tests-compliance_crypto-test_c027 OK 18.42 default
UBLOX_EVK_ODIN_W2-GCC_ARM UBLOX_EVK_ODIN_W2 components-target_psa-tests-compliance_crypto-test_c028 OK 18.44 default
UBLOX_EVK_ODIN_W2-GCC_ARM UBLOX_EVK_ODIN_W2 components-target_psa-tests-compliance_crypto-test_c029 OK 18.83 default
UBLOX_EVK_ODIN_W2-GCC_ARM UBLOX_EVK_ODIN_W2 components-target_psa-tests-compliance_crypto-test_c030 OK 19.11 default
UBLOX_EVK_ODIN_W2-GCC_ARM UBLOX_EVK_ODIN_W2 components-target_psa-tests-compliance_crypto-test_c031 OK 18.7 default
UBLOX_EVK_ODIN_W2-GCC_ARM UBLOX_EVK_ODIN_W2 components-target_psa-tests-compliance_crypto-test_c032 OK 19.78 default
UBLOX_EVK_ODIN_W2-GCC_ARM UBLOX_EVK_ODIN_W2 components-target_psa-tests-compliance_crypto-test_c033 OK 19.87 default
UBLOX_EVK_ODIN_W2-GCC_ARM UBLOX_EVK_ODIN_W2 components-target_psa-tests-compliance_crypto-test_c034 OK 18.78 default
UBLOX_EVK_ODIN_W2-GCC_ARM UBLOX_EVK_ODIN_W2 components-target_psa-tests-compliance_crypto-test_c035 OK 19.72 default
UBLOX_EVK_ODIN_W2-GCC_ARM UBLOX_EVK_ODIN_W2 components-target_psa-tests-compliance_crypto-test_c036 OK 19.7 default
UBLOX_EVK_ODIN_W2-GCC_ARM UBLOX_EVK_ODIN_W2 components-target_psa-tests-compliance_crypto-test_c037 OK 20.51 default
UBLOX_EVK_ODIN_W2-GCC_ARM UBLOX_EVK_ODIN_W2 components-target_psa-tests-compliance_crypto-test_c038 OK 19.12 default
UBLOX_EVK_ODIN_W2-GCC_ARM UBLOX_EVK_ODIN_W2 components-target_psa-tests-compliance_crypto-test_c039 OK 19.33 default
UBLOX_EVK_ODIN_W2-GCC_ARM UBLOX_EVK_ODIN_W2 components-target_psa-tests-compliance_crypto-test_c040 OK 19.78 default
UBLOX_EVK_ODIN_W2-GCC_ARM UBLOX_EVK_ODIN_W2 components-target_psa-tests-compliance_crypto-test_c041 OK 20.49 default
UBLOX_EVK_ODIN_W2-GCC_ARM UBLOX_EVK_ODIN_W2 components-target_psa-tests-compliance_crypto-test_c042 OK 21.27 default
UBLOX_EVK_ODIN_W2-GCC_ARM UBLOX_EVK_ODIN_W2 components-target_psa-tests-compliance_crypto-test_c043 OK 21.21 default
UBLOX_EVK_ODIN_W2-GCC_ARM UBLOX_EVK_ODIN_W2 components-target_psa-tests-compliance_its-test_s001 OK 19.65 default
UBLOX_EVK_ODIN_W2-GCC_ARM UBLOX_EVK_ODIN_W2 components-target_psa-tests-compliance_its-test_s002 OK 19.88 default
UBLOX_EVK_ODIN_W2-GCC_ARM UBLOX_EVK_ODIN_W2 components-target_psa-tests-compliance_its-test_s004 OK 19.37 default
UBLOX_EVK_ODIN_W2-GCC_ARM UBLOX_EVK_ODIN_W2 components-target_psa-tests-compliance_its-test_s005 OK 19.34 default
UBLOX_EVK_ODIN_W2-GCC_ARM UBLOX_EVK_ODIN_W2 components-target_psa-tests-compliance_its-test_s006 OK 19.09 default
UBLOX_EVK_ODIN_W2-GCC_ARM UBLOX_EVK_ODIN_W2 components-target_psa-tests-compliance_its-test_s007 OK 19.31 default
UBLOX_EVK_ODIN_W2-GCC_ARM UBLOX_EVK_ODIN_W2 components-target_psa-tests-compliance_its-test_s008 OK 19.23 default
UBLOX_EVK_ODIN_W2-GCC_ARM UBLOX_EVK_ODIN_W2 components-target_psa-tests-compliance_its-test_s009 OK 19.38 default
UBLOX_EVK_ODIN_W2-GCC_ARM UBLOX_EVK_ODIN_W2 components-target_psa-tests-compliance_its-test_s010 OK 19.2 default
mbedgt: test suite results: 53 OK

@Patater
Copy link
Contributor

Patater commented Mar 13, 2019

Do we know if STM32F439ZI is also affected? Both boards use the same accelerator.

@alekshex
Copy link
Contributor Author

alekshex commented Mar 13, 2019

Do we know if STM32F439ZI is also affected? Both boards use the same accelerator.

Currently no failures except Odin board were reported.
@NirSonnenschein do we run other STM32F439ZI chipset boards in except Odin CI?

@ciarmcom
Copy link
Member

@avolinski, thank you for your changes.
@netanelgonen @NirSonnenschein @Patater @ARMmbed/mbed-os-crypto @ARMmbed/mbed-os-maintainers please review.

@NirSonnenschein
Copy link
Contributor

@avolinski here is the list of boards on the nightly job, I'm not sure if any additional ones use the STM32F439ZI chipset :
ARCH_PRO
CY8CKIT_062_WIFI_BT
DISCO_F746NG
DISCO_L475VG_IOT01A
EV_COG_AD3029LZ
EV_COG_AD4050LZ
K22F
K64F
K66F
K66F-ESP8266
K82F
KW24D
KW41Z
NRF51_DK
NRF52_DK
NUCLEO_F072RB
NUCLEO_F207ZG
NUCLEO_F429ZI
NUCLEO_F746ZG
NUCLEO_F767ZI
NUCLEO_L073RZ
UBLOX_EVK_ODIN_W2

@NirSonnenschein
Copy link
Contributor

This approach seems better than removing PSA support altogether, however we could be causing a performance degradation (possibly a big one) if this functionality is used in non-psa scenarios so there may be a bit of risk involved here as well

@0xc0170 0xc0170 requested review from a team March 13, 2019 22:50
@NirSonnenschein
Copy link
Contributor

starting CI pending reviews

Copy link
Contributor

@netanelgonen netanelgonen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the reason that we need to disable sha1 and md5 for AES and attestation?


#define MBEDTLS_SHA1_ALT
//#define MBEDTLS_SHA1_ALT
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@avolinski

  1. Why removing SHA1 & MD5
  2. Why not add a fix to the H/W driver? did you look at the spec maybe its an easy fix

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SHA found to be messing the attestation test when working with accelerator

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

until the accelerator issue is settled no taking chances for sporadic possible failures

@LMESTM
Copy link
Contributor

LMESTM commented Mar 14, 2019

Before such a PR is proposed, could there be an issue in the first place that describes the problem and how to reproduce it ?

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 14, 2019

Before such a PR is proposed, could there be an issue in the first place that describes the problem and how to reproduce it ?

Good point, should have tracking issue.

Might be better to remove the lines completely rather to comment them out. Once fixed, the commit would be reverted and they are back.

Removing something needs a reason in the commit msg - why is this being removed. "possible issues" is not sufficient explanation for removal.
Referencing tracking issue in the commit would be nice to have.

Copy link
Contributor

@0xc0170 0xc0170 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment above ^^

@mbed-ci
Copy link

mbed-ci commented Mar 14, 2019

Test run: SUCCESS

Summary: 13 of 13 test jobs passed
Build number : 1
Build artifacts

@alekshex
Copy link
Contributor Author

Hi @0xc0170,
Issue created: #10095
Defines are removed entirely from file

@alekshex
Copy link
Contributor Author

Please note, apparently this problem was already discovered previously here #6545
and there was a partial workaround merged before into mbedOS #8142

So this is something reoccurring.
@ARMmbed/team-st-mcd

Copy link
Contributor

@0xc0170 0xc0170 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One last thing, if you can amend your last commit - add reason why is this being removed (what it's described in the issue) or just reference there the issue

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 14, 2019

As soon as commit msg is updated, will go into CI

Copy link
Contributor

@netanelgonen netanelgonen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems this is a good workaround for an old issue

@alekshex
Copy link
Contributor Author

As soon as commit msg is updated, will go into CI

done

@mbed-ci
Copy link

mbed-ci commented Mar 14, 2019

Test run: FAILED

Summary: 1 of 9 test jobs failed
Build number : 2
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_build-GCC_ARM

@alekshex
Copy link
Contributor Author

looks like Jenkins issue:
https://mbed-os.mbedcloudtesting.com/job/mbed-os-ci_build-GCC_ARM/1885/console

Loading library mbed-os-ci@master
java.io.FileNotFoundException: https://api.github.com/repos/ARMmbed/mbed-os-ci
at com.squareup.okhttp.internal.huc.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:243)
at com.squareup.okhttp.internal.huc.DelegatingHttpsURLConnection.getInputStream(DelegatingHttpsURLConnection.java:210)
at com.squareup.okhttp.internal.huc.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:25)
at org.kohsuke.github.Requester.parse(Requester.java:617)
at org.kohsuke.github.Requester.parse(Requester.java:599)
at org.kohsuke.github.Requester._to(Requester.java:277)
Caused: org.kohsuke.github.GHFileNotFoundException: {
"message": "Server Error"
}

@cmonr
Copy link
Contributor

cmonr commented Mar 14, 2019

CI restarted

@mbed-ci
Copy link

mbed-ci commented Mar 14, 2019

Test run: SUCCESS

Summary: 13 of 13 test jobs passed
Build number : 3
Build artifacts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.