mirror of https://github.com/ARMmbed/mbed-os.git
1. For SHA AC, use atomic flag to manage its ownership. (1) Nuvoton SHA AC doesn't support SHA context save & restore, so S/W SHA fallback has been supported before. To make non-blocking 'acquire' semantics clearer, introduce 'try_acquire' to substitute for 'acquire'. (2) No biting CPU due to mechanism above. (3) No deadlock due to mechanism above. 2. For AES/DES/ECC AC, change to mutex to manage their ownership. (1) Change crypto-misc.c to crypto-misc.cpp to utilize C++ SingletonPtr which guarantees thread-safe mutex construct-on-first-use. (2) With change to crypto-misc.cpp, add 'extern "C"' modifier to CRYPTO_IRQHandler() to avoid name mangling in C++. (3) No priority inversion because mutex has osMutexPrioInherit attribute bit set. (4) No deadlock because these AC are all locked for a short sequence of operations rather than the whole lifetime of mbedtls context. (5) For double mbedtls_internal_ecp_init() issue, it has been fixed in upper mbedtls layer. So no need to change ecc init/free flow. |
||
---|---|---|
.. | ||
TARGET_ARM_FM | ||
TARGET_ARM_SSG | ||
TARGET_Analog_Devices | ||
TARGET_Atmel | ||
TARGET_Cypress/TARGET_PSOC6 | ||
TARGET_Freescale | ||
TARGET_Maxim | ||
TARGET_NORDIC | ||
TARGET_NUVOTON | ||
TARGET_NXP | ||
TARGET_ONSEMI | ||
TARGET_RDA | ||
TARGET_RENESAS | ||
TARGET_Realtek | ||
TARGET_STM | ||
TARGET_Silicon_Labs | ||
TARGET_TOSHIBA | ||
TARGET_WICED | ||
TARGET_WIZNET | ||
TARGET_ublox | ||
targets.json |