← Back to Pull requests

Updated TF-M patch set to latest version from TF-M 2.3.x release branch #18

Closed
unknown closed this pull request without merging on Nov 25, 2026 07:25 UTC
View on GitHub
unknown unknown commented on Nov 24, 2026 11:19 UTC
Author

Updated TF-M patch set to latest version from TF-M 2.3.x release branch (5392efc2491b947548b43254b9dcdac98a48fea1)

Rebased other changes on top

Dropped

  • [zep noup] Align autogenerated files to 1.1.2

  • [zep fromtree][tf-m] Crypto: fix unused variable when !BUILTIN_ALG_SP800_108_COUNTER_CMAC
  • as they are now part of the TF-M patchset. There is no real diff between both versions.

    Base branch should be the v1.1.2 tag, but I currently don't permissions here to push a new branch e.g. zephyr_tf-psa-crypto_v1.1.2-cleanup to point to the tag.

    git range-diff v1.1.2..zephyr_tf-psa-crypto_v1.1.2 v1.1.2..zephyr_tf-psa-crypto_v1.1.2-cleanup:

     1:  ecd1ead1b !  1:  24edcc538 [zep noup][tf-m] Add generated files to the source tree
        @@ core/psa_crypto_driver_wrappers.h (new)
         +#include "psa_crypto_pake.h"
         +#include "psa_crypto_rsa.h"
         +
        -+#if defined(TF_PSA_CRYPTO_PQCP_MLDSA_ENABLED)
        -+#include "psa_crypto_mldsa.h"
        -+#endif
        -+
         +#include "mbedtls/platform.h"
         +#include "mbedtls/constant_time.h"
         +/* END-common headers */
        @@ core/psa_crypto_driver_wrappers_no_static.c (new)
         +#include "psa_crypto_pake.h"
         +#include "psa_crypto_rsa.h"
         +
        -+#if defined(TF_PSA_CRYPTO_PQCP_MLDSA_ENABLED)
        -+#include "psa_crypto_mldsa.h"
        -+#endif
        -+
         +#include "mbedtls/platform.h"
         +/* END-common headers */
         +
     2:  b0ecb295f =  2:  8421493de [zep noup][tf-m] Add TF-M Builtin Key Loader driver entry points
     3:  f84e465ee =  3:  6a05a5053 [zep noup][tf-m] Enable crypto code sharing between independent binaries
     4:  8254f05c1 =  4:  a42b70234 [zep noup][tf-m] Initialise driver wrappers as first step in psa_crypto_init()
     5:  1f24aefa2 =  5:  44736d014 [zep noup][tf-m] Hardcode CC3XX entry points
     6:  282e9de52 =  6:  f65dcb29f [zep noup][tf-m] P256M: Add option to force not use of asm
     7:  95e1722aa =  7:  1478cc73c [zep noup][tf-m] psa: mac: only call memset if key_length is less than block size
     8:  4ec5c0285 !  8:  382bef6e0 [zep noup][tf-m] Add CC3XX Opaque Key entry points
        @@ core/psa_crypto_driver_wrappers.h
         +#include "cc3xx_opaque_keys.h"
         +#endif
          
        - #if defined(TF_PSA_CRYPTO_PQCP_MLDSA_ENABLED)
        - #include "psa_crypto_mldsa.h"
        + #include "mbedtls/platform.h"
        + #include "mbedtls/constant_time.h"
         @@ core/psa_crypto_driver_wrappers.h: static inline psa_status_t psa_driver_wrapper_cipher_decrypt_setup(
              switch( location )
              {
     9:  136609d47 =  9:  1dd20805b [zep noup][tf-m] Define base attributes and structure for SP800-108 CMAC
    10:  0b7a2ae38 = 10:  9c1c8d749 [zep noup][tf-m] Add experimental LMS support as a vendor extension
    11:  186b37e56 = 11:  f1b45278e [zep noup][tf-m] Re-add psa_can_do_cipher() to public interface
    12:  b967842be ! 12:  e0e24c40a [zep noup][tf-m] Implement SP800-108 Counter CMAC key derivation in PSA Crypto Core
        @@ core/psa_crypto.c: psa_status_t psa_key_derivation_set_capacity(psa_key_derivati
         +    }
         +#endif /* PSA_WANT_ALG_SP800_108_COUNTER_CMAC */
         +
        -+    return PSA_SUCCESS;
        -+}
        -+
        +     return PSA_SUCCESS;
        + }
        + 
         +#if defined(MBEDTLS_PSA_BUILTIN_ALG_SP800_108_COUNTER_CMAC)
         +static psa_status_t psa_sp800_108_counter_cmac_read(psa_sp800_108_cmac_key_derivation_t *kdf,
         +                                                    size_t capacity,
        @@ core/psa_crypto.c: psa_status_t psa_key_derivation_set_capacity(psa_key_derivati
         +        kdf->counter++;
         +    }
         +
        -     return PSA_SUCCESS;
        - }
        ++    return PSA_SUCCESS;
        ++}
         +#endif /* MBEDTLS_PSA_BUILTIN_ALG_SP800_108_COUNTER_CMAC */
        - 
        ++
          #if defined(BUILTIN_ALG_ANY_HKDF)
          /* Read some bytes from an HKDF-based operation. */
        + static psa_status_t psa_key_derivation_hkdf_read(psa_hkdf_key_derivation_t *hkdf,
         @@ core/psa_crypto.c: psa_status_t psa_key_derivation_output_bytes(
          
              operation->capacity -= output_length;
        @@ core/psa_crypto.c: static psa_status_t psa_key_derivation_input_internal(
         +        status = psa_sp800_108_counter_cmac_input(&operation->ctx.sp800_108_cmac,
         +                                                  attributes, step, data, data_length);
         +    } else
        ++#else /* MBEDTLS_PSA_BUILTIN_ALG_SP800_108_COUNTER_CMAC */
        ++    (void) attributes;
         +#endif /* MBEDTLS_PSA_BUILTIN_ALG_SP800_108_COUNTER_CMAC */
          #if defined(BUILTIN_ALG_ANY_HKDF)
              if (PSA_ALG_IS_ANY_HKDF(kdf_alg)) {
    13:  4dcfd887f = 13:  4aeff0379 [zep noup][tf-m] Support use of cc3xx opaque keys in PSA Crypto core
    14:  7df11bd1f = 14:  50d8d89d6 [zep noup][tf-m] Re-add support for AES Keywrap for TF-M
    15:  3d756718f = 15:  6dcef1471 [zep noup][tf-m] Do not define __STDC_WANT_LIB_EXT1__ with ATfE
    16:  73385ae9f = 16:  440f62694 [zep noup] remove framework subrepo
    17:  a83fc24ca = 17:  cd450001d [zep noup] add module.yml file
    18:  e14e778ff = 18:  a4ea30e78 [zep noup] replace upstream readme
    19:  fa0a6be78 = 19:  8b9c45aa5 [zep noup] align minimum CMake version required with Zephyr
    20:  5de8d7884 = 20:  59241b0d6 [zep noup] delete .github/pull_request_template.md
    21:  8cefa503f = 21:  a699ec4c6 [zep noup] Remove auto-generated files from core/.gitignore
    22:  d3b601ec7 = 22:  f241abf4e [zep noup] Move psa_crypto_driver_wrappers* auto-generated files
    23:  c369adf8d = 23:  7268d58a6 [zep noup] Move driver wrappers to dispatch directory
    24:  632292f76 <  -:  --------- [zep noup] Align autogenerated files to 1.1.2
    25:  2fe4a69cb <  -:  --------- [zep fromtree][tf-m] Crypto: fix unused variable when !BUILTIN_ALG_SP800_108_COUNTER_CMAC
    

    Diff: 650 lines (+487 / -163) across 8 files Reviewer: tomi-font Review duration: 1205m
    All Vouch review confidence checks passed
    Residual risk 0.21 = Change Risk (0.52) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.52 · 650 lines diff across 8 files
    0.52
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.388
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #18"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 52% (MEDIUM) · Higher = larger blast radius
    52%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 20.5% · Safe to merge
    20.5%