mirror of
https://github.com/espressif/esp-idf.git
synced 2024-09-19 14:26:01 -04:00
Merge branch 'fix/ds_tries_acquiring_mpi_lock_twice' into 'master'
Clean up DS trying to re-acquire MPI lock post common crypto lock layer See merge request espressif/esp-idf!33056
This commit is contained in:
commit
fd192e0e9e
@ -262,9 +262,7 @@ esp_err_t esp_ds_encrypt_params(esp_ds_data_t *data,
|
|||||||
static void ds_acquire_enable(void)
|
static void ds_acquire_enable(void)
|
||||||
{
|
{
|
||||||
esp_crypto_ds_lock_acquire();
|
esp_crypto_ds_lock_acquire();
|
||||||
#if CONFIG_IDF_TARGET_ESP32S3
|
|
||||||
esp_crypto_mpi_lock_acquire();
|
|
||||||
#endif
|
|
||||||
// We also enable SHA and HMAC here. SHA is used by HMAC, HMAC is used by DS.
|
// We also enable SHA and HMAC here. SHA is used by HMAC, HMAC is used by DS.
|
||||||
HMAC_RCC_ATOMIC() {
|
HMAC_RCC_ATOMIC() {
|
||||||
hmac_ll_enable_bus_clock(true);
|
hmac_ll_enable_bus_clock(true);
|
||||||
@ -300,9 +298,6 @@ static void ds_disable_release(void)
|
|||||||
hmac_ll_enable_bus_clock(false);
|
hmac_ll_enable_bus_clock(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if CONFIG_IDF_TARGET_ESP32S3
|
|
||||||
esp_crypto_mpi_lock_release();
|
|
||||||
#endif
|
|
||||||
esp_crypto_ds_lock_release();
|
esp_crypto_ds_lock_release();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ void set_leak_threshold(int threshold)
|
|||||||
|
|
||||||
static size_t before_free_8bit;
|
static size_t before_free_8bit;
|
||||||
static size_t before_free_32bit;
|
static size_t before_free_32bit;
|
||||||
static const char* TAG = "esp_hw_support_test_app";
|
static const char* TAG = "crypto_drivers_test_app";
|
||||||
|
|
||||||
static void check_leak(size_t before_free, size_t after_free, const char *type)
|
static void check_leak(size_t before_free, size_t after_free, const char *type)
|
||||||
{
|
{
|
||||||
@ -81,6 +81,6 @@ void tearDown(void)
|
|||||||
void app_main(void)
|
void app_main(void)
|
||||||
{
|
{
|
||||||
vTaskPrioritySet(NULL, TEST_TASK_PRIORITY);
|
vTaskPrioritySet(NULL, TEST_TASK_PRIORITY);
|
||||||
ESP_LOGI(TAG, "Running esp-hw-support test app");
|
ESP_LOGI(TAG, "Running crypto drivers test app");
|
||||||
unity_run_menu();
|
unity_run_menu();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user