-
Notifications
You must be signed in to change notification settings - Fork 7k
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
secure_storage: fix Kconfig dependencies #86181
secure_storage: fix Kconfig dependencies #86181
Conversation
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.
Looks good.
5efcce9
to
89cace2
Compare
Removed additional |
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.
Thanks for the fixes.
You will need to adjust the configurations under samples/psa/
and tests/subsys/secure_storage/
to enable those Kconfig options where needed.
Because now with your PR all the tests get skipped because of the filters as some conditions are missing:
zephyr$ twister -p native_sim -T ./samples/psa
[...]
INFO - 1/6 native_sim/native samples/psa/its/sample.psa.its.secure_storage.entropy_driver FILTERED (runtime filter)
INFO - 2/6 native_sim/native samples/psa/persistent_key/sample.psa.persistent_key.secure_storage.entropy_not_secure FILTERED (runtime filter)
INFO - 3/6 native_sim/native samples/psa/persistent_key/sample.psa.persistent_key.secure_storage.entropy_driver FILTERED (runtime filter)
INFO - 4/6 native_sim/native samples/psa/its/sample.psa.its.tfm FILTERED (runtime filter)
INFO - 5/6 native_sim/native samples/psa/persistent_key/sample.psa.persistent_key.tfm FILTERED (runtime filter)
INFO - 6/6 native_sim/native samples/psa/its/sample.psa.its.secure_storage.entropy_not_secure FILTERED (runtime filter)
717aa45
to
fc39f58
Compare
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.
This change would also deserve a migration guide entry.
`FLASH_PAGE_LAYOUT` has a hardware dependency on `FLASH_HAS_PAGE_LAYOUT` which is not present for all boards. Forcing this symbol to `y` when the hardware doesn't support it results in build errors at the Kconfig stage. `FLASH_PAGE_LAYOUT` is enabled by default when `FLASH_HAS_PAGE_LAYOUT` is true, so this change will not require any user changes. Signed-off-by: Jordan Yates <[email protected]>
`SECURE_STORAGE_ITS_STORE_IMPLEMENTATION_SETTINGS` does not use either the `FLASH_MAP` or `NVS` APIs, only `SETTINGS`. Similarly, `SECURE_STORAGE_ITS_STORE_MODULE` does not consist of any code itself and therefore should not select or imply any options. Signed-off-by: Jordan Yates <[email protected]>
fc39f58
to
967818f
Compare
967818f
to
0979108
Compare
The FLASH commit is required for CI to work, and is a dedicated PR in #86327 |
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.
Just a few nits left.
0979108
to
9fb07c5
Compare
Mixing `select` and `depends on` is a common source of Kconfig dependency loops and should be avoided. Both `ZMS` and `SETTINGS` are more commonly used with `depends on` rather than `select`. The usage here also contradicts the Zephyr best practices guide for `select`: * Avoid selecting symbols with prompts or dependencies. Prefer depends on. Signed-off-by: Jordan Yates <[email protected]>
Now that `SECURE_STORAGE` does not `select` dependencies, they need to be enabled explicitly by the tests. Signed-off-by: Jordan Yates <[email protected]>
9fb07c5
to
863e191
Compare
SECURE_STORAGE_ITS_STORE_IMPLEMENTATION_SETTINGS
does not use either theFLASH_MAP
orNVS
APIs, onlySETTINGS
. Similarly,SECURE_STORAGE_ITS_STORE_MODULE
does not consist of any code itself and therefore should not select or imply any options.Mixing
select
anddepends on
is a common source of Kconfig dependency loops and should be avoided. BothZMS
andSETTINGS
are more commonly used withdepends on
rather thanselect
.The usage here also contradicts the Zephyr best practices guide for
select
:Fixes #86328