Skip to content

rust: add Hardware Random Number Generator subsystem #592

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

Merged
merged 1 commit into from
Mar 15, 2022

Conversation

m-falkowski1
Copy link

@m-falkowski1 m-falkowski1 commented Dec 8, 2021

This patch adds abstractions over the hwrng subsystem:

  • trait hwrng::Operations that defines operations of a hwrng driver.
  • declare_hwrng_operations!() macro that populates callback pointers
    located in hwrng structure.
  • Registration structure for hwrng's drivers.

This patch is a dependency of a Samsung Exynos trng driver provided initially in #554.

Changes v5 -> v6:

Changes v4 -> v5:

Changes v3 -> v4:

  • Added missing safety comments
  • Deleted unnecessary clone of &CStr reference.

Changes v2 -> v3:

Changes v1 (#554) -> v2:

Signed-off-by: Maciej Falkowski [email protected]

@m-falkowski1
Copy link
Author

The new version has just been uploaded. Feel free to review.

@m-falkowski1
Copy link
Author

v5 posted.

@m-falkowski1 m-falkowski1 requested a review from wedsonaf February 8, 2022 17:20
@m-falkowski1
Copy link
Author

CI failes somehow randomly on arm64 run. On my local repo CI completes correctly https://github.com/m-falkowski1/linux/actions/runs/1813535226. The same thing applies to the other patch I posted today.

@ojeda
Copy link
Member

ojeda commented Feb 8, 2022

Yeah, there are a couple intermittent issues with the CI since the move to containers; I am taking a look. Meanwhile, I will rerun the CI for you.

@ojeda
Copy link
Member

ojeda commented Feb 9, 2022

The arm64 issue, which was the prevalent one, is solved now.

@m-falkowski1
Copy link
Author

That went quickly, I just saw #667, thanks!

@m-falkowski1
Copy link
Author

v6 posted.

This patch adds abstractions over the hwrng subsystem:
  - trait `hwrng::Operations` that defines operations of a hwrng driver.
  - `declare_hwrng_operations!` macro that populates callback pointers
    located in hwrng structure.
  - Registration structure for hwrng's drivers.

Signed-off-by: Maciej Falkowski <[email protected]>
@m-falkowski1
Copy link
Author

misc fix for v6.

Copy link

@wedsonaf wedsonaf left a comment

Choose a reason for hiding this comment

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

Very nice, thanks for putting this together!

@wedsonaf wedsonaf merged commit 1a3b646 into Rust-for-Linux:rust Mar 15, 2022
@m-falkowski1 m-falkowski1 deleted the add_hwrng_subsystem branch March 16, 2022 07:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants