Re: [PATCH v4] rust: Add support for feeding entropy to randomness pool
From: Matthew Maurer
Date: Fri Jan 02 2026 - 13:40:35 EST
On Wed, Dec 31, 2025 at 7:46 AM Miguel Ojeda
<miguel.ojeda.sandonis@xxxxxxxxx> wrote:
>
> On Wed, Dec 31, 2025 at 1:48 PM Jason A. Donenfeld <Jason@xxxxxxxxx> wrote:
> >
> > Thanks for CCing me Miguel. I find it strange that it was left out on
> > apparently 4 revisions of it. Yes, this should be added to the
> > MAINTAINER's normal rng section. I'm happy to maintain this.
Apologies for that, it's my mistake.
>> Small nit: There are two existing comments in the C source (one of which
>> I know you know about because your text is almost that text). Why not
>> just use those verbatim? Or improve those and sync that to here? I'm not
>> a big fan of bifurcation.
It does not need to be different. I'll use it verbatim in the next revision.
>
> You're welcome, and thanks for the quick reply!
>
> > Bigger question, perhaps for Miguel: what's the convention for adding
> > these bindings? Is it, (A) "this is a useful API surface, so let's add the
> > functions so driver writers can use them later" or is it (B) "add useful
> > APIs as they're needed by driver writers"?
>
> We follow the usual kernel practice, so (B), though sometimes a user
> is known to be incoming, so it gets added in a separate series for
> convenience or similar.
>
> But, yeah, in such a case, it should be agreed upon / explained where
> it is supposed to be used, and the cover letter here should do that
> (and you are completely right to ask!).
I'll add it to the cover letter in the next revision, but for now, the
use case is a re-implementation of the qcom-socinfo driver[1] (still
undergoing significant revision) which uses it to deliver the contents
of the SoC info buffer (which notably includes the device serial
number) to the entropy pool.
[1]: https://lore.kernel.org/all/20251213-qcom-socinfo-v1-1-5daa7f5f2a85@xxxxxxxxxx/
>
> Cheers,
> Miguel