diff options
author | David Horstmann <david.horstmann@arm.com> | 2024-03-18 14:56:40 +0000 |
---|---|---|
committer | David Horstmann <david.horstmann@arm.com> | 2024-03-18 15:00:08 +0000 |
commit | 872ee6ece0b00a19f5be1fdcc2f0df156c839640 (patch) | |
tree | 52a114a52a18ecac73a6962eec78a3fdd48a5941 | |
parent | 12b35bf3c2dd9cfdb8e59b9c054662dea260c11c (diff) | |
download | mbedtls-872ee6ece0b00a19f5be1fdcc2f0df156c839640.tar.gz |
Mention MBEDTLS_TEST_MEMORY_CAN_POISON
The configuration of memory poisoning is now performed via
compile-time detection setting MBEDTLS_MEMORY_CAN_POISON. Update
the design to take account of this.
Signed-off-by: David Horstmann <david.horstmann@arm.com>
-rw-r--r-- | docs/architecture/psa-shared-memory.md | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/docs/architecture/psa-shared-memory.md b/docs/architecture/psa-shared-memory.md index bb6a2b6e2..495f0c392 100644 --- a/docs/architecture/psa-shared-memory.md +++ b/docs/architecture/psa-shared-memory.md @@ -667,7 +667,9 @@ Poisoning code is added to these test wrappers where relevant in order to pre-po #### Configuration of poisoning tests -Since the memory poisoning tests will require the use of interfaces specific to the sanitizers used to poison memory, they must be guarded by new config options, for example `MBEDTLS_TEST_PSA_COPYING_ASAN` and `MBEDTLS_TEST_PSA_COPYING_VALGRIND`, as well as `MBEDTLS_TEST_HOOKS`. These would be analogous to the existing `MBEDTLS_TEST_CONSTANT_FLOW_MEMSAN` and `MBEDTLS_TEST_CONSTANT_FLOW_VALGRIND`. Since they require special tooling and are for testing only, these options should not be present in `mbedtls_config.h`. Instead, they should be set only in a new component in `all.sh` that performs the copy testing with Valgrind or ASan. +Since the memory poisoning tests will require the use of interfaces specific to the sanitizers used to poison memory, they must only be enabled when we are building with ASan or Valgrind. For now, we can auto-detect ASan at compile-time and set an option: `MBEDTLS_TEST_MEMORY_CAN_POISON`. When this option is enabled, we build with memory-poisoning support. This enables transparent testing with ASan without needing any extra configuration options. + +Auto-detection and memory-poisoning with Valgrind is left for future work. #### Validation of validation for copying |