From: "Alexandre Courbot" <acourbot@nvidia.com>
To: "Matthew Maurer" <mmaurer@google.com>,
"Miguel Ojeda" <ojeda@kernel.org>,
"Boqun Feng" <boqun.feng@gmail.com>,
"Gary Guo" <gary@garyguo.net>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Benno Lossin" <lossin@kernel.org>,
"Andreas Hindborg" <a.hindborg@kernel.org>,
"Alice Ryhl" <aliceryhl@google.com>,
"Trevor Gross" <tmgross@umich.edu>,
"Danilo Krummrich" <dakr@kernel.org>
Cc: <linux-kernel@vger.kernel.org>, <rust-for-linux@vger.kernel.org>
Subject: Re: [PATCH v3] rust: Add support for feeding entropy to randomness pool
Date: Sun, 28 Dec 2025 16:50:07 +0900 [thread overview]
Message-ID: <DF9OOOWQXWK3.2KELKD6VLJP1R@nvidia.com> (raw)
In-Reply-To: <20251226-add-entropy-v3-1-a3440823a07d@google.com>
On Sat Dec 27, 2025 at 4:15 AM JST, Matthew Maurer wrote:
> Adds just enough support to allow device drivers to feed entropy to the
> central pool.
>
> Signed-off-by: Matthew Maurer <mmaurer@google.com>
> ---
> Changes in v3:
> - Fixed doclink to be srctree-based instead of relative.
> - Switched to prelude import instead of fine-grained imports.
> - Link to v2: https://lore.kernel.org/r/20251216-add-entropy-v2-1-4d866f251474@google.com
>
> Changes in v2:
> - Added more details in the docs about the API, specifically about it
> not crediting entropy and when it ought to be used.
> - Link to v1: https://lore.kernel.org/r/20251212-add-entropy-v1-1-e70ad1bc9c65@google.com
> ---
> rust/kernel/lib.rs | 1 +
> rust/kernel/rand.rs | 18 ++++++++++++++++++
> 2 files changed, 19 insertions(+)
>
> diff --git a/rust/kernel/lib.rs b/rust/kernel/lib.rs
> index f812cf12004286962985a068665443dc22c389a2..bf64752d276b0bdea06ac0de8a5e219190129377 100644
> --- a/rust/kernel/lib.rs
> +++ b/rust/kernel/lib.rs
> @@ -130,6 +130,7 @@
> pub mod ptr;
> #[cfg(CONFIG_RUST_PWM_ABSTRACTIONS)]
> pub mod pwm;
> +pub mod rand;
> pub mod rbtree;
> pub mod regulator;
> pub mod revocable;
> diff --git a/rust/kernel/rand.rs b/rust/kernel/rand.rs
> new file mode 100644
> index 0000000000000000000000000000000000000000..3e0aef2f53af122f510b34c4743a20452aaad9ad
> --- /dev/null
> +++ b/rust/kernel/rand.rs
> @@ -0,0 +1,18 @@
> +// SPDX-License-Identifier: GPL-2.0
> +
> +//! Randomness.
Let's promote this comment to a sentence at least. :)
> +//!
> +//! C header: [`include/linux/random.h`](srctree/include/linux/random.h)
> +
> +use crate::prelude::*;
> +
> +/// Adds the given buffer to the entropy pool, but does not credit any entropy.
> +///
> +/// This is intended for use mixing in data that is likely to differ between devices or boots, but
Not a native speaker, but "use mixing" sounds a bit off?
With this, and fwiw,
Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
next prev parent reply other threads:[~2025-12-28 7:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-26 19:15 [PATCH v3] rust: Add support for feeding entropy to randomness pool Matthew Maurer
2025-12-28 7:50 ` Alexandre Courbot [this message]
2025-12-28 9:13 ` Brendan Shephard
2025-12-30 17:47 ` Matthew Maurer
2025-12-28 9:40 ` Alice Ryhl
2025-12-30 13:54 ` Kari Argillander
2025-12-30 17:42 ` Matthew Maurer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DF9OOOWQXWK3.2KELKD6VLJP1R@nvidia.com \
--to=acourbot@nvidia.com \
--cc=a.hindborg@kernel.org \
--cc=aliceryhl@google.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun.feng@gmail.com \
--cc=dakr@kernel.org \
--cc=gary@garyguo.net \
--cc=linux-kernel@vger.kernel.org \
--cc=lossin@kernel.org \
--cc=mmaurer@google.com \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=tmgross@umich.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.