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

Updates RNG HIL to include lifetime, set_client #1050

Closed
wants to merge 6 commits into
base: master
from

Conversation

Projects
None yet
3 participants
@phil-levis
Copy link
Collaborator

phil-levis commented Jun 29, 2018

Pull Request Overview

This pull request updates the random number generation (RNG) HIL trait so that it has a lifetime as well as move set_client to be part of the HIL. It updates chips and boards to use the new trait. Updating the trait in this way is necessary for supporting Tock on Hotel.

It also adds an RNG test in capsules/tests.

Testing Strategy

Since this does not change any call patterns and I don't have most platforms it was tested only by compilation.

TODO or Help Wanted

This pull request would benefit from functional testing on platforms using the RNG test in capsules/tests.

Documentation Updated

  • Updated the relevant files in /docs, or no updates are required.

Formatting

  • Ran make formatall.

phil-levis-google and others added some commits Jun 21, 2018

Update the RNG HIL to take a lifetime parameter, so it has a
proper add client call rather than magic.
Remove init() from RNG trait since that is a sensitive operation:
a caller that can generate random numbers should not be able to
re-init the generator as it could do this to eliminiate entropy in
other callers (e.g., if the RNG is a PRNG based on initial entropy).

Incorporate set_client to bring RNG in line with more modern HIL traits.

Incorporate lifetime to bring RNG in line with more modern HIL traits.

Bring all boards/chips using RNG up to date with new trait.

@phil-levis phil-levis changed the title Updates to RNG HIL Updates RNG HIL to include lifetime Jun 29, 2018

@phil-levis phil-levis changed the title Updates RNG HIL to include lifetime Updates RNG HIL to include lifetime, set_client Jun 29, 2018

@bradjc

This comment has been minimized.

Copy link
Contributor

bradjc commented Jun 29, 2018

The cortex-m3 stuff isn't relevant, is it?

@phil-levis

This comment has been minimized.

Copy link
Collaborator

phil-levis commented Jun 29, 2018

No -- this pull request is not ready for a variety of other reasons, though. The kernel has changed a lot in the past few weeks. :/

@phil-levis phil-levis closed this Jun 29, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment