Skip to content

Commit fbfbfa6

Browse files
committed
ci: add LMS sim feature combinations to test matrix
Cover sig-lms across the same swap/validate/multiimage/ram-load/ direct-xip/downgrade-prevention/hw-rollback-protection axes the sig-ecdsa-psa mbedtls-v4 rows do, minus encryption — LMS+enc isn't wired anywhere yet (see plan-lms.md). sig-lms auto-routes to the mbedtls 4.x PSA build path via add_mbedtls_v4_psa_lms() in build.rs, so no separate mbedtls-v4 feature is needed on these rows. Also extend sim_run.sh's --test-threads=1 guard to match lms and mbedtls-v4. PSA's global state is only thread-safe with MBEDTLS_THREADING_C, which our v4 configs don't enable; LMS verification sits on psa_hash_* and inherits the constraint regardless of feature label, and the simulator's external-RNG stub uses libc rand() which is not thread-safe either. Assisted-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Signed-off-by: David Brown <david.brown@linaro.org>
1 parent 2ce28aa commit fbfbfa6

2 files changed

Lines changed: 16 additions & 2 deletions

File tree

.github/workflows/sim.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,15 @@ jobs:
6868
# BOOT_ENC_KEY_SIZE. PSA_KEY_TYPE_AES covers all AES key
6969
# sizes so no config delta.
7070
- "sig-ecdsa-psa enc-aes256-ec256 mbedtls-v4,sig-ecdsa-psa enc-aes256-ec256 swap-offset validate-primary-slot max-align-16 mbedtls-v4"
71+
# LMS post-quantum signatures. sig-lms auto-routes to the
72+
# mbedtls 4.x PSA build path (see add_mbedtls_v4_psa_lms in
73+
# build.rs) — no separate mbedtls-v4 feature needed. No
74+
# encryption combos: LMS+enc isn't wired anywhere yet.
75+
- "sig-lms,sig-lms swap-move,sig-lms swap-offset"
76+
- "sig-lms validate-primary-slot,sig-lms overwrite-only,sig-lms multiimage"
77+
- "sig-lms bootstrap max-align-16,sig-lms max-align-32"
78+
- "sig-lms ram-load,sig-lms direct-xip"
79+
- "sig-lms overwrite-only downgrade-prevention,sig-lms hw-rollback-protection multiimage"
7180
- "ram-load enc-aes256-kw multiimage"
7281
- "ram-load enc-aes256-kw sig-ecdsa-mbedtls multiimage"
7382
runs-on: ubuntu-latest

ci/sim_run.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,15 @@ if [[ ! -z $MULTI_FEATURES ]]; then
4444
IFS=','
4545
read -ra multi_features <<< "$MULTI_FEATURES"
4646

47-
# psa crypto tests require single thread mode
47+
# PSA crypto's global state is only thread-safe when
48+
# MBEDTLS_THREADING_C is enabled, which our v4 configs don't set.
49+
# sig-lms inherits this constraint — mbedtls's LMS verifier sits on
50+
# top of psa_hash_* — and the simulator's external-RNG stub uses
51+
# libc rand() which is not thread-safe either. Force single-thread
52+
# mode for any feature combination that touches the v4 PSA path.
4853
TEST_ARGS=''
4954
for features in "${multi_features[@]}"; do
50-
if [[ $features =~ "psa" ]]; then
55+
if [[ $features =~ "psa" || $features =~ "lms" || $features =~ "mbedtls-v4" ]]; then
5156
TEST_ARGS='--test-threads=1'
5257
break
5358
fi

0 commit comments

Comments
 (0)