[RFC] [PATCH 2/7] crypto: authenc - convert to ahash

2009-07-16 Thread Steffen Klassert
This patch converts authenc to the new ahash interface. Signed-off-by: Steffen Klassert --- crypto/authenc.c | 215 + 1 files changed, 150 insertions(+), 65 deletions(-) diff --git a/crypto/authenc.c b/crypto/authenc.c index 2e16ce0..bd456e3

Re: [RFC] [PATCH 2/7] crypto: authenc - convert to ahash

2009-07-17 Thread David Miller
From: Steffen Klassert Date: Thu, 16 Jul 2009 13:17:47 +0200 > + /* > + * head must be a scatterlist with two entries. > + * We remove a potentially set termination bit > + * on the first enty. > + */ > + head->page_link &= ~0x02; > + > if (chain) { >

Re: [RFC] [PATCH 2/7] crypto: authenc - convert to ahash

2009-07-19 Thread Steffen Klassert
On Fri, Jul 17, 2009 at 10:03:34AM -0700, David Miller wrote: > From: Steffen Klassert > Date: Thu, 16 Jul 2009 13:17:47 +0200 > > > + /* > > +* head must be a scatterlist with two entries. > > +* We remove a potentially set termination bit > > +* on the first enty. > > +*/ > >

Re: [RFC] [PATCH 2/7] crypto: authenc - convert to ahash

2009-07-19 Thread Herbert Xu
On Mon, Jul 20, 2009 at 08:26:43AM +0200, Steffen Klassert wrote: > > We have sg_mark_end() which sets the termination bit on a sg list entry, > but we don't have an interface to remove the termination bit from a sg > list entry. For the case at hand, as we've agreed to only do the chaining if th

Re: [RFC] [PATCH 2/7] crypto: authenc - convert to ahash

2009-07-20 Thread Steffen Klassert
On Mon, Jul 20, 2009 at 02:55:14PM +0800, Herbert Xu wrote: > > For the case at hand, as we've agreed to only do the chaining > if there is only a single entry in the list, we don't need this > at all. All you need to do is copy the page pointer, offset and > length without copying the raw scatte

Re: [RFC] [PATCH 2/7] crypto: authenc - convert to ahash

2009-07-20 Thread Herbert Xu
On Mon, Jul 20, 2009 at 09:57:01AM +0200, Steffen Klassert wrote: > > Agreed for this case. What about the existing code, should we create an > interface for it? Can you point me to the existing code? Thanks, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page:

Re: [RFC] [PATCH 2/7] crypto: authenc - convert to ahash

2009-07-20 Thread Steffen Klassert
On Mon, Jul 20, 2009 at 04:21:16PM +0800, Herbert Xu wrote: > > Can you point me to the existing code? > For the crypto-layer it's just scatterwalk_sg_chain() that removes the termination bit. For the block-layer it's blk_rq_map_integrity_sg() and two times in blk_rq_map_sg(). -- To unsubscrib

Re: [RFC] [PATCH 2/7] crypto: authenc - convert to ahash

2009-07-20 Thread Herbert Xu
On Mon, Jul 20, 2009 at 10:36:40AM +0200, Steffen Klassert wrote: > > For the crypto-layer it's just scatterwalk_sg_chain() that removes the > termination bit. The history behind this is that the crypto layer has used chaining way before generic chaining was invented. When the generic code was