coredump: add partition encrypted flag check for flash encryption case

Ref: https://esp32.com/viewtopic.php?f=13&t=30752
pull/10378/head
Mahavir Jain 2022-12-02 17:15:01 +05:30
rodzic 29430e464d
commit 12b977dba6
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 99324EF4A00734E0
2 zmienionych plików z 9 dodań i 0 usunięć

Wyświetl plik

@ -83,6 +83,10 @@ void esp_core_dump_flash_init(void)
s_core_flash_config.partition.size = core_part->size;
s_core_flash_config.partition.encrypted = core_part->encrypted;
s_core_flash_config.partition_config_crc = esp_core_dump_calc_flash_config_crc();
if (esp_flash_encryption_enabled() && !core_part->encrypted) {
ESP_COREDUMP_LOGW("core dump partition is plain text, consider enabling `encrypted` flag");
}
}
static esp_err_t esp_core_dump_flash_write_data(core_dump_write_data_t* priv, uint8_t* data, uint32_t data_size)

Wyświetl plik

@ -84,6 +84,11 @@ as it is shown below::
factory, app, factory, 0x10000, 1M
coredump, data, coredump,, 64K
.. important::
If :doc:`Flash Encryption <../security/flash-encryption>` is enabled on the device then please add `encrypted` flag to the coredump partition::
coredump, data, coredump,, 64K, encrypted
There are no special requirements for partition name. It can be chosen according to the user application needs, but partition type should be 'data' and
sub-type should be 'coredump'. Also when choosing partition size note that core dump data structure introduces constant overhead of 20 bytes and per-task overhead of 12 bytes.
This overhead does not include size of TCB and stack for every task. So partition size should be at least 20 + max tasks number x (12 + TCB size + max task stack size) bytes.