From 1c3b227065aab4726ccdca80423dda4d08b8c433 Mon Sep 17 00:00:00 2001 From: David Horstmann Date: Mon, 18 Mar 2024 13:37:59 +0000 Subject: [PATCH] Abstractify example in design exploration Since this is just an example, remove specific-sounding references to mbedtls_psa_core_poison_memory() and replace with more abstract and generic-sounding memory_poison_hook() and memory_unpoison_hook(). Signed-off-by: David Horstmann --- docs/architecture/psa-shared-memory.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/architecture/psa-shared-memory.md b/docs/architecture/psa-shared-memory.md index 65864fb5e0..ffdb018dc8 100644 --- a/docs/architecture/psa-shared-memory.md +++ b/docs/architecture/psa-shared-memory.md @@ -301,14 +301,14 @@ In the library, the code that does the copying temporarily unpoisons the memory ```c static void copy_to_user(void *copy_buffer, void *const input_buffer, size_t length) { #if defined(MBEDTLS_TEST_HOOKS) - if (mbedtls_psa_core_poison_memory != NULL) { - mbedtls_psa_core_poison_memory(copy_buffer, length, 0); + if (memory_poison_hook != NULL) { + memory_poison_hook(copy_buffer, length); } #endif memcpy(copy_buffer, input_buffer, length); #if defined(MBEDTLS_TEST_HOOKS) - if (mbedtls_psa_core_poison_memory != NULL) { - mbedtls_psa_core_poison_memory(copy_buffer, length, 1); + if (memory_unpoison_hook != NULL) { + memory_unpoison_hook(copy_buffer, length); } #endif }