Re: mmotm 2008-12-01-19-41: early exception (page fault -- derefof 0x20)

From: Arjan van de Ven
Date: Wed Dec 03 2008 - 12:14:34 EST


Matt Mackall wrote:
On Tue, 2008-12-02 at 15:50 -0800, Arjan van de Ven wrote:
Matt Mackall wrote:
If we oops or warn while picking a timesource, we'll have lots of fun?

we really only need to mix in the tsc; ktime_get() is just an arch friendly way to get that
I supposed (wrongly).

but yes we need to do a few things
1) seed on demand with a platform time source

Currently we use jiffies + get_cycles(). That's going to have somewhere
between, oh, 3 bits of entropy (very stable boot with only jiffies) and
25 bits of entropy (TSC with lots of waiting for hardware) at boot. Ideally, we'd have access to a wall clock of some sort as well. But
that's also a fairly limited source - wall clocks are both low
resolution and predictable/collision-prone.

tsc taken quite some time appart in the boot, we will get multiple times a bunch of entropy.
This comes from variations in time various hardware things take (due to spread spectrum clocks)
and because of cpu speculation not being deterministic to this level of multi-milliseconds.
--
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/