Re: [PATCH 4/5] tsc: wire up entropy generation function

2011-06-17 Thread Thomas Gleixner
On Mon, 13 Jun 2011, Venkatesh Pallipadi wrote: > On Mon, Jun 13, 2011 at 3:06 PM, Jarod Wilson wrote: > > TSC is high enough resolution that we can use its low-order byte to > > stir new data into the random number generator entropy pool. > > >From what I vaguely remember from years past, rdt

Re: [PATCH 4/5] tsc: wire up entropy generation function

2011-06-14 Thread Matt Mackall
On Tue, 2011-06-14 at 16:04 -0400, Kent Borg wrote: > Matt Mackall wrote: > > [network adapters are] a great source of potential entropy, a bad > > source of guaranteed entropy. The current RNG tries to do > > accounting on the latter. Accounting on the former is extremely > > suspect. > > So

Re: [PATCH 4/5] tsc: wire up entropy generation function

2011-06-14 Thread Kent Borg
Matt Mackall wrote: > [network adapters are] a great source of potential entropy, a bad > source of guaranteed entropy. The current RNG tries to do > accounting on the latter. Accounting on the former is extremely > suspect. So we need a patch that: - Deletes the IRQF_SAMPLE_RANDOM mention in fe

Re: [PATCH 4/5] tsc: wire up entropy generation function

2011-06-14 Thread H. Peter Anvin
On 06/13/2011 04:10 PM, Matt Mackall wrote: > > Well the issue is that samples are going to be roughly aligned to some > multiple of the bus frequency. If an interrupt occurs on bus cycle X, > this code will be hit at roughly TSC cycle X*M+d. > >> This is correct; at the very least I would multip

Re: [PATCH 4/5] tsc: wire up entropy generation function

2011-06-14 Thread Matt Mackall
On Tue, 2011-06-14 at 13:48 -0400, Kent Borg wrote: > Matt Mackall wrote: > > Kent Borg wrote: > >>So network entropy is being eradicated, and nothing is being done to > >>replace it. > > > >Nothing is being done is a more accurate summary of the situation. > > > So the feature-removal-sched

Re: [PATCH 4/5] tsc: wire up entropy generation function

2011-06-14 Thread Kent Borg
Matt Mackall wrote: > Kent Borg wrote: >>So network entropy is being eradicated, and nothing is being done to >>replace it. > >Nothing is being done is a more accurate summary of the situation. So the feature-removal-schedule.txt entry about IRQF_SAMPLE_RANDOM is obsolete? (Then the trend fro

Re: [PATCH 4/5] tsc: wire up entropy generation function

2011-06-14 Thread Matt Mackall
On Tue, 2011-06-14 at 08:39 -0400, Kent Borg wrote: > H. Peter Anvin wrote: > > Those already are doing this. > > They used to via IRQF_SAMPLE_RANDOM, but these are being removed > (according to Documentation/feature-removal-schedule.txt). In 2.6.39 I > can only find 10 remaining instances, ou

Re: [PATCH 4/5] tsc: wire up entropy generation function

2011-06-14 Thread Matt Mackall
On Mon, 2011-06-13 at 15:36 -0700, H. Peter Anvin wrote: > On 06/13/2011 03:27 PM, Venkatesh Pallipadi wrote: > > On Mon, Jun 13, 2011 at 3:06 PM, Jarod Wilson wrote: > >> TSC is high enough resolution that we can use its low-order byte to > >> stir new data into the random number generator entrop

Re: [PATCH 4/5] tsc: wire up entropy generation function

2011-06-14 Thread Jarod Wilson
H. Peter Anvin wrote: On 06/13/2011 05:39 PM, Kent Borg wrote: I was assuming that drivers, responding to an interrupt from some external event, would want to make this call. Such as a network driver. Those already are doing this. Two points: 1. Why look at the high-order bits? How are the

Re: [PATCH 4/5] tsc: wire up entropy generation function

2011-06-14 Thread Kent Borg
H. Peter Anvin wrote: > Those already are doing this. They used to via IRQF_SAMPLE_RANDOM, but these are being removed (according to Documentation/feature-removal-schedule.txt). In 2.6.39 I can only find 10 remaining instances, out of many more network drivers. The alternative is supposed to

Re: [PATCH 4/5] tsc: wire up entropy generation function

2011-06-13 Thread H. Peter Anvin
On 06/13/2011 05:39 PM, Kent Borg wrote: > I was assuming that drivers, responding to an interrupt from some > external event, would want to make this call. > Such as a network driver. Those already are doing this. > Two points: > > 1. Why look at the high-order bits? How are they going to have

Re: [PATCH 4/5] tsc: wire up entropy generation function

2011-06-13 Thread Kent Borg
H. Peter Anvin wrote: > However, the big issue with this is that it's recursive... what causes this to > be invoked... probably an interrupt, which is going to have been > invoked by a timer, quite possible the TSC deadline timer. Oops. I was assuming that drivers, responding to an interrupt fr

Re: [PATCH 4/5] tsc: wire up entropy generation function

2011-06-13 Thread Kent Borg
Venkatesh Pallipadi wrote: On Mon, Jun 13, 2011 at 3:06 PM, Jarod Wilson wrote: TSC is high enough resolution that we can use its low-order byte to stir new data into the random number generator entropy pool. From what I vaguely remember from years past, rdtsc, especially last few bits of

Re: [PATCH 4/5] tsc: wire up entropy generation function

2011-06-13 Thread H. Peter Anvin
On 06/13/2011 03:27 PM, Venkatesh Pallipadi wrote: > On Mon, Jun 13, 2011 at 3:06 PM, Jarod Wilson wrote: >> TSC is high enough resolution that we can use its low-order byte to >> stir new data into the random number generator entropy pool. > > From what I vaguely remember from years past, rdtsc,

Re: [PATCH 4/5] tsc: wire up entropy generation function

2011-06-13 Thread Jarod Wilson
Venkatesh Pallipadi wrote: On Mon, Jun 13, 2011 at 3:06 PM, Jarod Wilson wrote: TSC is high enough resolution that we can use its low-order byte to stir new data into the random number generator entropy pool. From what I vaguely remember from years past, rdtsc, especially last few bits of it

Re: [PATCH 4/5] tsc: wire up entropy generation function

2011-06-13 Thread Venkatesh Pallipadi
On Mon, Jun 13, 2011 at 3:06 PM, Jarod Wilson wrote: > TSC is high enough resolution that we can use its low-order byte to > stir new data into the random number generator entropy pool. >From what I vaguely remember from years past, rdtsc, especially last few bits of it are not very good as rando

[PATCH 4/5] tsc: wire up entropy generation function

2011-06-13 Thread Jarod Wilson
TSC is high enough resolution that we can use its low-order byte to stir new data into the random number generator entropy pool. CC: Matt Mackall CC: "Venkatesh Pallipadi (Venki)" CC: Thomas Gleixner CC: Ingo Molnar CC: John Stultz CC: Herbert Xu CC: "David S. Miller" Signed-off-by: Jarod W