[PATCH 0/2] Add hw_random Rust bindings

Manos Pitsidianakis posted 2 patches 1 week, 2 days ago
MAINTAINERS                     |   8 +
rust/bindings/bindings_helper.h |   1 +
rust/kernel/hw_random.rs        | 320 ++++++++++++++++++++++++++++++++++++++++
rust/kernel/lib.rs              |   2 +
4 files changed, 331 insertions(+)
[PATCH 0/2] Add hw_random Rust bindings
Posted by Manos Pitsidianakis 1 week, 2 days ago
This series adds Rust abstractions for the hw_random subsystem.

A virtio-rng Rust driver that uses them will be submitted as a separate
series since it also depends on the virtio abstractions series.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
---
Manos Pitsidianakis (2):
      rust/bindings: add hw_random.h
      rust: add hw_random module

 MAINTAINERS                     |   8 +
 rust/bindings/bindings_helper.h |   1 +
 rust/kernel/hw_random.rs        | 320 ++++++++++++++++++++++++++++++++++++++++
 rust/kernel/lib.rs              |   2 +
 4 files changed, 331 insertions(+)
---
base-commit: 8bc67e4db64aa72732c474b44ea8622062c903f0
change-id: 20260525-rust-hw_random-virtio-rng-bd817be189c6

Best regards,
-- 
Manos Pitsidianakis <manos@pitsidianak.is>
Re: [PATCH 0/2] Add hw_random Rust bindings
Posted by Miguel Ojeda 1 week, 2 days ago
On Fri, May 29, 2026 at 5:50 PM Manos Pitsidianakis
<manos@pitsidianak.is> wrote:
>
> A virtio-rng Rust driver that uses them will be submitted as a separate
> series since it also depends on the virtio abstractions series.

Please include that at least as a reference to a branch or similar,
since in most cases the user is needed to evaluate abstractions etc.

Thanks!

Cheers,
Miguel
Re: [PATCH 0/2] Add hw_random Rust bindings
Posted by Manos Pitsidianakis 1 week, 2 days ago
Hi Miguel,

On Fri, 29 May 2026 23:02, Miguel Ojeda <miguel.ojeda.sandonis@gmail.com> wrote:
>On Fri, May 29, 2026 at 5:50 PM Manos Pitsidianakis
><manos@pitsidianak.is> wrote:
>>
>> A virtio-rng Rust driver that uses them will be submitted as a separate
>> series since it also depends on the virtio abstractions series.
>
>Please include that at least as a reference to a branch or similar,
>since in most cases the user is needed to evaluate abstractions etc.


Good point, thanks.

My WIP branch is here 
https://github.com/epilys/linux/tree/b4/rust-virtio-rng (HEAD is the 
driver that uses the abstraction in this series)

It uses atomics instead of a spinlock since we can't sleep during virtio 
driver probe. I didn't want to overcomplicate it by deferring all the 
sleeping work to a workqueue, but maybe it's a necessity until we get 
spinlocks that can disable IRQs.


>
>Thanks!
>
>Cheers,
>Miguel