-
Notifications
You must be signed in to change notification settings - Fork 2.1k
pkg/driver_cryptocell_310: check for input data to be in RAM #21138
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
da0e6f4
to
ff6d2f7
Compare
Freeze is over so if anyone wants to pick this up... |
Looks good to me besides some small issues. But i think we should document this little detail inside the cryptocell documentation so that people using 3rd-party libraries are aware of this. |
Looks good to me. |
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.
ACK
Please squash |
9c193ac
to
60521a1
Compare
Woops, |
60521a1
to
36aafd4
Compare
Thanks! 🎉 |
Contribution description
The nrf CRYPTOCELL peripheral is documented to only support DMA from RAM. In fact, it seems that short data buffers from ROM are also fine (that's why the tests did not catch the bug yet), while larger ones are not.
Let's add an unconditional check for the data to be in RAM following the documentation to be on the safe side.
Testing procedure
examples/psa_crypto
andtests/sys/psa_crypto_*
should still succeed onnrf52840dk
. Tested locally, weekly CI should notice if not.Let's maybe wait with this one after the hard feature freeze @MrKevinWeiss.
Issues/PRs references
Initially noted during ChaCha20 implementation in #20720 (comment), now run into the same problem with hashes.