Re: [patch 0/5] HW RNG cleanup & new drivers

From: H. Peter Anvin
Date: Sun Oct 30 2005 - 18:05:03 EST


Linus Torvalds wrote:

On Sun, 30 Oct 2005, Deepak Saxena wrote:

I think moving it to user space will add more complexity for
the case where the HW unit is shared with an in in-kernel driver.


Moving it to user space is just generally stupid.

Often, the random stuff comes from chipsets, not the CPU itself. Not user-accessible at all, and even if it were, it would be a bad idea to have user space do things the kernel does normally ("what northbridge do I have").

There may be use for a user-level library that handles the native CPU instructions for high performance, but that in no way negates the reason why /dev/random and friends exist in the first place.


We're not talking about /dev/random, we're talking about /dev/hw_random which is read by rndg and then fed by userspace back into /dev/[u]random.

Clearly, there are cases (e.g. VIA) where rndg or a library called from rngd could just as easily have done the extraction in userspace, and for that, it makes no sense to force it to do it in the kernel. For some, it could be done either way, and for others a kernel driver is clearly needed. Integrating them all into /dev/hw_random was probably a mistake, though.

-hpa
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/