Re: [PATCH] hwrng: core - Allow for multiple simultaneous active hwrng devices

From: Keith Packard
Date: Tue Aug 09 2016 - 13:58:14 EST


Jason Cooper <jason@xxxxxxxxxxxxxx> writes:

> Perhaps a /dev/hwrng[0-9] per rng? That would lend itself nicely to a
> sysfs interface for per device quality, rate, and enabled attributes.
> e.g. /sys/class/hw_random/hwrng0/{device/,quality,rate,enabled}

I was interested in the data being provided for /dev/random; that seems
like the most important interface to me. But, exposing all of the
devices using consistent names does seem like a useful idea at some
level.

> /dev/hwrng could pull from the one with the highest quality, or user
> specified for backwards compatibility.

I like the notion of using all of them in turn; if one of them turns out
to be broken, you're still stirring in data from the others. After all,
the quality metric is provided by the device, we aren't doing any
analysis on the data to determine it independently.

--
-keith

Attachment: signature.asc
Description: PGP signature