54e3c6593e
The test driver library tries to only build what's necessary, but must use the same PSA_WANT macros as the main library. So, for things that are not needed, it undefines MBEDTLS_PSA_BUILTIN_xxx and defines MBEDTLS_PSA_ACCEL_xxx, unless the ACCEL symbol was defined on the command line, in which case it undefines it and defineds BUILTIN instead. This negation happens in crypto_config_test_driver_extension.h and reflects the fact that what we want accelerated in the main library is what we want built-in in the driver library (and vice versa if we want to minimize the size of the driver library). So, the ACCEL symbols in inside the test driver library (while it's being built, not those on the command line) are a bit of a white lie: they don't actually mean "there's an accelerator for this" but instead "I won't include a built-in for this even though the corresponding PSA_WANT symbol is defined". This was quite harmless until MD started making dispatch decisions based on the ACCEL symbols: when it tries to dispatch to an accelerator that doesn't actually exist, things tend to go badly. The minimal fix for this is to change how we enable extra hashes in the test driver library: by defining the ACCEL symbol on the command line, in the build we'll end up with the BUILTIN symbol (and implementation!) and no ACCEL symbol, which is exactly what we want. Long version: https://arm-ce.slack.com/archives/GTM3SM1K5/p1675071671707599 Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com> |
||
---|---|---|
.. | ||
all-in-docker.sh | ||
all.sh | ||
analyze_outcomes.py | ||
basic-build-test.sh | ||
basic-in-docker.sh | ||
check-doxy-blocks.pl | ||
check-generated-files.sh | ||
check-python-files.sh | ||
check_files.py | ||
check_names.py | ||
check_test_cases.py | ||
depends.py | ||
docker_env.sh | ||
doxygen.sh | ||
gen_ctr_drbg.pl | ||
gen_gcm_decrypt.pl | ||
gen_gcm_encrypt.pl | ||
gen_pkcs1_v21_sign_verify.pl | ||
generate-afl-tests.sh | ||
generate_bignum_tests.py | ||
generate_ecp_tests.py | ||
generate_pkcs7_tests.py | ||
generate_psa_tests.py | ||
generate_test_code.py | ||
generate_tls13_compat_tests.py | ||
list-identifiers.sh | ||
list_internal_identifiers.py | ||
psa_collect_statuses.py | ||
recursion.pl | ||
run-test-suites.pl | ||
scripts_path.py | ||
set_psa_test_dependencies.py | ||
tcp_client.pl | ||
test-ref-configs.pl | ||
test_config_script.py | ||
test_generate_test_code.py | ||
test_psa_compliance.py | ||
test_psa_constant_names.py | ||
test_zeroize.gdb | ||
translate_ciphers.py | ||
travis-log-failure.sh |