Skip to content
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

Add getentropy for RTEMS #131774

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

thesummer
Copy link
Contributor

@thesummer thesummer commented Oct 16, 2024

RTEMS provides the getentropy function.
Use this for providing random data.

This PR enables the getentropy function for the RTEMS operating system to get random data.
It is exposed via libc (see rust-lang/libc#3975).

@rustbot
Copy link
Collaborator

rustbot commented Oct 16, 2024

r? @Noratrieb

rustbot has assigned @Noratrieb.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Oct 16, 2024
@joboet
Copy link
Member

joboet commented Oct 16, 2024

Does RTEMS also have a suitable arc4random interface? If so, I'd prefer that, as we use that on nearly all other UNIXes.

Also I don't think the libc change has been released yet? That'll need to happen before this can be merged.

r? joboet

@rustbot rustbot assigned joboet and unassigned Noratrieb Oct 16, 2024
@thesummer
Copy link
Contributor Author

@joboet I checked and the arc4random function is also available. I updated the PR accordingly. This currently also does not require further changes to libc.

However, I might try to still move the function declaration there.

@thesummer
Copy link
Contributor Author

The changes in libc have been released tonight: https://github.com/rust-lang/libc/releases/tag/0.2.160

@joboet My suggestion would be to merge this PR with arc4random_buf defined here in std. I will add the definition to libc, so that it will become part of 0.2.161 and change it here afterwards. Alternatively, we can go back to the getentropy version and move to arc4random with the next libc release. Any preferences?

My goal is to get a first compiling version of the RTEMS tier 3 port into the mainline, so I can setup a local CI to track changes/regressions. Currently I have to manually monitor the different repos which is not ideal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants