]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: picoxcell - Clamp AEAD SG list by input length
authorHerbert Xu <herbert@gondor.apana.org.au>
Thu, 11 Jun 2015 03:28:34 +0000 (11:28 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 12 Jun 2015 14:45:09 +0000 (22:45 +0800)
commit6596b1b9db52d70a9ff6a9ee7c0500d957495402
tree9f9577f0edb591a80e6d5c39b23061839f5dca30
parent1d760ba259fd092cb203baa224e47eb29e9caf4c
crypto: picoxcell - Clamp AEAD SG list by input length

Currently the driver assumes that the SG list contains exactly
the number of bytes required.  This assumption is incorrect.

Up until now this has been harmless.  However with the new AEAD
interface this now breaks as the AD SG list contains more bytes
than just the AD.

This patch fixes this by always clamping the AD SG list by the
specified AD length.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/picoxcell_crypto.c