Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not Review: Move CRACEN mutexes to threading_alt.c #18140

Closed
wants to merge 4 commits into from

Commits on Oct 24, 2024

  1. crypto: cracen: Move mutex to Mbed TLS threading_alt.c

    -This commit ensures that the check if we are calling from
     ISR and/or kernel is used for CRACEN (which doesn't allow
     mutex-interaction).
    -This commit checks for failures to lock with asserts
    -Change cracen to use mbedtls_mutex_lock/unlock
    -Change cracen mutexs init to happen in threading_alt.c through
     the post-kernel SYS_INIT.
    
    Signed-off-by: Frank Audun Kvamtrø <[email protected]>
    frkv committed Oct 24, 2024
    Configuration menu
    Copy the full SHA
    e2f7767 View commit details
    Browse the repository at this point in the history
  2. crypto: cracen: Ensure that register reads/writes are flushed for PK

    -Add memory barrier wmb() and rmb() around writes and reads for
     pk module (IKG) for cracen.
    
    Signed-off-by: Frank Audun Kvamtrø <[email protected]>
    frkv committed Oct 24, 2024
    Configuration menu
    Copy the full SHA
    0bbe275 View commit details
    Browse the repository at this point in the history
  3. crypto: threading: Ensure mbedtls_mutex functions can be used in TF-M

    -This commit moves checks to ensure we aren't in pre_kernel/ISR
     into its own function to ensure that this can be compiled in TF-M
     which will be the case for CRACEN enabled devices.
    -Adding static function is_pre_kernel_or_isr which is checks
     if TF-M and MultiThreading is enabled
    
    Signed-off-by: Frank Audun Kvamtrø <[email protected]>
    frkv committed Oct 24, 2024
    Configuration menu
    Copy the full SHA
    2ad6175 View commit details
    Browse the repository at this point in the history
  4. manifest: crypto: Adding a way to disable thread-safety for PSA core

    -This commit adds PSA_CRYPTO_THREAD_SAFE as a configuration that filters
     thread-safety enablement for PSA crypto APIs (front-end).
    -This commit adds a version of oberon-psa-crypto which supports
     PSA_CRYPTO_THREAD_SAFE (by updating the manifest)
    -This commit adds the Kconfig MBEDTLS_PSA_CRYPTO_DISABLE_THREAD_SAFETY
     which is used to ensure PSA_CRYPTO_THREAD_SAFE can be disabled if
     there is a wish to not enable thread-safety for the PSA crypto
     front-end APIs (separated from thread-safety for legacy Mbed TLS APIs
     and HW accelerated drivers.
    -This update includes a manifest-update to ensure that this change
     is bisectable.
    -Enable Mbed TLS threading APIs in nrf_security regardless if
     MBEDTLS_THREADING_C is enabled so they can be shared with cracen.
    -Add external prototypes for mbedtls_mutex_xxxx APIs that is used
     regardless if threading is actually enabled
    
    Note: This commit is done to try to resolve an ABI compliance issue with
    pre-compiled OpenThread libraries.
    
    Signed-off-by: Frank Audun Kvamtrø <[email protected]>
    frkv committed Oct 24, 2024
    Configuration menu
    Copy the full SHA
    71dd95f View commit details
    Browse the repository at this point in the history