Re: alignment exception on MD5 code.

2006-01-19 Thread David S. Miller
From: "Ronen Shitrit" <[EMAIL PROTECTED]> Date: Thu, 19 Jan 2006 15:50:15 +0200 > On the MD5 code we allocate 2 structures in one kmalloc: > api.c (line 129): > tfm = kmalloc(sizeof(*tfm) + alg->cra_ctxsize, GFP_KERNEL); Besides the things Herbert Xu has pointed out, that kmalloc() is very much d

Re: alignment exception on MD5 code.

2006-01-19 Thread Herbert Xu
Ronen Shitrit <[EMAIL PROTECTED]> wrote: > > The address of the first structure is aligned to 8. > Since the first structure cipher_tfm is of size: (2 + 9(union))*4 = > 11*4, This calculation is correct for a 32-bit processor. However, on a 64-bit processor you'll find that the size of crypto_tf