Re: [PATCH] /dev/random: Insufficient of entropy on manyarchitectures

From: Pavel Machek
Date: Thu Oct 10 2013 - 02:50:28 EST


Hi!

(Sorry to be late and maybe with very early date).

On Tue 2013-09-10 14:25:24, Theodore Ts'o wrote:
> On Tue, Sep 10, 2013 at 06:54:38PM +0200, Stephan Mueller wrote:
>
> > Moreover, until having your proposed real fix, wouldn't it make sense to
> > have an interim patch to ensure we have entropy on the mentioned
> > platforms? I think /dev/random is critical enough to warrant some cache
> > miss even per interrupt?
>
> We are already mixing in the IP from the saved irq registers, on every
> single interrupt, so we are mixing in some entropy. We would get more
> entropy if we had a good cycle counter to mix in, but it's not the
> case that we're completely exposed right now on those platforms which
> don't have get_cycles() implemented. If the system running so lock
> step that the location of the interrupts is utterly predictable, then
> it's not clear that using a clock source is going to help you....

On the system with good power management and idle cpus (many of them), I'd
expect most of the IPs to be pretty much equal -- arch specific version of
"enter low power state" (mwait on recent intel machines, for example).

Would it make sense to mix the other registers, too?

Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
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/