Re: [PATCH 1/1] x86: replace RDRAND forced-reseed with simple sanity check

2015-08-05 Thread Ingo Molnar
* Len Brown wrote: > void x86_init_rdrand(struct cpuinfo_x86 *c) > { > #ifdef CONFIG_ARCH_RANDOM > unsigned long tmp; > - int i, count, ok; > + int i; > > if (!cpu_has(c, X86_FEATURE_RDRAND)) > - return; /* Nothing to do */ > + return; >

Re: [PATCH 1/1] x86: replace RDRAND forced-reseed with simple sanity check

2015-08-05 Thread Ingo Molnar
* Len Brown l...@kernel.org wrote: void x86_init_rdrand(struct cpuinfo_x86 *c) { #ifdef CONFIG_ARCH_RANDOM unsigned long tmp; - int i, count, ok; + int i; if (!cpu_has(c, X86_FEATURE_RDRAND)) - return; /* Nothing to do */ +

Re: [PATCH 1/1] x86: replace RDRAND forced-reseed with simple sanity check

2015-08-03 Thread Len Brown
> If we trust built-in-self-test... > why do we need to do this at all? We > should check the return value at every call, anyway... Yes, we do trust built-in-self-test. Yes, we do check for errors on on every call, not just here in boot. The sanity check at boot from the kernel allows Linux to

Re: [PATCH 1/1] x86: replace RDRAND forced-reseed with simple sanity check

2015-08-03 Thread Len Brown
If we trust built-in-self-test... why do we need to do this at all? We should check the return value at every call, anyway... Yes, we do trust built-in-self-test. Yes, we do check for errors on on every call, not just here in boot. The sanity check at boot from the kernel allows Linux to

Re: [PATCH 1/1] x86: replace RDRAND forced-reseed with simple sanity check

2015-08-02 Thread Thomas Gleixner
On Sun, 2 Aug 2015, Jeff Epler wrote: > On Fri, Jul 31, 2015 at 11:27:39AM -0400, Len Brown wrote: > > if (!cpu_has(c, X86_FEATURE_RDRAND)) > > - return; /* Nothing to do */ > > + return; > > Why remove this comment? Because it's pointless. -- To unsubscribe

Re: [PATCH 1/1] x86: replace RDRAND forced-reseed with simple sanity check

2015-08-02 Thread Jeff Epler
On Fri, Jul 31, 2015 at 11:27:39AM -0400, Len Brown wrote: > if (!cpu_has(c, X86_FEATURE_RDRAND)) > - return; /* Nothing to do */ > + return; Why remove this comment? -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a

Re: [PATCH 1/1] x86: replace RDRAND forced-reseed with simple sanity check

2015-08-02 Thread Pavel Machek
On Fri 2015-07-31 11:27:39, Len Brown wrote: > From: Len Brown > > x86_init_rdrand() was added with 2 goals: > > 1. Sanity check that the built-in-self-test circuit on the Digital >Random Number Generator (DRNG) is not complaining. As RDRAND >HW self-checks on every invocation, this

Re: [PATCH 1/1] x86: replace RDRAND forced-reseed with simple sanity check

2015-08-02 Thread Pavel Machek
On Fri 2015-07-31 11:27:39, Len Brown wrote: From: Len Brown len.br...@intel.com x86_init_rdrand() was added with 2 goals: 1. Sanity check that the built-in-self-test circuit on the Digital Random Number Generator (DRNG) is not complaining. As RDRAND HW self-checks on every

Re: [PATCH 1/1] x86: replace RDRAND forced-reseed with simple sanity check

2015-08-02 Thread Jeff Epler
On Fri, Jul 31, 2015 at 11:27:39AM -0400, Len Brown wrote: if (!cpu_has(c, X86_FEATURE_RDRAND)) - return; /* Nothing to do */ + return; Why remove this comment? -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a

Re: [PATCH 1/1] x86: replace RDRAND forced-reseed with simple sanity check

2015-08-02 Thread Thomas Gleixner
On Sun, 2 Aug 2015, Jeff Epler wrote: On Fri, Jul 31, 2015 at 11:27:39AM -0400, Len Brown wrote: if (!cpu_has(c, X86_FEATURE_RDRAND)) - return; /* Nothing to do */ + return; Why remove this comment? Because it's pointless. -- To unsubscribe from this

[PATCH 1/1] x86: replace RDRAND forced-reseed with simple sanity check

2015-07-31 Thread Len Brown
From: Len Brown x86_init_rdrand() was added with 2 goals: 1. Sanity check that the built-in-self-test circuit on the Digital Random Number Generator (DRNG) is not complaining. As RDRAND HW self-checks on every invocation, this goal is achieved by simply invoking RDRAND and checking

[PATCH 1/1] x86: replace RDRAND forced-reseed with simple sanity check

2015-07-31 Thread Len Brown
From: Len Brown len.br...@intel.com x86_init_rdrand() was added with 2 goals: 1. Sanity check that the built-in-self-test circuit on the Digital Random Number Generator (DRNG) is not complaining. As RDRAND HW self-checks on every invocation, this goal is achieved by simply invoking