kernkonzept / l4re-core

The core components of the L4Re operating system.
GNU General Public License v2.0
72 stars 18 forks source link

How do I get random numbers on L4RE #1

Closed josephlr closed 4 years ago

josephlr commented 5 years ago

I'm working on the getrandom Rust crate, and we're looking to add an implementation for the new x86_64-unknown-l4re-uclibc target.

Is there an easy way (like Linux's getrandom(2)) to get entropy on L4Re?

lonvia commented 5 years ago

Not really, I'm afraid. The L4Re kernel does not provide randomness by itself. Instead a user-land service would need to provide randomness using appropriate hardware for the system. There is currently no such service implemented as part of the L4Re core services, so you'd have to write your own.

josephlr commented 5 years ago

Thanks for the response @lonvia

We're just going to fallback to using RDRAND for crypto RNG then, as it looks like l4re is only on x86_64 at the moment.

icedieler commented 5 years ago

... l4re is only on x86_64 at the moment.

That is a false impression. L4Re supports x86, ARM and MIPS all in 32 and 64 bit.

josephlr commented 5 years ago

That is a false impression. L4Re supports x86, ARM and MIPS all in 32 and 64 bit.

Sorry, I meant to say that the only supported Rust targets are for x86_64.

jermar commented 4 years ago

I guess this can be closed now...