Re: alignment exception on MD5 code.

2006-01-25 Thread Herbert Xu
On Wed, Jan 25, 2006 at 01:13:07PM +0200, Ronen Shitrit wrote: > Tested, works fine. Great. I've simplified the crypto_ctxsize calculation slightly and this is the final version. Thanks, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]> Home Page: ht

RE: alignment exception on MD5 code.

2006-01-25 Thread Ronen Shitrit
en Shitrit -Original Message- From: Herbert Xu [mailto:[EMAIL PROTECTED] Sent: Monday, January 23, 2006 1:37 PM To: Ronen Shitrit Cc: linux-crypto@vger.kernel.org Subject: Re: alignment exception on MD5 code. On Sun, Jan 22, 2006 at 02:13:49PM +0200, Ronen Shitrit wrote: > For examp

Re: alignment exception on MD5 code.

2006-01-23 Thread Herbert Xu
On Sun, Jan 22, 2006 at 02:13:49PM +0200, Ronen Shitrit wrote: > For example the Xscale datasheet defines: > " Both LDRD and STRD instructions will generate an alignment exception > when the address bits [2:0] = 0b100." > > LDRD and STRD are load/store double instructions, and they are used when >

RE: alignment exception on MD5 code.

2006-01-22 Thread Ronen Shitrit
latest CSL compiler with the new ARM EABI. Regards Ronen Shitrit -Original Message- From: Herbert Xu [mailto:[EMAIL PROTECTED] Sent: Sunday, January 22, 2006 12:41 PM To: Ronen Shitrit Cc: linux-crypto@vger.kernel.org Subject: Re: alignment exception on MD5 code. On Sun, Jan 22, 2006 at 11:27:

Re: alignment exception on MD5 code.

2006-01-22 Thread Herbert Xu
On Sun, Jan 22, 2006 at 11:27:18AM +0200, Ronen Shitrit wrote: > You are right in a 64 bit processor we should not find this issue. > But on ARM926 (32 bit) we definitely have a problem. Why does the ARM926 require 64-bit alignment? Cheers, -- Visit Openswan at http://www.openswan.org/ Email: He

RE: alignment exception on MD5 code.

2006-01-22 Thread Ronen Shitrit
@vger.kernel.org Subject: Re: alignment exception on MD5 code. 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 process

RE: alignment exception on MD5 code.

2006-01-22 Thread Ronen Shitrit
exception on MD5 code. 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 Herb

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