Re: [PATCH] crypto: sun4i-ss: support the Security System PRNG

2017-06-21 Thread Herbert Xu
On Wed, Jun 21, 2017 at 08:48:55AM +0200, Maxime Ripard wrote: > On Tue, Jun 20, 2017 at 01:45:36PM +0200, Corentin Labbe wrote: > > On Tue, Jun 20, 2017 at 11:59:47AM +0200, Maxime Ripard wrote: > > > Hi, > > > > > > On Tue, Jun 20, 2017 at 10:58:19AM +0200, Corentin Labbe wrote: > > > > The

Re: [PATCH] crypto: sun4i-ss: support the Security System PRNG

2017-06-21 Thread Herbert Xu
On Wed, Jun 21, 2017 at 08:48:55AM +0200, Maxime Ripard wrote: > On Tue, Jun 20, 2017 at 01:45:36PM +0200, Corentin Labbe wrote: > > On Tue, Jun 20, 2017 at 11:59:47AM +0200, Maxime Ripard wrote: > > > Hi, > > > > > > On Tue, Jun 20, 2017 at 10:58:19AM +0200, Corentin Labbe wrote: > > > > The

Re: [PATCH] crypto: sun4i-ss: support the Security System PRNG

2017-06-21 Thread Maxime Ripard
On Tue, Jun 20, 2017 at 01:45:36PM +0200, Corentin Labbe wrote: > On Tue, Jun 20, 2017 at 11:59:47AM +0200, Maxime Ripard wrote: > > Hi, > > > > On Tue, Jun 20, 2017 at 10:58:19AM +0200, Corentin Labbe wrote: > > > The Security System have a PRNG, this patch add support for it via > > >

Re: [PATCH] crypto: sun4i-ss: support the Security System PRNG

2017-06-21 Thread Maxime Ripard
On Tue, Jun 20, 2017 at 01:45:36PM +0200, Corentin Labbe wrote: > On Tue, Jun 20, 2017 at 11:59:47AM +0200, Maxime Ripard wrote: > > Hi, > > > > On Tue, Jun 20, 2017 at 10:58:19AM +0200, Corentin Labbe wrote: > > > The Security System have a PRNG, this patch add support for it via > > >

Re: [PATCH] crypto: sun4i-ss: support the Security System PRNG

2017-06-20 Thread Corentin Labbe
On Tue, Jun 20, 2017 at 11:59:47AM +0200, Maxime Ripard wrote: > Hi, > > On Tue, Jun 20, 2017 at 10:58:19AM +0200, Corentin Labbe wrote: > > The Security System have a PRNG, this patch add support for it via > > crypto_rng. > > This might be a dumb question, but is the CRYPTO_RNG code really >

Re: [PATCH] crypto: sun4i-ss: support the Security System PRNG

2017-06-20 Thread Corentin Labbe
On Tue, Jun 20, 2017 at 11:59:47AM +0200, Maxime Ripard wrote: > Hi, > > On Tue, Jun 20, 2017 at 10:58:19AM +0200, Corentin Labbe wrote: > > The Security System have a PRNG, this patch add support for it via > > crypto_rng. > > This might be a dumb question, but is the CRYPTO_RNG code really >

Re: [PATCH] crypto: sun4i-ss: support the Security System PRNG

2017-06-20 Thread Maxime Ripard
Hi, On Tue, Jun 20, 2017 at 10:58:19AM +0200, Corentin Labbe wrote: > The Security System have a PRNG, this patch add support for it via > crypto_rng. This might be a dumb question, but is the CRYPTO_RNG code really supposed to be used with PRNG? > Signed-off-by: Corentin Labbe

Re: [PATCH] crypto: sun4i-ss: support the Security System PRNG

2017-06-20 Thread Maxime Ripard
Hi, On Tue, Jun 20, 2017 at 10:58:19AM +0200, Corentin Labbe wrote: > The Security System have a PRNG, this patch add support for it via > crypto_rng. This might be a dumb question, but is the CRYPTO_RNG code really supposed to be used with PRNG? > Signed-off-by: Corentin Labbe > --- >

Re: [PATCH] crypto: sun4i-ss: support the Security System PRNG

2016-11-17 Thread Corentin Labbe
On Thu, Nov 17, 2016 at 08:07:09PM -0500, Sandy Harris wrote: > Add Ted T'so to cc list. Shouldn't he be included on anything affecting > the random(4) driver? > Blindy used get_maintainer.pl, and since the file is in crypto, hw_random people were not set. Note that get_maintainer.pl on

Re: [PATCH] crypto: sun4i-ss: support the Security System PRNG

2016-11-17 Thread Corentin Labbe
On Thu, Nov 17, 2016 at 08:07:09PM -0500, Sandy Harris wrote: > Add Ted T'so to cc list. Shouldn't he be included on anything affecting > the random(4) driver? > Blindy used get_maintainer.pl, and since the file is in crypto, hw_random people were not set. Note that get_maintainer.pl on

Re: [PATCH] crypto: sun4i-ss: support the Security System PRNG

2016-11-17 Thread Sandy Harris
Add Ted T'so to cc list. Shouldn't he be included on anything affecting the random(4) driver? On Tue, Oct 18, 2016 at 8:34 AM, Corentin Labbe wrote: > From: LABBE Corentin > > The Security System have a PRNG. > This patch add support for it

Re: [PATCH] crypto: sun4i-ss: support the Security System PRNG

2016-11-17 Thread Sandy Harris
Add Ted T'so to cc list. Shouldn't he be included on anything affecting the random(4) driver? On Tue, Oct 18, 2016 at 8:34 AM, Corentin Labbe wrote: > From: LABBE Corentin > > The Security System have a PRNG. > This patch add support for it as an hwrng. Which is it? A PRNG & a HW RNG are

Re: [PATCH] crypto: sun4i-ss: support the Security System PRNG

2016-11-17 Thread Stephan Mueller
Am Donnerstag, 17. November 2016, 09:07:48 CET schrieb Corentin Labbe: Hi Corentin, > > Seed again, or just do not seed (and so return -EAGAIN for read() function) > until ready_callback ? This is your choice. But for the start sequence, you should not simply rely on get_random_bytes. For the

Re: [PATCH] crypto: sun4i-ss: support the Security System PRNG

2016-11-17 Thread Stephan Mueller
Am Donnerstag, 17. November 2016, 09:07:48 CET schrieb Corentin Labbe: Hi Corentin, > > Seed again, or just do not seed (and so return -EAGAIN for read() function) > until ready_callback ? This is your choice. But for the start sequence, you should not simply rely on get_random_bytes. For the

Re: [PATCH] crypto: sun4i-ss: support the Security System PRNG

2016-11-17 Thread Corentin Labbe
On Tue, Oct 18, 2016 at 04:24:22PM +0200, Stephan Mueller wrote: > Am Dienstag, 18. Oktober 2016, 14:34:27 CEST schrieb Corentin Labbe: > > Hi Corentin, > > > diff --git a/drivers/crypto/sunxi-ss/sun4i-ss-hwrng.c > > b/drivers/crypto/sunxi-ss/sun4i-ss-hwrng.c new file mode 100644 > > index

Re: [PATCH] crypto: sun4i-ss: support the Security System PRNG

2016-11-17 Thread Corentin Labbe
On Tue, Oct 18, 2016 at 04:24:22PM +0200, Stephan Mueller wrote: > Am Dienstag, 18. Oktober 2016, 14:34:27 CEST schrieb Corentin Labbe: > > Hi Corentin, > > > diff --git a/drivers/crypto/sunxi-ss/sun4i-ss-hwrng.c > > b/drivers/crypto/sunxi-ss/sun4i-ss-hwrng.c new file mode 100644 > > index

Re: [PATCH] crypto: sun4i-ss: support the Security System PRNG

2016-11-17 Thread Corentin Labbe
On Tue, Oct 18, 2016 at 09:39:17PM +0530, PrasannaKumar Muralidharan wrote: > Hi Corentin, > > I have a few minor comments. > > On 18 October 2016 at 18:04, Corentin Labbe wrote: > > From: LABBE Corentin > > > > The Security System have a

Re: [PATCH] crypto: sun4i-ss: support the Security System PRNG

2016-11-17 Thread Corentin Labbe
On Tue, Oct 18, 2016 at 09:39:17PM +0530, PrasannaKumar Muralidharan wrote: > Hi Corentin, > > I have a few minor comments. > > On 18 October 2016 at 18:04, Corentin Labbe wrote: > > From: LABBE Corentin > > > > The Security System have a PRNG. > > This patch add support for it as an hwrng. >

Re: [PATCH] crypto: sun4i-ss: support the Security System PRNG

2016-10-18 Thread PrasannaKumar Muralidharan
Hi Corentin, I have a few minor comments. On 18 October 2016 at 18:04, Corentin Labbe wrote: > From: LABBE Corentin > > The Security System have a PRNG. > This patch add support for it as an hwrng. > > Signed-off-by: Corentin Labbe

Re: [PATCH] crypto: sun4i-ss: support the Security System PRNG

2016-10-18 Thread PrasannaKumar Muralidharan
Hi Corentin, I have a few minor comments. On 18 October 2016 at 18:04, Corentin Labbe wrote: > From: LABBE Corentin > > The Security System have a PRNG. > This patch add support for it as an hwrng. > > Signed-off-by: Corentin Labbe > --- > drivers/crypto/Kconfig | 8 >

Re: [PATCH] crypto: sun4i-ss: support the Security System PRNG

2016-10-18 Thread Stephan Mueller
Am Dienstag, 18. Oktober 2016, 14:34:27 CEST schrieb Corentin Labbe: Hi Corentin, > diff --git a/drivers/crypto/sunxi-ss/sun4i-ss-hwrng.c > b/drivers/crypto/sunxi-ss/sun4i-ss-hwrng.c new file mode 100644 > index 000..95fadb7 > --- /dev/null > +++ b/drivers/crypto/sunxi-ss/sun4i-ss-hwrng.c >

Re: [PATCH] crypto: sun4i-ss: support the Security System PRNG

2016-10-18 Thread Stephan Mueller
Am Dienstag, 18. Oktober 2016, 14:34:27 CEST schrieb Corentin Labbe: Hi Corentin, > diff --git a/drivers/crypto/sunxi-ss/sun4i-ss-hwrng.c > b/drivers/crypto/sunxi-ss/sun4i-ss-hwrng.c new file mode 100644 > index 000..95fadb7 > --- /dev/null > +++ b/drivers/crypto/sunxi-ss/sun4i-ss-hwrng.c >