-
Notifications
You must be signed in to change notification settings - Fork 3k
PSA: PSoC 6 Correct TRNG behaviour #10025
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
Conversation
* Remove NVSEED from M0_PSA * Disable TRNG support for PSA M4
starting CI pending reviews |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing an API from compilation is not sufficient from security perspective.
Is the peripheral accessible from cm4?
I'm not removing the API, I'm letting the HRNG API take over In PSoC 6 boards the crypto block is assigned to the m0+ core, access from the m4 core will result in Hardfault |
Test run: SUCCESSSummary: 13 of 13 test jobs passed |
@@ -8067,7 +8066,7 @@ | |||
"inherits": ["NSPE_Target", "CY8CKIT_062_WIFI_BT"], | |||
"extra_labels_add": ["PSA", "MBED_SPM"], | |||
"components_add": ["SPM_MAILBOX", "FLASHIAP"], | |||
"device_has_remove": ["TRNG", "CRC"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TRNG must be restored
it is device_has_remove
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@ARMmbed/team-cypress Review please, we would like to integrate this PR soon |
Hi @0xc0170 : as this doesn't directly modify any cypress code Oren says he added cypress so they are aware of the change. will provide more details here shortly |
For me, removing TRNG device from CM4_PSA target (as it was before) looks more logical, than a simple NV_SEED disabling. If there are no TRNG device - than nobody can work with it. If only one feature that needs TRNG is disabled, somebody can try to work with TRNG via another feature. In case anybody tries to work with TRNG (HW PSoC6 block) from CM4, it causes a CM4 HardFault. |
@0xc0170 this PR doesn't actually change any of the Cypress code. if a user will try to access the TRNG from the M4 core on a PSA target, the user will get into HardFault. the HRNG API relies on the platform having TRNG macro, that is why we add |
@OlegKapshii defining NVSEED basically sets it as the only entropy source, which is causing the issue |
Now I understand. LGTM |
Description
On PSA targets the TRNG should be accessible from the secure-side only.
By removing NVSEED and restricting TRNG to secure-core we achieve that requirement.
Relevant tests passed
Pull request type
Reviewers
Release Notes
@ARMmbed/team-cypress @ARMmbed/mbed-os-psa