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

entropy: 54h20 PSA RNG fixes #20896

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

Vge0rge
Copy link
Contributor

@Vge0rge Vge0rge commented Mar 12, 2025

This PR is a subset of the following PR here:
#17200

The commits are identical apart from some formatting in the commit which adds PSA compatibility layer for SSF.

This mainly fixes an initialization issue with the nRF IEEE 802.15.4 and IPC, please check the commits messages.

@Vge0rge Vge0rge requested review from a team as code owners March 12, 2025 14:19
@github-actions github-actions bot added manifest changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. labels Mar 12, 2025
@NordicBuilder
Copy link
Contributor

NordicBuilder commented Mar 12, 2025

The following west manifest projects have changed revision in this Pull Request:

Name Old Revision New Revision Diff
nrfxlib nrfconnect/sdk-nrfxlib@2251371 (main) nrfconnect/sdk-nrfxlib#1593 nrfconnect/sdk-nrfxlib#1593/files

DNM label due to: 1 project with PR revision

Note: This message is automatically posted and updated by the Manifest GitHub Action.

@NordicBuilder
Copy link
Contributor

NordicBuilder commented Mar 12, 2025

CI Information

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

Inputs:

Sources:

sdk-nrf: PR head: 4ee343b78b1fb7e68f755c7002da5bc623b62796
nrfxlib: PR head: 00c8e1aa814c59a6588e07a20f3d89b60734b9b1

more details

sdk-nrf:

PR head: 4ee343b78b1fb7e68f755c7002da5bc623b62796
merge base: 3079042405f608a5969ccef686840b6a1e5b5b37
target head (main): 3079042405f608a5969ccef686840b6a1e5b5b37
Diff

nrfxlib:

PR head: 00c8e1aa814c59a6588e07a20f3d89b60734b9b1
merge base: 2251371286d4aeeb35cdd87531cc14162158b014
target head (main): 2251371286d4aeeb35cdd87531cc14162158b014
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 (9)
nrfxlib
│  ├── nrf_rpc
│  │  ├── include
│  │  │  │ nrf_rpc.h
│  │  │ nrf_rpc.c
subsys
│  ├── nrf_rpc
│  │  ├── include
│  │  │  │ nrf_rpc_os.h
│  ├── nrf_security
│  │  ├── src
│  │  │  ├── ssf_secdom
│  │  │  │  ├── CMakeLists.txt
│  │  │  │  │ ssf_psa_core_compatibility.c
│  ├── sdfw_services
│  │  ├── Kconfig
│  │  ├── os
│  │  │  │ ssf_client_zephyr.c
│  │  ├── transport
│  │  │  ├── nrf_rpc
│  │  │  │  │ ssf_client_nrf_rpc.c
west.yml

Outputs:

Toolchain

Version: 4ffa2202d5
Build docker image: docker-dtr.nordicsemi.no/sw-production/ncs-build:4ffa2202d5_8bf7ca4353

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

  • ◻️ Toolchain - Skipped: existing toolchain is used
  • ✅ Build twister
    • sdk-nrf test count: 1743
  • ❌ Integration tests
    • ✅ test-fw-nrfconnect-ble_samples
    • ❌ test-fw-nrfconnect-chip
    • ✅ test-fw-nrfconnect-nrf-iot_cloud
    • ✅ test-fw-nrfconnect-nrf_crypto
    • ✅ test-fw-nrfconnect-rpc
    • ✅ test-fw-nrfconnect-rs
    • ✅ test-fw-nrfconnect-fem
    • ✅ test-fw-nrfconnect-tfm
    • ✅ test-sdk-find-my
    • ✅ test-sdk-dfu
    • ✅ test-fw-nrfconnect-ps
    • ⚠️ test_ble_nrf_config
Disabled integration tests
    • desktop52_verification
    • doc-internal
    • test-fw-nrfconnect-apps
    • test-fw-nrfconnect-ble_mesh
    • test-fw-nrfconnect-boot
    • test-fw-nrfconnect-nfc
    • test-fw-nrfconnect-nrf-iot_libmodem-nrf
    • 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-proprietary_esb
    • test-fw-nrfconnect-thread
    • 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

You can find the documentation preview for this PR here.

@Vge0rge Vge0rge force-pushed the 54h20_psa_rng_fixes branch from aa89b5b to c4e6382 Compare March 18, 2025 13:46
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.

Just some minor comments.

@Vge0rge
Copy link
Contributor Author

Vge0rge commented Mar 25, 2025

ping @nrfconnect/ncs-si-muffin @nrfconnect/ncs-aurora @nrfconnect/ncs-protocols-serialization @nrfconnect/ncs-merge

@Vge0rge Vge0rge force-pushed the 54h20_psa_rng_fixes branch 2 times, most recently from 19eb219 to 46e6572 Compare March 25, 2025 13:29
return PSA_CRYPTO_SUBSYSTEM_ALL_INITIALISED;
}

/* This function is defined in psa_crypto_core.h */
Copy link
Contributor

Choose a reason for hiding this comment

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

@Vge0rge Vge0rge force-pushed the 54h20_psa_rng_fixes branch from 46e6572 to 956366c Compare March 26, 2025 12:58
Vge0rge added 5 commits March 26, 2025 13:58
Add function nrf_rpc_os_fatal_error function to
handle fatal_errors using the Zephyr's fatal error hanlding.

Signed-off-by: Georgios Vasilakis <georgios.vasilakis@nordicsemi.no>
Updates the nrf_rpc library to allow initialization
of single nrf_rpc groups.

Signed-off-by: Georgios Vasilakis <georgios.vasilakis@nordicsemi.no>
Use nrf_rpc_init_group when ssf_client is being initalized
since it will happen before other nrf_rpc groups are initialized.

Signed-off-by: Georgios Vasilakis <georgios.vasilakis@nordicsemi.no>
Initialize the ssf_client earlier during the boot
process during post kernel.

ssf_client needs to be initialized before the
CONFIG_NRF_802154_SER_RADIO_INIT_PRIO since it is
used by the "nRF IEEE 802.15.4" protocol.

It also needs to be initialied after the IPC
IPC_SERVICE_REG_BACKEND_PRIORITY since the
IPC expects the protocol to be initialized.
Failing to do that will also trigger an assertion
in Zephyr.

Signed-off-by: Georgios Vasilakis <georgios.vasilakis@nordicsemi.no>
There are two functions which are defined in the psa_crypto_core.h
and are implemented in psa_crypto.c which are used by the TLS
library.
These functions are:
psa_can_do_hash
psa_can_do_cipher

These functions just check if the drivers are initialized
before the relevant PSA crypto functions can be used.
In the case of SSF there is no initialization needed because
the PSA initialization happens inside the secure domain firmware
before the application boots.

These functions are added in a separate file since they only
exist to maintain compatibility with the PSA core from Oberon/mbedTLS
and they don't need to forward any call to the secure domain.

Signed-off-by: Georgios Vasilakis <georgios.vasilakis@nordicsemi.no>
@Vge0rge Vge0rge force-pushed the 54h20_psa_rng_fixes branch from 956366c to 4ee343b Compare March 26, 2025 12:58
Copy link
Contributor

@Damian-Nordic Damian-Nordic left a comment

Choose a reason for hiding this comment

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

Added comments to nrfxlib PR but this one alone lgtm

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. DNM manifest manifest-nrfxlib
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants