Re: [PATCH] crypto: add alignment handling to digest layer

2006-04-09 Thread Herbert Xu
On Tue, Apr 04, 2006 at 12:04:07AM +0900, Atsushi Nemoto wrote: > > Some hash modules load/store data words directly. The digest layer > should pass properly aligned buffer to update()/final() method. This > patch also add cra_alignmask to some hash modules. > > Signed-off-by: Atsushi Nemoto <[

Re: [PATCH] crypto: add alignment handling to digest layer

2006-04-06 Thread Herbert Xu
On Fri, Apr 07, 2006 at 02:27:55PM +0900, Atsushi Nemoto wrote: > > It seems modern gcc (at least gcc 3.4 on i386 and mips) can allocate > the buffer conditionally. It is better to optimize for newer gcc, > isn't it? Of course it does. I must've been confused. Cheers, -- Visit Openswan at htt

Re: [PATCH] crypto: add alignment handling to digest layer

2006-04-06 Thread Atsushi Nemoto
On Fri, 7 Apr 2006 09:24:54 +1000, Herbert Xu <[EMAIL PROTECTED]> wrote: > Another thing, could you pleas change the stack allocation in final so > that it does it like cbc_process_decrypt? The reason is that gcc is too > stupid to not allocate that buffer unconditionally. I can do it, but it will

Re: [PATCH] crypto: add alignment handling to digest layer

2006-04-06 Thread Herbert Xu
On Thu, Apr 06, 2006 at 11:37:42AM +0900, Atsushi Nemoto wrote: > > We don't. I think update functions do not need an aligned buffer for > data which is smaller then the alignment size. You're right. If we do ever get any hardware that requires this we can always change it later on. Another th

Re: [PATCH] crypto: add alignment handling to digest layer

2006-04-05 Thread Atsushi Nemoto
On Thu, 6 Apr 2006 04:05:20 +1000, Herbert Xu <[EMAIL PROTECTED]> wrote: > Don't we need to copy this to an aligned buffer? We don't. I think update functions do not need an aligned buffer for data which is smaller then the alignment size. --- Atsushi Nemoto - To unsubscribe from this list: send

Re: [PATCH] crypto: add alignment handling to digest layer

2006-04-05 Thread Herbert Xu
On Tue, Apr 04, 2006 at 12:04:07AM +0900, Atsushi Nemoto wrote: > > @@ -38,12 +39,24 @@ static void update(struct crypto_tfm *tf > unsigned int bytes_from_page = min(l, ((unsigned int) > (PAGE_SIZE)) - >

Re: [PATCH] crypto: add alignment handling to digest layer

2006-04-03 Thread Herbert Xu
On Tue, Apr 04, 2006 at 12:04:07AM +0900, Atsushi Nemoto wrote: > > Some hash modules load/store data words directly. The digest layer > should pass properly aligned buffer to update()/final() method. This > patch also add cra_alignmask to some hash modules. This patch is in my queue. I'll be

Re: [PATCH] crypto: add alignment handling to digest layer

2006-04-03 Thread Atsushi Nemoto
Ping. This patch can be applied cleanly to 2.6.17-rc1. Some hash modules load/store data words directly. The digest layer should pass properly aligned buffer to update()/final() method. This patch also add cra_alignmask to some hash modules. Signed-off-by: Atsushi Nemoto <[EMAIL PROTECTED]>

[PATCH] crypto: add alignment handling to digest layer

2006-03-08 Thread Atsushi Nemoto
Some hash modules load/store data words directly. The digest layer should pass properly aligned buffer to update()/final() method. This patch also add cra_alignmask to some hash modules. Signed-off-by: Atsushi Nemoto <[EMAIL PROTECTED]> digest.c | 42 +++-