Gábor Mezei
26bbd8dd4e
Merge branch 'mbedtls-2.28-restricted' into bp228_buffer_protection_for_cipher
...
Signed-off-by: Gábor Mezei <63054694+gabor-mezei-arm@users.noreply.github.com >
2024-03-04 15:39:35 +00:00
Gabor Mezei
50bcca26b3
Update test wrapper functions for ciper buffer protection
...
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com >
2024-02-29 16:44:23 +00:00
Gabor Mezei
143864c121
Add test wrapper functions for cipher buffer protection
...
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com >
2024-02-29 16:41:49 +00:00
David Horstmann
98397f0bba
Merge branch 'mbedtls-2.28-restricted' into generate-random-buffer-protection-backport
...
Signed-off-by: David Horstmann <david.horstmann@arm.com >
2024-02-29 14:27:16 +00:00
tom-daubney-arm
24d60ad716
Merge branch 'mbedtls-2.28-restricted' into backport_asymmetric_encrypt_buffer_protection
...
Signed-off-by: tom-daubney-arm <74920390+tom-daubney-arm@users.noreply.github.com >
2024-02-28 15:43:48 +00:00
David Horstmann
80de1475a1
Fix incorrect conflict resolution
...
A return statement was missing in the wrapper generation script.
Signed-off-by: David Horstmann <david.horstmann@arm.com >
2024-02-28 15:16:44 +00:00
David Horstmann
4e8215057c
Generate test wrappers for psa_generate_random()
...
Signed-off-by: David Horstmann <david.horstmann@arm.com >
2024-02-26 18:26:06 +00:00
Thomas Daubney
be060f1e85
Suppress pylint
...
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com >
2024-02-26 13:55:42 +00:00
tom-daubney-arm
8eafe1525d
Merge branch 'mbedtls-2.28-restricted' into backport_mac_buffer_protection
...
Signed-off-by: tom-daubney-arm <74920390+tom-daubney-arm@users.noreply.github.com >
2024-02-22 15:28:49 +00:00
David Horstmann
0ce9589e36
Merge pull request #1133 from davidhorstmann-arm/copying-aead-2.28
...
[Backport 2.28] Copy buffers in AEAD
2024-02-20 16:07:36 +00:00
David Horstmann
a9cc4cd1cb
Merge pull request #1179 from Ryan-Everett-arm/key-derivation-buffer-protection-backport
...
[Backport] Add buffer copying to the Key Derivation API
2024-02-15 11:54:28 +00:00
Thomas Daubney
2b614f9dad
Generate all test wrappers
...
One was missed due to typo
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com >
2024-02-12 13:07:48 +00:00
Thomas Daubney
d8adccf45d
Generate test wrappers
...
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com >
2024-02-12 13:07:43 +00:00
Thomas Daubney
6b91503602
Generate test wrappers for MAC functions
...
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com >
2024-02-12 12:21:43 +00:00
Thomas Daubney
ebf9329d88
Generate test wrappers for hash functions
...
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com >
2024-02-12 11:51:38 +00:00
Ryan Everett
6c9e69d53b
Add key derivation testing wrappers
...
Signed-off-by: Ryan Everett <ryan.everett@arm.com >
2024-02-09 16:23:25 +00:00
Dave Rodgman
5a2e95dcfa
Merge pull request #1164 from daverodgman/update-2.28-restricted
2024-02-02 17:45:18 +00:00
Ryan Everett
c8b6c05014
Update tests/scripts/generate_psa_wrappers.py
...
Co-authored-by: David Horstmann <david.horstmann@arm.com >
Signed-off-by: Ryan Everett <ryan.everett@arm.com >
2024-02-02 10:50:51 +00:00
Ryan Everett
cb4f855456
Fix line-too-long in script
...
Signed-off-by: Ryan Everett <ryan.everett@arm.com >
2024-02-02 10:50:51 +00:00
Ryan Everett
810421ccc6
Re-add cipher_encrypt buffer copying
...
Signed-off-by: Ryan Everett <ryan.everett@arm.com >
2024-02-02 10:50:51 +00:00
Ryan Everett
dcbc1d3750
Generate test wrappers for key management
...
Signed-off-by: Ryan Everett <ryan.everett@arm.com >
2024-02-02 10:50:51 +00:00
Thomas Daubney
c63e31af8b
Generate test wrappers
...
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com >
2024-01-30 13:33:14 +00:00
Dave Rodgman
9d52c713b2
Merge remote-tracking branch 'restricted/mbedtls-2.28' into mbedtls-2.28-restricted
2024-01-26 10:27:26 +00:00
David Horstmann
436b2ef633
Generate poisoning wrappers for AEAD
...
Modify wrapper generation script to generate poisoning calls and
regenerate wrappers.
Signed-off-by: David Horstmann <david.horstmann@arm.com >
2024-01-24 14:58:05 +00:00
David Horstmann
001ae3349d
Merge pull request #1143 from davidhorstmann-arm/memory-poisoning-runtime-enable-2.28
...
[Backport 2.28] Enable and disable memory poisoning at runtime
2024-01-24 14:46:52 +00:00
David Horstmann
1b421b1005
Separate memory poisoning tests from generic ASan
...
Some platforms may support ASan but be C99-only (no C11 support).
These platforms will support ASan metatests but not memory poisoning,
which requires C11 features.
To allow for this, create a separate platform requirement, "poison",
in metatest.c to distinguish generic ASan metatests from ones that
require suppport for memory poisoning.
In practice our platforms support both, so run "poison" tests in
the same all.sh components where we run "asan" ones.
Signed-off-by: David Horstmann <david.horstmann@arm.com >
2024-01-17 15:37:54 +00:00
Paul Elliott
56fd26cee9
Merge pull request #8640 from bensze01/release_components_2.28
...
[Backport 2.28] Set OpenSSL/GnuTLS variables when running release components
2024-01-11 15:38:23 +00:00
Gilles Peskine
a980aa0894
Disable PSA wrappers psa_collect_statuses builds
...
`psa_collect_statuses.py` runs `make RECORD_PSA_STATUS_COVERAGE_LOG=1`,
which builds with `RECORD_PSA_STATUS_COVERAGE_LOG`. In this mode, the build
includes wrappers for PSA functions, which conflict with the newly
introduced wrappers that are enabled whenever `MBEDTLS_TEST_HOOKS` is
enabled. In the future, the collect-statuses mechanism should use the new
generic wrapper mechanism. For the time being, keep the old wrappers and
avoid the new wrappers when doing the collect-statuses build.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com >
2024-01-04 21:07:35 +01:00
Gilles Peskine
b3d457ce2f
PSA wrappers: don't poison buffers when buffer copying is disabled
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com >
2024-01-04 20:33:29 +01:00
Gilles Peskine
7c7b7d5db3
Add review exception warning
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com >
2024-01-04 17:28:59 +01:00
Gilles Peskine
c8b22d0713
Generated PSA wrappers: poison/unpoison buffer parameters
...
For now, only instrument the one function for which buffer copying has been
implemented, namely `psa_cipher_encrypt`.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com >
2024-01-04 16:58:23 +01:00
Gilles Peskine
b7119c527c
Declare the outputs from generate_psa_wrappers.py as generated files
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com >
2024-01-04 16:47:15 +01:00
Gilles Peskine
17a14f1711
Adapt wrapper generators from 3.5 to 2.28
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com >
2024-01-04 16:41:30 +01:00
Gilles Peskine
8519dc9c7e
PSA wrapper generator
...
The new script `tests/scripts/generate_psa_wrappers.py` generates the
implementation of wrapper functions for PSA API functions, as well as a
header that defines macros that redirect calls to the wrapper functions. By
default, the wrapper functions just call the underlying library function.
With `--log`, the wrapper functions log the arguments and return values.
This commit only introduces the new script. Subsequent commits will
integrate the wrappers in the build.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com >
2024-01-04 16:38:17 +01:00
Dave Rodgman
ffb18d2012
Merge pull request #8670 from daverodgman/default-compiler-all-2.28
...
Backport CI perf: Use clang by default in all.sh
2024-01-04 12:58:50 +00:00
Dave Rodgman
e42c23569b
Don't use full path for setting CC
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2024-01-04 10:35:35 +00:00
Dave Rodgman
9d2c67f8e2
Use gcc in test_full_deprecated_warning
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2024-01-04 10:35:16 +00:00
Dave Rodgman
ce04f24737
Add -O2 to some CFLAGS which were not setting it
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2024-01-04 10:34:31 +00:00
Dave Rodgman
374b188468
Don't specify gcc unless the test requires it
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2024-01-04 10:30:57 +00:00
Dave Rodgman
b046b9a96b
Enable -O2 in depends.py
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2024-01-04 10:26:22 +00:00
Dave Rodgman
5b00fb111f
Use gcc in test_psa_compliance
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2024-01-04 10:26:17 +00:00
Dave Rodgman
b0660c22d9
Ensure test_psa_compliance uses gcc
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2024-01-04 10:26:07 +00:00
Dave Rodgman
e0a2f6d08d
Ensure clang is present
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2024-01-04 10:24:34 +00:00
Dave Rodgman
62be456449
Use clang by default
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2024-01-04 10:24:30 +00:00
David Horstmann
dda52ae1c6
Add all.sh coponent to test with copying disabled
...
Signed-off-by: David Horstmann <david.horstmann@arm.com >
2023-12-20 14:49:41 +00:00
Bence Szépkúti
cb89fbdc67
Set OpenSSL/GnuTLS variables in release components
...
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com >
2023-12-15 21:17:56 +01:00
Bence Szépkúti
44043ed127
Document release components in all.sh
...
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com >
2023-12-15 21:17:56 +01:00
Bence Szépkúti
2064c9b595
all.sh: Parse arguments before checking if a test is supported
...
Support for each test was checked before the command line had been
parsed, causing the support_ functions to ignore arguments that set a
tool's location.
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com >
2023-12-15 20:40:18 +01:00
Bence Szépkúti
e1c6c4c962
Do not run Valgrind tests in PR jobs
...
Co-authored-by: Dave Rodgman <dave.rodgman@arm.com >
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com >
2023-12-06 16:47:51 +00:00
Dave Rodgman
b9c70581a0
Merge pull request #8222 from tgonzalezorlandoarm/tg/backport-psa-low-hash-mac-size
...
Backport 2.28: Start testing the PSA built-in drivers: hashes
2023-11-21 15:39:36 +00:00