Re: [PATCH] prng: fix a few misc bugs in prng

2008-07-17 Thread Herbert Xu
On Wed, Jul 16, 2008 at 04:29:16PM -0400, Neil Horman wrote: > > Fixing a few misc bugs in prng.c: > - Remove prng_key/prng_iv from prng_context (both kept in tfm ptr) > - Making _get_more_prng_bytes return meaningful err codes (not just -1/0) > > Signed-off-by: Neil Horman <[EMAIL PROTEC

Re: [PATCH] prng; bring prng into better alignment with specification

2008-07-17 Thread Herbert Xu
On Wed, Jul 16, 2008 at 04:32:00PM -0400, Neil Horman wrote: > Bring prng into better alignment with specificaion: > > - Convert to using Generic AES 128 bit cipher > - Convert DT to be a non-shifted counter, increasing counter period > > Signed-off-by: Neil Horman <[EMAIL PROTECTED]>

Re: [PATCH] prng: fix a few misc bugs in prng

2008-07-17 Thread Neil Horman
On Thu, Jul 17, 2008 at 03:46:15PM +0800, Herbert Xu wrote: > On Wed, Jul 16, 2008 at 04:29:16PM -0400, Neil Horman wrote: > > > > Fixing a few misc bugs in prng.c: > > - Remove prng_key/prng_iv from prng_context (both kept in tfm ptr) > > - Making _get_more_prng_bytes return meaningful err cod

Re: [PATCH] prng; bring prng into better alignment with specification

2008-07-17 Thread Neil Horman
On Thu, Jul 17, 2008 at 03:48:56PM +0800, Herbert Xu wrote: > On Wed, Jul 16, 2008 at 04:32:00PM -0400, Neil Horman wrote: > > Bring prng into better alignment with specificaion: > > > > - Convert to using Generic AES 128 bit cipher > > - Convert DT to be a non-shifted counter, increasing c

Re: [PATCH 1/6] crypto: talitos - remove calls to of_node_put

2008-07-17 Thread Herbert Xu
On Wed, Jul 16, 2008 at 06:21:46PM -0500, Kim Phillips wrote: > From: Lee Nipper <[EMAIL PROTECTED]> > > Remove of_node_put calls since there is no corresponding of_node_get. > This patch prevents an exception when talitos is loaded a 2nd time. > This sequence: modprobe talitos; rmmod talitos; mod

Re: [PATCH 4/6] crypto: talitos - fix GFP flag usage

2008-07-17 Thread Herbert Xu
On Wed, Jul 16, 2008 at 06:33:45PM -0500, Kumar Gala wrote: > > On Jul 16, 2008, at 6:22 PM, Kim Phillips wrote: > > >use GFP_ATOMIC when necessary; use atomic_t when allocating > >submit_count. > > why? You mean why are atomics required? Yes that is a good question. Kim? Cheers, -- Visit

Re: [PATCH 4/6] crypto: talitos - fix GFP flag usage

2008-07-17 Thread Kumar Gala
On Jul 17, 2008, at 7:17 AM, Herbert Xu wrote: On Wed, Jul 16, 2008 at 06:33:45PM -0500, Kumar Gala wrote: On Jul 16, 2008, at 6:22 PM, Kim Phillips wrote: use GFP_ATOMIC when necessary; use atomic_t when allocating submit_count. why? You mean why are atomics required? Yes that is a goo

Re: [PATCH 4/6] crypto: talitos - fix GFP flag usage

2008-07-17 Thread Kim Phillips
On Thu, 17 Jul 2008 07:26:14 -0500 Kumar Gala <[EMAIL PROTECTED]> wrote: > > On Jul 17, 2008, at 7:17 AM, Herbert Xu wrote: > > > On Wed, Jul 16, 2008 at 06:33:45PM -0500, Kumar Gala wrote: > >> > >> On Jul 16, 2008, at 6:22 PM, Kim Phillips wrote: > >> > >>> use GFP_ATOMIC when necessary; use a

Re: [PATCH 4/6] crypto: talitos - fix GFP flag usage

2008-07-17 Thread Kumar Gala
On Jul 17, 2008, at 10:27 AM, Kim Phillips wrote: On Thu, 17 Jul 2008 07:26:14 -0500 Kumar Gala <[EMAIL PROTECTED]> wrote: On Jul 17, 2008, at 7:17 AM, Herbert Xu wrote: On Wed, Jul 16, 2008 at 06:33:45PM -0500, Kumar Gala wrote: On Jul 16, 2008, at 6:22 PM, Kim Phillips wrote: use GFP

Re: [PATCH 4/6] crypto: talitos - fix GFP flag usage

2008-07-17 Thread Kim Phillips
On Thu, 17 Jul 2008 10:51:43 -0500 Kumar Gala <[EMAIL PROTECTED]> wrote: > > On Jul 17, 2008, at 10:27 AM, Kim Phillips wrote: > > > On Thu, 17 Jul 2008 07:26:14 -0500 > > Kumar Gala <[EMAIL PROTECTED]> wrote: > > > >> > >> On Jul 17, 2008, at 7:17 AM, Herbert Xu wrote: > >> > >>> On Wed, Jul 16

[PATCH] crypto: Cleaning some more minor nits in prng

2008-07-17 Thread Neil Horman
Clean up a few more minor nits in the prng Now that we use a plain cipher instead of a blkcipher, we don't need an iv anymore, so remove that parameter from the reset_prng_context function. Make it instead with a legngth parameter, so that we can treat the key as a blob, rather than a s

Re: [PATCH] crypto: Cleaning some more minor nits in prng

2008-07-17 Thread Joe Perches
On Thu, 2008-07-17 at 14:30 -0400, Neil Horman wrote: > diff --git a/crypto/prng.c b/crypto/prng.c > index 9e2d277..0b1831e 100644 > { > int ret; > @@ -313,6 +313,9 @@ int reset_prng_context(struct prng_context *ctx, > > prng_key = (key != NULL) ? key : (unsigned char *)DEFAULT_PRNG_