-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
pk.c fails to link on dual world systems #3300
Labels
bug
component-crypto
Crypto primitives and low-level interfaces
component-platform
Portability layer and build scripts
Comments
Patater
added
bug
component-crypto
Crypto primitives and low-level interfaces
component-platform
Portability layer and build scripts
labels
May 4, 2020
Patater
pushed a commit
to Patater/mbedtls
that referenced
this issue
May 4, 2020
On dual world platforms, we want to run the PK module (pk.c) on the NS side so TLS can use PSA APIs via the PK interface. PK currently has a hard dependency on mbedtls_ecc_group_to_psa() which is declared in crypto_extra.h, but only defined in psa_crypto.c, which is only built for the S side. Without this change, dual world platforms get error messages like the following. [Error] @0,0: L6218E: Undefined symbol mbedtls_ecc_group_to_psa (referred from BUILD/LPC55S69_NS/ARM/mbed-os/features/mbedtls/mbed-crypto/src/pk.o) Make mbedtls_ecc_group_to_psa() inline within crypto_extra.h so that it is available to both NS and S world code. Fixes Mbed-TLS#3300 Signed-off-by: Darryl Green <[email protected]> Signed-off-by: Jaeden Amero <[email protected]>
2 tasks
Patater
pushed a commit
to Patater/mbedtls
that referenced
this issue
May 5, 2020
On dual world platforms, we want to run the PK module (pk.c) on the NS side so TLS can use PSA APIs via the PK interface. PK currently has a hard dependency on mbedtls_ecc_group_to_psa() which is declared in crypto_extra.h, but only defined in psa_crypto.c, which is only built for the S side. Without this change, dual world platforms get error messages like the following. [Error] @0,0: L6218E: Undefined symbol mbedtls_ecc_group_to_psa (referred from BUILD/LPC55S69_NS/ARM/mbed-os/features/mbedtls/mbed-crypto/src/pk.o) Make mbedtls_ecc_group_to_psa() inline within crypto_extra.h so that it is available to both NS and S world code. Fixes Mbed-TLS#3300 Signed-off-by: Darryl Green <[email protected]> Signed-off-by: Jaeden Amero <[email protected]>
Patater
pushed a commit
to Patater/mbedtls
that referenced
this issue
May 5, 2020
On dual world platforms, we want to run the PK module (pk.c) on the NS side so TLS can use PSA APIs via the PK interface. PK currently has a hard dependency on mbedtls_ecc_group_to_psa() which is declared in crypto_extra.h, but only defined in psa_crypto.c, which is only built for the S side. Without this change, dual world platforms get error messages like the following. [Error] @0,0: L6218E: Undefined symbol mbedtls_ecc_group_to_psa (referred from BUILD/LPC55S69_NS/ARM/mbed-os/features/mbedtls/mbed-crypto/src/pk.o) Make mbedtls_ecc_group_to_psa() inline within crypto_extra.h so that it is available to both NS and S world code. Fixes Mbed-TLS#3300 Signed-off-by: Darryl Green <[email protected]> Signed-off-by: Jaeden Amero <[email protected]>
Patater
pushed a commit
to Patater/mbedtls
that referenced
this issue
May 5, 2020
On dual world platforms, we want to run the PK module (pk.c) on the NS side so TLS can use PSA APIs via the PK interface. PK currently has a hard dependency on mbedtls_ecc_group_to_psa() which is declared in crypto_extra.h, but only defined in psa_crypto.c, which is only built for the S side. Without this change, dual world platforms get error messages like the following. [Error] @0,0: L6218E: Undefined symbol mbedtls_ecc_group_to_psa (referred from BUILD/LPC55S69_NS/ARM/mbed-os/features/mbedtls/mbed-crypto/src/pk.o) Make mbedtls_ecc_group_to_psa() inline within crypto_extra.h so that it is available to both NS and S world code. Fixes Mbed-TLS#3300 Signed-off-by: Darryl Green <[email protected]> Signed-off-by: Jaeden Amero <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
component-crypto
Crypto primitives and low-level interfaces
component-platform
Portability layer and build scripts
Description
Bug
OS
Mbed OS
mbed TLS build:
Version: 2.22.0
Mbed OS version: 5.15.2
Expected behavior
Linker works without errors when building TLS+PK on NS world, with psa_crypto.c on S world.
Actual behavior
Linker generates errors when linking pk.c on NS.
[Error] @0,0: L6218E: Undefined symbol mbedtls_ecc_group_to_psa (referred from BUILD/LPC55S6
9_NS/ARM/mbed-os/features/mbedtls/mbed-crypto/src/pk.o)
Steps to reproduce
Build and link pk.c separately from psa_crypto.c
The text was updated successfully, but these errors were encountered: