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

nrf_security: Remove redefined Kconfigs #20107

Merged
merged 1 commit into from
Feb 4, 2025

Conversation

nordicjm
Copy link
Contributor

Removes Kconfigs that are redefined because they are defined in an out of tree repo to prevent hiding problems if these symbols are renamed or removed

@nordicjm nordicjm requested review from a team as code owners January 29, 2025 09:09
@github-actions github-actions bot added the changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. label Jan 29, 2025
@NordicBuilder
Copy link
Contributor

NordicBuilder commented Jan 29, 2025

CI Information

To view the history of this post, clich the 'edited' button above
Build number: 5

Inputs:

Sources:

sdk-nrf: PR head: 05d05459bcfd05b8cd75a8603e88dcb948075116

more details

sdk-nrf:

PR head: 05d05459bcfd05b8cd75a8603e88dcb948075116
merge base: 5561499561f6b0a1a03790155ece7b7c65dce003
target head (main): 5561499561f6b0a1a03790155ece7b7c65dce003
Diff

Github labels

Enabled Name Description
ci-disabled Disable the ci execution
ci-all-test Run all of ci, no test spec filtering will be done
ci-force-downstream Force execution of downstream even if twister fails
ci-run-twister Force run twister
ci-run-zephyr-twister Force run zephyr twister
List of changed files detected by CI (3)
subsys
│  ├── nrf_security
│  │  ├── Kconfig
│  │  ├── src
│  │  │  ├── drivers
│  │  │  │  ├── Kconfig
│  │  │  │  ├── cracen
│  │  │  │  │  │ psa_driver.Kconfig

Outputs:

Toolchain

Version: 342151af73
Build docker image: docker-dtr.nordicsemi.no/sw-production/ncs-build:342151af73_912848a074

Test Spec & Results: ✅ Success; ❌ Failure; 🟠 Queued; 🟡 Progress; ◻️ Skipped; ⚠️ Quarantine

  • ◻️ Toolchain - Skipped: existing toolchain is used
  • ✅ Build twister
    • sdk-nrf test count: 1609
  • ❌ Integration tests
    • ❌ test-fw-nrfconnect-chip
    • ✅ test-fw-nrfconnect-nrf_crypto
    • ✅ test-fw-nrfconnect-tfm
    • ❌ test-sdk-find-my
    • ✅ test-sdk-sidewalk
    • ✅ test-sdk-dfu
    • ⚠️ test-fw-nrfconnect-nrf-iot_cloud
Disabled integration tests
    • desktop52_verification
    • doc-internal
    • test_ble_nrf_config
    • test-fw-nrfconnect-apps
    • test-fw-nrfconnect-ble_mesh
    • test-fw-nrfconnect-ble_samples
    • test-fw-nrfconnect-boot
    • test-fw-nrfconnect-fem
    • test-fw-nrfconnect-nfc
    • test-fw-nrfconnect-nrf-iot_lwm2m
    • test-fw-nrfconnect-nrf-iot_mosh
    • test-fw-nrfconnect-nrf-iot_positioning
    • test-fw-nrfconnect-nrf-iot_samples
    • test-fw-nrfconnect-nrf-iot_serial_lte_modem
    • test-fw-nrfconnect-nrf-iot_thingy91
    • test-fw-nrfconnect-nrf-iot_zephyr_lwm2m
    • test-fw-nrfconnect-ps
    • test-fw-nrfconnect-rpc
    • test-fw-nrfconnect-rs
    • test-fw-nrfconnect-thread
    • test-fw-nrfconnect-zigbee
    • test-low-level
    • test-sdk-audio
    • test-sdk-mcuboot
    • test-sdk-pmic-samples
    • test-sdk-wifi
    • test-secdom-samples-public

Note: This message is automatically posted and updated by the CI

Copy link
Contributor

@tomi-font tomi-font left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me, pending green sdk-secdom CI.

@NordicBuilder
Copy link
Contributor

You can find the documentation preview for this PR at this link.

Note: This comment is automatically posted by the Documentation Publish GitHub Action.

@@ -1852,12 +1852,14 @@ config PSA_NEED_CRACEN_KMU_ENCRYPTED_KEYS
PSA_NEED_CRACEN_KEY_DERIVATION_DRIVER && \
PSA_NEED_CRACEN_KMU_DRIVER

config SUPPORT_PSA_NEED_CRACEN_PLATFORM_KEYS
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file has only configurations which has the PSA_NEED prefix, please keep the prefix as is and use another name.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

psa need support? How does that make sense? This matches the global format we use in ncs:

./doc/nrf/app_dev/config_and_build/sysbuild/sysbuild_images.rst:    config SUPPORT_NETCORE_ABC
./doc/nrf/app_dev/config_and_build/sysbuild/sysbuild_images.rst:    config SUPPORT_NETCORE_ABC
./samples/cellular/http_update/modem_delta_update/Kconfig:config SUPPORTED_BASE_VERSION
./samples/wifi/radio_test/multi_domain/Kconfig.sysbuild:config SUPPORT_NETCORE_PERIPHERAL_RADIO_TEST
./subsys/nrf_security/src/drivers/cracen/psa_driver.Kconfig:config SUPPORT_PSA_NEED_CRACEN_PLATFORM_KEYS
./subsys/suit/mci/Kconfig:config SUPPORT_SUIT_MCI_IMPL_SDFW
./subsys/suit/storage/Kconfig:config SUPPORT_SUIT_STORAGE_LAYOUT_SOC
./subsys/suit/storage/Kconfig:config SUPPORT_SUIT_STORAGE_LAYOUT_TEST
./subsys/suit/validator/Kconfig:config SUPPORT_SUIT_VALIDATOR_IMPL_SDFW
./sysbuild/Kconfig.appcore:config SUPPORT_APPCORE
./sysbuild/Kconfig.appcore:config SUPPORT_APPCORE_EMPTY
./sysbuild/Kconfig.appcore:config SUPPORT_APPCORE_REMOTE_SHELL
./sysbuild/Kconfig.cracen:config SUPPORT_CRACEN
./sysbuild/Kconfig.netcore:config SUPPORT_NETCORE
./sysbuild/Kconfig.netcore:config SUPPORT_NETCORE_EMPTY
./sysbuild/Kconfig.netcore:config SUPPORT_NETCORE_HCI_IPC
./sysbuild/Kconfig.netcore:config SUPPORT_NETCORE_RPC_HOST
./sysbuild/Kconfig.netcore:config SUPPORT_NETCORE_802154_RPMSG
./sysbuild/Kconfig.netcore:config SUPPORT_NETCORE_IPC_RADIO
./sysbuild/Kconfig.pprcore:config SUPPORT_PPRCORE
./sysbuild/Kconfig.xip:config SUPPORT_QSPI_XIP
./tests/subsys/suit/tests/sdfw/Kconfig:config SUPPORT_SUIT_STORAGE_LAYOUT_TEST

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ping @Vge0rge

Copy link
Contributor

@frkv frkv Feb 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't come up with a new naming convention in relation to Mbed TLS.

There is nothing in TF-M, Mbed TLS and/or Oberon-psa-crypto that has SUPPORT_

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, the issue here is that the PSA_NEED is already a naming convention and we have too many of them already. Since the Oberon PSA core doesn't use the SUPPORT naming convention I am hesitant to accept that for this file.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't come up with a new naming convention in relation to Mbed TLS.

There is nothing in TF-M, Mbed TLS and/or Oberon-psa-crypto that has SUPPORT_

This is not to do with mbedtls, this is to do with Kconfig symbol support in build system

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One way to help solve some of these SOC-tie-ins is to create a HAS_HW_CRACEN configuration (as well as a HAS_HW_CRACEN_KMU for instance). This would only be available e.g. inside the H20 sec domain.

This is somewhat similar to how we signal that CC3XX is available:

depends on HAS_HW_NRF_CC3XX

HAS_HW_NRF_CC3XX

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The HAS will work but it will not allow you to differentiate between L15 and H20. If your goal is to just have that as conditionally set what you can do is to create a Kconfig symbol here:
https://github.com/nrfconnect/sdk-nrf/blob/main/subsys/nrf_security/src/drivers/Kconfig

You can add a promptless:
config PSA_WANT_PLATFORM_KEYS

Then you can use this both enable the:
MBEDTLS_PSA_CRYPTO_BUILTIN_KEYS
and the
PSA_NEED_CRACEN_PLATFORM_KEYS

If you need platform keys you need to have BOTH enabled.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not to do with mbedtls, this is to do with Kconfig symbol support in build system

There are 480+ entries in this file and they are all following the pattern config PSA_NEED_

You are also touching MBEDTLS_PSA_CRYPTO_BUILTIN_KEYS which is an Mbed TLS configuration

SUPPORT_ doesn't make sense in the context

@nordicjm
Copy link
Contributor Author

nordicjm commented Feb 4, 2025

ping @Vge0rge @robertstypa @ahasztag @kszromek-nordic @tomchy for reviews, this is holding other teams up, would like to get it merged today

@frkv frkv self-requested a review February 4, 2025 09:37
Removes Kconfigs that are redefined because they are defined in
an out of tree repo to prevent hiding problems if these symbols
are renamed or removed

Signed-off-by: Jamie McCrae <[email protected]>
@carlescufi carlescufi merged commit e77774f into nrfconnect:main Feb 4, 2025
11 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants