[v3 PATCH 1/16] crypto: skcipher - Add skcipher walk interface

2016-11-22 Thread Herbert Xu
This patch adds the skcipher walk interface which replaces both blkcipher walk and ablkcipher walk. Just like blkcipher walk it can also be used for AEAD algorithms. Signed-off-by: Herbert Xu --- crypto/skcipher.c | 511

Re: [v2 PATCH 1/16] crypto: skcipher - Add skcipher walk interface

2016-11-15 Thread Herbert Xu
Hi Eric: On Sun, Nov 13, 2016 at 05:35:48PM -0800, Eric Biggers wrote: > Hi Herbert, > > On Sun, Nov 13, 2016 at 07:45:32PM +0800, Herbert Xu wrote: > > +int skcipher_walk_done(struct skcipher_walk *walk, int err) > > +{ > > + unsigned int nbytes = 0; > > + unsigned int n = 0; > > + > > +

Re: [v2 PATCH 1/16] crypto: skcipher - Add skcipher walk interface

2016-11-13 Thread Eric Biggers
Hi Herbert, On Sun, Nov 13, 2016 at 07:45:32PM +0800, Herbert Xu wrote: > +int skcipher_walk_done(struct skcipher_walk *walk, int err) > +{ > + unsigned int nbytes = 0; > + unsigned int n = 0; > + > + if (likely(err >= 0)) { > + n = walk->nbytes - err; > +

[v2 PATCH 1/16] crypto: skcipher - Add skcipher walk interface

2016-11-13 Thread Herbert Xu
This patch adds the skcipher walk interface which replaces both blkcipher walk and ablkcipher walk. Just like blkcipher walk it can also be used for AEAD algorithms. Signed-off-by: Herbert Xu --- crypto/skcipher.c | 515

Re: [PATCH 1/16] crypto: skcipher - Add skcipher walk interface

2016-11-11 Thread Herbert Xu
On Wed, Nov 02, 2016 at 01:54:20PM -0700, Eric Biggers wrote: > > I think the case where skcipher_copy_iv() fails may be handled incorrectly. > Wouldn't it need to set walk.nbytes to 0 so as to not confuse callers which > expect that behavior? Or maybe it should be calling skcipher_walk_done().

Re: [PATCH 1/16] crypto: skcipher - Add skcipher walk interface

2016-11-02 Thread Eric Biggers
Hi Herbert, just a few preliminary comments. I haven't made it through everything yet. On Wed, Nov 02, 2016 at 07:19:02AM +0800, Herbert Xu wrote: > +static int skcipher_walk_first(struct skcipher_walk *walk) > +{ > + if (WARN_ON_ONCE(in_irq())) > + return -EDEADLK; > + > +

[PATCH 1/16] crypto: skcipher - Add skcipher walk interface

2016-11-01 Thread Herbert Xu
This patch adds the skcipher walk interface which replaces both blkcipher walk and ablkcipher walk. Just like blkcipher walk it can also be used for AEAD algorithms. Signed-off-by: Herbert Xu --- crypto/skcipher.c | 512