On Wed, May 21, 2008 at 06:34:45PM +0900, FUJITA Tomonori wrote: > > Why do crypto need to know exactly the minimum alignment guaranteed by > kmalloc? Can you tell me an example how the alignment breaks crypto? It's used to make the context aligned so that for most algorithms we can get to the context without going through ALIGN_PTR. Only algorithms requiring alignments bigger than that offered by kmalloc would have to use ALIGN_PTR. This is important because the context is used on the fast path, i.e., for AES every block has to access the context. If we used an alignment value is bigger than that guaranteed by kmalloc then this would break because the context may end up unaligned. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <herbert@xxxxxxxxxxxxxxxxxxx> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt -- To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html