]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: padlock-sha - Fix stack alignment
authorHerbert Xu <herbert@gondor.apana.org.au>
Tue, 22 Sep 2009 06:21:53 +0000 (23:21 -0700)
committerHerbert Xu <herbert@gondor.apana.org.au>
Tue, 22 Sep 2009 06:21:53 +0000 (23:21 -0700)
commit80ad3daa9dddbe0599be8c36b7ab07d8917c787e
treeb610dde153d80babcb01d84fec35134d0c08f34d
parent731c6abd479c0437e9cc142d234c81710a450b24
crypto: padlock-sha - Fix stack alignment

The PadLock hardware requires the output buffer for SHA to be
128-bit aligned.  We currentply place the buffer on the stack,
and ask gcc to align it to 128 bits.  That doesn't work on i386
because the kernel stack is only aligned to 32 bits.  This patch
changes the code to align the buffer by hand so that the hardware
doesn't fault on unaligned buffers.

Reported-by: Séguier Régis <rguier@e-teleport.net>
Tested-by: Séguier Régis <rguier@e-teleport.net>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/padlock-sha.c