Re: [HIFN 00/03]: RNG support v2
On Sat, Nov 24, 2007 at 10:38:45PM -0800, Andrew Morton wrote: > On Sun, 18 Nov 2007 22:32:52 +0100 (MET) Patrick McHardy <[EMAIL PROTECTED]> > wrote: > > > These patches add support for using the HIFN rng. > > Dumb question: what is HIFN? They make crypto hardware: www.hifn.com. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [HIFN 00/03]: RNG support v2
On Sun, 18 Nov 2007 22:32:52 +0100 (MET) Patrick McHardy <[EMAIL PROTECTED]> wrote: > These patches add support for using the HIFN rng. Dumb question: what is HIFN? - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [HIFN 00/03]: RNG support v2
On Sun, 18 Nov 2007 22:32:52 +0100 (MET) Patrick McHardy [EMAIL PROTECTED] wrote: These patches add support for using the HIFN rng. Dumb question: what is HIFN? - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [HIFN 00/03]: RNG support v2
On Sat, Nov 24, 2007 at 10:38:45PM -0800, Andrew Morton wrote: On Sun, 18 Nov 2007 22:32:52 +0100 (MET) Patrick McHardy [EMAIL PROTECTED] wrote: These patches add support for using the HIFN rng. Dumb question: what is HIFN? They make crypto hardware: www.hifn.com. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmVHI~} [EMAIL PROTECTED] Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [HIFN 00/03]: RNG support v2
On Sun, Nov 18, 2007 at 10:32:52PM +0100, Patrick McHardy wrote: > These patches add support for using the HIFN rng. All applied. Thanks a lot Patrick! -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [HIFN 00/03]: RNG support v2
On Sun, Nov 18, 2007 at 10:32:52PM +0100, Patrick McHardy wrote: These patches add support for using the HIFN rng. All applied. Thanks a lot Patrick! -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmVHI~} [EMAIL PROTECTED] Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [HIFN 00/03]: RNG support v2
On Monday 19 November 2007 19:25:25 Patrick McHardy wrote: > Michael Buesch wrote: > > On Sunday 18 November 2007 22:32:52 Patrick McHardy wrote: > >> These patches add support for using the HIFN rng. > > > > Acked-by: Michael Buesch <[EMAIL PROTECTED]> > > > > Patrick, can you send this patchset to Andrew for inclusion into -mm? > > > I think he already pulls from Herbert's cryptodev-2.6 tree > (otherwise the patches useless anyway since the HIFN driver > is only in that tree). > > > Ok, well. Then apply it to any tree you like and push it upstream somehow. I'm OK with it. -- Greetings Michael. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [HIFN 00/03]: RNG support v2
Michael Buesch wrote: On Sunday 18 November 2007 22:32:52 Patrick McHardy wrote: These patches add support for using the HIFN rng. Acked-by: Michael Buesch <[EMAIL PROTECTED]> Patrick, can you send this patchset to Andrew for inclusion into -mm? I think he already pulls from Herbert's cryptodev-2.6 tree (otherwise the patches useless anyway since the HIFN driver is only in that tree). - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [HIFN 00/03]: RNG support v2
On Sunday 18 November 2007 22:32:52 Patrick McHardy wrote: > These patches add support for using the HIFN rng. Acked-by: Michael Buesch <[EMAIL PROTECTED]> Patrick, can you send this patchset to Andrew for inclusion into -mm? -- Greetings Michael. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [HIFN 00/03]: RNG support v2
Hi Patrick. On Sun, Nov 18, 2007 at 10:32:52PM +0100, Patrick McHardy ([EMAIL PROTECTED]) wrote: > These patches add support for using the HIFN rng. > Patrick McHardy (3): > [HWRNG]: move status polling loop to data_present callbacks > [HIFN]: Improve PLL initialization > [HIFN]: Add support for using the random number generator Thanks a lot for your patches. Ack for all three. -- Evgeniy Polyakov - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [HIFN 00/03]: RNG support v2
Hi Patrick. On Sun, Nov 18, 2007 at 10:32:52PM +0100, Patrick McHardy ([EMAIL PROTECTED]) wrote: These patches add support for using the HIFN rng. Patrick McHardy (3): [HWRNG]: move status polling loop to data_present callbacks [HIFN]: Improve PLL initialization [HIFN]: Add support for using the random number generator Thanks a lot for your patches. Ack for all three. -- Evgeniy Polyakov - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [HIFN 00/03]: RNG support v2
On Sunday 18 November 2007 22:32:52 Patrick McHardy wrote: These patches add support for using the HIFN rng. Acked-by: Michael Buesch [EMAIL PROTECTED] Patrick, can you send this patchset to Andrew for inclusion into -mm? -- Greetings Michael. - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [HIFN 00/03]: RNG support v2
Michael Buesch wrote: On Sunday 18 November 2007 22:32:52 Patrick McHardy wrote: These patches add support for using the HIFN rng. Acked-by: Michael Buesch [EMAIL PROTECTED] Patrick, can you send this patchset to Andrew for inclusion into -mm? I think he already pulls from Herbert's cryptodev-2.6 tree (otherwise the patches useless anyway since the HIFN driver is only in that tree). - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [HIFN 00/03]: RNG support v2
On Monday 19 November 2007 19:25:25 Patrick McHardy wrote: Michael Buesch wrote: On Sunday 18 November 2007 22:32:52 Patrick McHardy wrote: These patches add support for using the HIFN rng. Acked-by: Michael Buesch [EMAIL PROTECTED] Patrick, can you send this patchset to Andrew for inclusion into -mm? I think he already pulls from Herbert's cryptodev-2.6 tree (otherwise the patches useless anyway since the HIFN driver is only in that tree). Ok, well. Then apply it to any tree you like and push it upstream somehow. I'm OK with it. -- Greetings Michael. - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[HIFN 00/03]: RNG support v2
These patches add support for using the HIFN rng. The first patch changes the hwrng API to move waiting for availability of new random into the drivers. This allows to use driver-specific delays instead of the constant 10us delay used previously, increasing the HIFN speed from 2.5mbit to almost 15mbit, which is nearly the theoretical maximum. The second patch improves the PLL initialization by making the reference clock configurable and its speed known to the driver, which is needed to calculate the amount of time to wait between two RNG reads. Since there is no way to find out the frequency reliably (especially for the external clock), it adds some sane looking defaults and a module parameter to override it. It also changes the PLL initialization to follow the procedure described in the HIFN documentation. The third patch adds hw_random support. To use the rng, the HW_RANDOM config option has to be enabled. Running rngtest on the random number generator indicates that it works properly, with an average failure ratio of about 1:1000 at ~15mbit: rngtest: bits received from input: 315532 rngtest: FIPS 140-2 successes: 157621 rngtest: FIPS 140-2 failures: 129 rngtest: FIPS 140-2(2001-10-10) Monobit: 20 rngtest: FIPS 140-2(2001-10-10) Poker: 13 rngtest: FIPS 140-2(2001-10-10) Runs: 54 rngtest: FIPS 140-2(2001-10-10) Long run: 43 rngtest: FIPS 140-2(2001-10-10) Continuous run: 0 rngtest: input channel speed: (min=441.005; avg=14730.378; max=21510.187)Kibits/s rngtest: FIPS tests speed: (min=1.228; avg=55.967; max=62.742)Mibits/s rngtest: Program run time: 263373905 microseconds Changes this last posting: - follow PLL initialization procedure as described in the documentation - allow to specify clock source without a frequency - rename pll_ref module parameter to hifn_pll_ref - discard first rng value after initialization as suggested by the documentation - use ktime instead of get_cycles for delaying rng reads - adapt to the hwrng API changes - fix cleanup in initialization error path Michael, if you're OK with the RNG changes, I'd suggest that all three patches go through Herbert since the HIFN patches depend on that part. drivers/char/hw_random/amd-rng.c| 12 ++- drivers/char/hw_random/core.c | 24 + drivers/char/hw_random/geode-rng.c | 12 ++- drivers/char/hw_random/intel-rng.c | 15 ++- drivers/char/hw_random/omap-rng.c | 13 ++- drivers/char/hw_random/pasemi-rng.c | 14 ++- drivers/char/hw_random/via-rng.c| 19 ++-- drivers/crypto/hifn_795x.c | 192 ++- include/linux/hw_random.h |2 +- 9 files changed, 262 insertions(+), 41 deletions(-) Patrick McHardy (3): [HWRNG]: move status polling loop to data_present callbacks [HIFN]: Improve PLL initialization [HIFN]: Add support for using the random number generator - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[HIFN 00/03]: RNG support v2
These patches add support for using the HIFN rng. The first patch changes the hwrng API to move waiting for availability of new random into the drivers. This allows to use driver-specific delays instead of the constant 10us delay used previously, increasing the HIFN speed from 2.5mbit to almost 15mbit, which is nearly the theoretical maximum. The second patch improves the PLL initialization by making the reference clock configurable and its speed known to the driver, which is needed to calculate the amount of time to wait between two RNG reads. Since there is no way to find out the frequency reliably (especially for the external clock), it adds some sane looking defaults and a module parameter to override it. It also changes the PLL initialization to follow the procedure described in the HIFN documentation. The third patch adds hw_random support. To use the rng, the HW_RANDOM config option has to be enabled. Running rngtest on the random number generator indicates that it works properly, with an average failure ratio of about 1:1000 at ~15mbit: rngtest: bits received from input: 315532 rngtest: FIPS 140-2 successes: 157621 rngtest: FIPS 140-2 failures: 129 rngtest: FIPS 140-2(2001-10-10) Monobit: 20 rngtest: FIPS 140-2(2001-10-10) Poker: 13 rngtest: FIPS 140-2(2001-10-10) Runs: 54 rngtest: FIPS 140-2(2001-10-10) Long run: 43 rngtest: FIPS 140-2(2001-10-10) Continuous run: 0 rngtest: input channel speed: (min=441.005; avg=14730.378; max=21510.187)Kibits/s rngtest: FIPS tests speed: (min=1.228; avg=55.967; max=62.742)Mibits/s rngtest: Program run time: 263373905 microseconds Changes this last posting: - follow PLL initialization procedure as described in the documentation - allow to specify clock source without a frequency - rename pll_ref module parameter to hifn_pll_ref - discard first rng value after initialization as suggested by the documentation - use ktime instead of get_cycles for delaying rng reads - adapt to the hwrng API changes - fix cleanup in initialization error path Michael, if you're OK with the RNG changes, I'd suggest that all three patches go through Herbert since the HIFN patches depend on that part. drivers/char/hw_random/amd-rng.c| 12 ++- drivers/char/hw_random/core.c | 24 + drivers/char/hw_random/geode-rng.c | 12 ++- drivers/char/hw_random/intel-rng.c | 15 ++- drivers/char/hw_random/omap-rng.c | 13 ++- drivers/char/hw_random/pasemi-rng.c | 14 ++- drivers/char/hw_random/via-rng.c| 19 ++-- drivers/crypto/hifn_795x.c | 192 ++- include/linux/hw_random.h |2 +- 9 files changed, 262 insertions(+), 41 deletions(-) Patrick McHardy (3): [HWRNG]: move status polling loop to data_present callbacks [HIFN]: Improve PLL initialization [HIFN]: Add support for using the random number generator - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/