Update wrapper generation script and regenerate

Update the guards generated by the wrapper generation script to use
!MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS and regenerate the PSA test
wrappers.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
diff --git a/tests/scripts/generate_psa_wrappers.py b/tests/scripts/generate_psa_wrappers.py
index 1ab71d3..755a584 100755
--- a/tests/scripts/generate_psa_wrappers.py
+++ b/tests/scripts/generate_psa_wrappers.py
@@ -140,10 +140,10 @@
         """
         if not buffer_parameters:
             return
-        out.write('#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)\n')
+        out.write('#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)\n')
         for param in buffer_parameters:
             self._write_poison_buffer_parameter(out, param, poison)
-        out.write('#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */\n')
+        out.write('#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */\n')
 
     @staticmethod
     def _parameter_should_be_copied(function_name: str,
diff --git a/tests/src/psa_test_wrappers.c b/tests/src/psa_test_wrappers.c
index 3aa8020..e70ffb3 100644
--- a/tests/src/psa_test_wrappers.c
+++ b/tests/src/psa_test_wrappers.c
@@ -66,19 +66,19 @@
     size_t arg9_plaintext_size,
     size_t *arg10_plaintext_length)
 {
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
     MBEDTLS_TEST_MEMORY_POISON(arg2_nonce, arg3_nonce_length);
     MBEDTLS_TEST_MEMORY_POISON(arg4_additional_data, arg5_additional_data_length);
     MBEDTLS_TEST_MEMORY_POISON(arg6_ciphertext, arg7_ciphertext_length);
     MBEDTLS_TEST_MEMORY_POISON(arg8_plaintext, arg9_plaintext_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
     psa_status_t status = (psa_aead_decrypt)(arg0_key, arg1_alg, arg2_nonce, arg3_nonce_length, arg4_additional_data, arg5_additional_data_length, arg6_ciphertext, arg7_ciphertext_length, arg8_plaintext, arg9_plaintext_size, arg10_plaintext_length);
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
     MBEDTLS_TEST_MEMORY_UNPOISON(arg2_nonce, arg3_nonce_length);
     MBEDTLS_TEST_MEMORY_UNPOISON(arg4_additional_data, arg5_additional_data_length);
     MBEDTLS_TEST_MEMORY_UNPOISON(arg6_ciphertext, arg7_ciphertext_length);
     MBEDTLS_TEST_MEMORY_UNPOISON(arg8_plaintext, arg9_plaintext_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
     return status;
 }
 
@@ -96,19 +96,19 @@
     size_t arg9_ciphertext_size,
     size_t *arg10_ciphertext_length)
 {
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
     MBEDTLS_TEST_MEMORY_POISON(arg2_nonce, arg3_nonce_length);
     MBEDTLS_TEST_MEMORY_POISON(arg4_additional_data, arg5_additional_data_length);
     MBEDTLS_TEST_MEMORY_POISON(arg6_plaintext, arg7_plaintext_length);
     MBEDTLS_TEST_MEMORY_POISON(arg8_ciphertext, arg9_ciphertext_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
     psa_status_t status = (psa_aead_encrypt)(arg0_key, arg1_alg, arg2_nonce, arg3_nonce_length, arg4_additional_data, arg5_additional_data_length, arg6_plaintext, arg7_plaintext_length, arg8_ciphertext, arg9_ciphertext_size, arg10_ciphertext_length);
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
     MBEDTLS_TEST_MEMORY_UNPOISON(arg2_nonce, arg3_nonce_length);
     MBEDTLS_TEST_MEMORY_UNPOISON(arg4_additional_data, arg5_additional_data_length);
     MBEDTLS_TEST_MEMORY_UNPOISON(arg6_plaintext, arg7_plaintext_length);
     MBEDTLS_TEST_MEMORY_UNPOISON(arg8_ciphertext, arg9_ciphertext_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
     return status;
 }
 
@@ -124,17 +124,17 @@
     size_t arg7_output_size,
     size_t *arg8_output_length)
 {
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
     MBEDTLS_TEST_MEMORY_POISON(arg2_input, arg3_input_length);
     MBEDTLS_TEST_MEMORY_POISON(arg4_salt, arg5_salt_length);
     MBEDTLS_TEST_MEMORY_POISON(arg6_output, arg7_output_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
     psa_status_t status = (psa_asymmetric_decrypt)(arg0_key, arg1_alg, arg2_input, arg3_input_length, arg4_salt, arg5_salt_length, arg6_output, arg7_output_size, arg8_output_length);
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
     MBEDTLS_TEST_MEMORY_UNPOISON(arg2_input, arg3_input_length);
     MBEDTLS_TEST_MEMORY_UNPOISON(arg4_salt, arg5_salt_length);
     MBEDTLS_TEST_MEMORY_UNPOISON(arg6_output, arg7_output_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
     return status;
 }
 
@@ -150,17 +150,17 @@
     size_t arg7_output_size,
     size_t *arg8_output_length)
 {
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
     MBEDTLS_TEST_MEMORY_POISON(arg2_input, arg3_input_length);
     MBEDTLS_TEST_MEMORY_POISON(arg4_salt, arg5_salt_length);
     MBEDTLS_TEST_MEMORY_POISON(arg6_output, arg7_output_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
     psa_status_t status = (psa_asymmetric_encrypt)(arg0_key, arg1_alg, arg2_input, arg3_input_length, arg4_salt, arg5_salt_length, arg6_output, arg7_output_size, arg8_output_length);
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
     MBEDTLS_TEST_MEMORY_UNPOISON(arg2_input, arg3_input_length);
     MBEDTLS_TEST_MEMORY_UNPOISON(arg4_salt, arg5_salt_length);
     MBEDTLS_TEST_MEMORY_UNPOISON(arg6_output, arg7_output_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
     return status;
 }
 
@@ -182,15 +182,15 @@
     size_t arg5_output_size,
     size_t *arg6_output_length)
 {
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
     MBEDTLS_TEST_MEMORY_POISON(arg2_input, arg3_input_length);
     MBEDTLS_TEST_MEMORY_POISON(arg4_output, arg5_output_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
     psa_status_t status = (psa_cipher_decrypt)(arg0_key, arg1_alg, arg2_input, arg3_input_length, arg4_output, arg5_output_size, arg6_output_length);
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
     MBEDTLS_TEST_MEMORY_UNPOISON(arg2_input, arg3_input_length);
     MBEDTLS_TEST_MEMORY_UNPOISON(arg4_output, arg5_output_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
     return status;
 }
 
@@ -214,15 +214,15 @@
     size_t arg5_output_size,
     size_t *arg6_output_length)
 {
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
     MBEDTLS_TEST_MEMORY_POISON(arg2_input, arg3_input_length);
     MBEDTLS_TEST_MEMORY_POISON(arg4_output, arg5_output_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
     psa_status_t status = (psa_cipher_encrypt)(arg0_key, arg1_alg, arg2_input, arg3_input_length, arg4_output, arg5_output_size, arg6_output_length);
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
     MBEDTLS_TEST_MEMORY_UNPOISON(arg2_input, arg3_input_length);
     MBEDTLS_TEST_MEMORY_UNPOISON(arg4_output, arg5_output_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
     return status;
 }
 
@@ -243,13 +243,13 @@
     size_t arg2_output_size,
     size_t *arg3_output_length)
 {
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
     MBEDTLS_TEST_MEMORY_POISON(arg1_output, arg2_output_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
     psa_status_t status = (psa_cipher_finish)(arg0_operation, arg1_output, arg2_output_size, arg3_output_length);
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
     MBEDTLS_TEST_MEMORY_UNPOISON(arg1_output, arg2_output_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
     return status;
 }
 
@@ -260,13 +260,13 @@
     size_t arg2_iv_size,
     size_t *arg3_iv_length)
 {
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
     MBEDTLS_TEST_MEMORY_POISON(arg1_iv, arg2_iv_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
     psa_status_t status = (psa_cipher_generate_iv)(arg0_operation, arg1_iv, arg2_iv_size, arg3_iv_length);
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
     MBEDTLS_TEST_MEMORY_UNPOISON(arg1_iv, arg2_iv_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
     return status;
 }
 
@@ -276,13 +276,13 @@
     const uint8_t *arg1_iv,
     size_t arg2_iv_length)
 {
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
     MBEDTLS_TEST_MEMORY_POISON(arg1_iv, arg2_iv_length);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
     psa_status_t status = (psa_cipher_set_iv)(arg0_operation, arg1_iv, arg2_iv_length);
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
     MBEDTLS_TEST_MEMORY_UNPOISON(arg1_iv, arg2_iv_length);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
     return status;
 }
 
@@ -295,15 +295,15 @@
     size_t arg4_output_size,
     size_t *arg5_output_length)
 {
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
     MBEDTLS_TEST_MEMORY_POISON(arg1_input, arg2_input_length);
     MBEDTLS_TEST_MEMORY_POISON(arg3_output, arg4_output_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
     psa_status_t status = (psa_cipher_update)(arg0_operation, arg1_input, arg2_input_length, arg3_output, arg4_output_size, arg5_output_length);
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
     MBEDTLS_TEST_MEMORY_UNPOISON(arg1_input, arg2_input_length);
     MBEDTLS_TEST_MEMORY_UNPOISON(arg3_output, arg4_output_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
     return status;
 }
 
@@ -339,13 +339,13 @@
     size_t arg2_data_size,
     size_t *arg3_data_length)
 {
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
     MBEDTLS_TEST_MEMORY_POISON(arg1_data, arg2_data_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
     psa_status_t status = (psa_export_key)(arg0_key, arg1_data, arg2_data_size, arg3_data_length);
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
     MBEDTLS_TEST_MEMORY_UNPOISON(arg1_data, arg2_data_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
     return status;
 }
 
@@ -356,13 +356,13 @@
     size_t arg2_data_size,
     size_t *arg3_data_length)
 {
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
     MBEDTLS_TEST_MEMORY_POISON(arg1_data, arg2_data_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
     psa_status_t status = (psa_export_public_key)(arg0_key, arg1_data, arg2_data_size, arg3_data_length);
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
     MBEDTLS_TEST_MEMORY_UNPOISON(arg1_data, arg2_data_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
     return status;
 }
 
@@ -380,13 +380,13 @@
     uint8_t *arg0_output,
     size_t arg1_output_size)
 {
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
     MBEDTLS_TEST_MEMORY_POISON(arg0_output, arg1_output_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
     psa_status_t status = (psa_generate_random)(arg0_output, arg1_output_size);
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
     MBEDTLS_TEST_MEMORY_UNPOISON(arg0_output, arg1_output_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
     return status;
 }
 
@@ -424,15 +424,15 @@
     const uint8_t *arg3_hash,
     size_t arg4_hash_length)
 {
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
     MBEDTLS_TEST_MEMORY_POISON(arg1_input, arg2_input_length);
     MBEDTLS_TEST_MEMORY_POISON(arg3_hash, arg4_hash_length);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
     psa_status_t status = (psa_hash_compare)(arg0_alg, arg1_input, arg2_input_length, arg3_hash, arg4_hash_length);
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
     MBEDTLS_TEST_MEMORY_UNPOISON(arg1_input, arg2_input_length);
     MBEDTLS_TEST_MEMORY_UNPOISON(arg3_hash, arg4_hash_length);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
     return status;
 }
 
@@ -445,15 +445,15 @@
     size_t arg4_hash_size,
     size_t *arg5_hash_length)
 {
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
     MBEDTLS_TEST_MEMORY_POISON(arg1_input, arg2_input_length);
     MBEDTLS_TEST_MEMORY_POISON(arg3_hash, arg4_hash_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
     psa_status_t status = (psa_hash_compute)(arg0_alg, arg1_input, arg2_input_length, arg3_hash, arg4_hash_size, arg5_hash_length);
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
     MBEDTLS_TEST_MEMORY_UNPOISON(arg1_input, arg2_input_length);
     MBEDTLS_TEST_MEMORY_UNPOISON(arg3_hash, arg4_hash_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
     return status;
 }
 
@@ -464,13 +464,13 @@
     size_t arg2_hash_size,
     size_t *arg3_hash_length)
 {
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
     MBEDTLS_TEST_MEMORY_POISON(arg1_hash, arg2_hash_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
     psa_status_t status = (psa_hash_finish)(arg0_operation, arg1_hash, arg2_hash_size, arg3_hash_length);
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
     MBEDTLS_TEST_MEMORY_UNPOISON(arg1_hash, arg2_hash_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
     return status;
 }
 
@@ -489,13 +489,13 @@
     const uint8_t *arg1_input,
     size_t arg2_input_length)
 {
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
     MBEDTLS_TEST_MEMORY_POISON(arg1_input, arg2_input_length);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
     psa_status_t status = (psa_hash_update)(arg0_operation, arg1_input, arg2_input_length);
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
     MBEDTLS_TEST_MEMORY_UNPOISON(arg1_input, arg2_input_length);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
     return status;
 }
 
@@ -505,13 +505,13 @@
     const uint8_t *arg1_hash,
     size_t arg2_hash_length)
 {
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
     MBEDTLS_TEST_MEMORY_POISON(arg1_hash, arg2_hash_length);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
     psa_status_t status = (psa_hash_verify)(arg0_operation, arg1_hash, arg2_hash_length);
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
     MBEDTLS_TEST_MEMORY_UNPOISON(arg1_hash, arg2_hash_length);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
     return status;
 }
 
@@ -522,13 +522,13 @@
     size_t arg2_data_length,
     mbedtls_svc_key_id_t *arg3_key)
 {
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
     MBEDTLS_TEST_MEMORY_POISON(arg1_data, arg2_data_length);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
     psa_status_t status = (psa_import_key)(arg0_attributes, arg1_data, arg2_data_length, arg3_key);
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
     MBEDTLS_TEST_MEMORY_UNPOISON(arg1_data, arg2_data_length);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
     return status;
 }
 
@@ -556,13 +556,13 @@
     const uint8_t *arg2_data,
     size_t arg3_data_length)
 {
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
     MBEDTLS_TEST_MEMORY_POISON(arg2_data, arg3_data_length);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
     psa_status_t status = (psa_key_derivation_input_bytes)(arg0_operation, arg1_step, arg2_data, arg3_data_length);
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
     MBEDTLS_TEST_MEMORY_UNPOISON(arg2_data, arg3_data_length);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
     return status;
 }
 
@@ -584,13 +584,13 @@
     const uint8_t *arg3_peer_key,
     size_t arg4_peer_key_length)
 {
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
     MBEDTLS_TEST_MEMORY_POISON(arg3_peer_key, arg4_peer_key_length);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
     psa_status_t status = (psa_key_derivation_key_agreement)(arg0_operation, arg1_step, arg2_private_key, arg3_peer_key, arg4_peer_key_length);
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
     MBEDTLS_TEST_MEMORY_UNPOISON(arg3_peer_key, arg4_peer_key_length);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
     return status;
 }
 
@@ -600,13 +600,13 @@
     uint8_t *arg1_output,
     size_t arg2_output_length)
 {
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
     MBEDTLS_TEST_MEMORY_POISON(arg1_output, arg2_output_length);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
     psa_status_t status = (psa_key_derivation_output_bytes)(arg0_operation, arg1_output, arg2_output_length);
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
     MBEDTLS_TEST_MEMORY_UNPOISON(arg1_output, arg2_output_length);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
     return status;
 }
 
@@ -656,15 +656,15 @@
     size_t arg5_mac_size,
     size_t *arg6_mac_length)
 {
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
     MBEDTLS_TEST_MEMORY_POISON(arg2_input, arg3_input_length);
     MBEDTLS_TEST_MEMORY_POISON(arg4_mac, arg5_mac_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
     psa_status_t status = (psa_mac_compute)(arg0_key, arg1_alg, arg2_input, arg3_input_length, arg4_mac, arg5_mac_size, arg6_mac_length);
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
     MBEDTLS_TEST_MEMORY_UNPOISON(arg2_input, arg3_input_length);
     MBEDTLS_TEST_MEMORY_UNPOISON(arg4_mac, arg5_mac_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
     return status;
 }
 
@@ -675,13 +675,13 @@
     size_t arg2_mac_size,
     size_t *arg3_mac_length)
 {
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
     MBEDTLS_TEST_MEMORY_POISON(arg1_mac, arg2_mac_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
     psa_status_t status = (psa_mac_sign_finish)(arg0_operation, arg1_mac, arg2_mac_size, arg3_mac_length);
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
     MBEDTLS_TEST_MEMORY_UNPOISON(arg1_mac, arg2_mac_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
     return status;
 }
 
@@ -701,13 +701,13 @@
     const uint8_t *arg1_input,
     size_t arg2_input_length)
 {
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
     MBEDTLS_TEST_MEMORY_POISON(arg1_input, arg2_input_length);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
     psa_status_t status = (psa_mac_update)(arg0_operation, arg1_input, arg2_input_length);
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
     MBEDTLS_TEST_MEMORY_UNPOISON(arg1_input, arg2_input_length);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
     return status;
 }
 
@@ -720,15 +720,15 @@
     const uint8_t *arg4_mac,
     size_t arg5_mac_length)
 {
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
     MBEDTLS_TEST_MEMORY_POISON(arg2_input, arg3_input_length);
     MBEDTLS_TEST_MEMORY_POISON(arg4_mac, arg5_mac_length);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
     psa_status_t status = (psa_mac_verify)(arg0_key, arg1_alg, arg2_input, arg3_input_length, arg4_mac, arg5_mac_length);
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
     MBEDTLS_TEST_MEMORY_UNPOISON(arg2_input, arg3_input_length);
     MBEDTLS_TEST_MEMORY_UNPOISON(arg4_mac, arg5_mac_length);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
     return status;
 }
 
@@ -738,13 +738,13 @@
     const uint8_t *arg1_mac,
     size_t arg2_mac_length)
 {
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
     MBEDTLS_TEST_MEMORY_POISON(arg1_mac, arg2_mac_length);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
     psa_status_t status = (psa_mac_verify_finish)(arg0_operation, arg1_mac, arg2_mac_length);
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
     MBEDTLS_TEST_MEMORY_UNPOISON(arg1_mac, arg2_mac_length);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
     return status;
 }
 
@@ -776,15 +776,15 @@
     size_t arg5_output_size,
     size_t *arg6_output_length)
 {
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
     MBEDTLS_TEST_MEMORY_POISON(arg2_peer_key, arg3_peer_key_length);
     MBEDTLS_TEST_MEMORY_POISON(arg4_output, arg5_output_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
     psa_status_t status = (psa_raw_key_agreement)(arg0_alg, arg1_private_key, arg2_peer_key, arg3_peer_key_length, arg4_output, arg5_output_size, arg6_output_length);
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
     MBEDTLS_TEST_MEMORY_UNPOISON(arg2_peer_key, arg3_peer_key_length);
     MBEDTLS_TEST_MEMORY_UNPOISON(arg4_output, arg5_output_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
     return status;
 }
 
@@ -798,15 +798,15 @@
     size_t arg5_signature_size,
     size_t *arg6_signature_length)
 {
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
     MBEDTLS_TEST_MEMORY_POISON(arg2_hash, arg3_hash_length);
     MBEDTLS_TEST_MEMORY_POISON(arg4_signature, arg5_signature_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
     psa_status_t status = (psa_sign_hash)(arg0_key, arg1_alg, arg2_hash, arg3_hash_length, arg4_signature, arg5_signature_size, arg6_signature_length);
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
     MBEDTLS_TEST_MEMORY_UNPOISON(arg2_hash, arg3_hash_length);
     MBEDTLS_TEST_MEMORY_UNPOISON(arg4_signature, arg5_signature_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
     return status;
 }
 
@@ -820,15 +820,15 @@
     size_t arg5_signature_size,
     size_t *arg6_signature_length)
 {
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
     MBEDTLS_TEST_MEMORY_POISON(arg2_input, arg3_input_length);
     MBEDTLS_TEST_MEMORY_POISON(arg4_signature, arg5_signature_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
     psa_status_t status = (psa_sign_message)(arg0_key, arg1_alg, arg2_input, arg3_input_length, arg4_signature, arg5_signature_size, arg6_signature_length);
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
     MBEDTLS_TEST_MEMORY_UNPOISON(arg2_input, arg3_input_length);
     MBEDTLS_TEST_MEMORY_UNPOISON(arg4_signature, arg5_signature_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
     return status;
 }
 
@@ -841,15 +841,15 @@
     const uint8_t *arg4_signature,
     size_t arg5_signature_length)
 {
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
     MBEDTLS_TEST_MEMORY_POISON(arg2_hash, arg3_hash_length);
     MBEDTLS_TEST_MEMORY_POISON(arg4_signature, arg5_signature_length);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
     psa_status_t status = (psa_verify_hash)(arg0_key, arg1_alg, arg2_hash, arg3_hash_length, arg4_signature, arg5_signature_length);
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
     MBEDTLS_TEST_MEMORY_UNPOISON(arg2_hash, arg3_hash_length);
     MBEDTLS_TEST_MEMORY_UNPOISON(arg4_signature, arg5_signature_length);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
     return status;
 }
 
@@ -862,15 +862,15 @@
     const uint8_t *arg4_signature,
     size_t arg5_signature_length)
 {
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
     MBEDTLS_TEST_MEMORY_POISON(arg2_input, arg3_input_length);
     MBEDTLS_TEST_MEMORY_POISON(arg4_signature, arg5_signature_length);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
     psa_status_t status = (psa_verify_message)(arg0_key, arg1_alg, arg2_input, arg3_input_length, arg4_signature, arg5_signature_length);
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
     MBEDTLS_TEST_MEMORY_UNPOISON(arg2_input, arg3_input_length);
     MBEDTLS_TEST_MEMORY_UNPOISON(arg4_signature, arg5_signature_length);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
     return status;
 }