]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: inside-secure - fix use of the SG list
authorAntoine Tenart <antoine.tenart@bootlin.com>
Mon, 27 May 2019 14:51:05 +0000 (16:51 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 6 Jun 2019 06:38:56 +0000 (14:38 +0800)
commite73915a3901e9e47f468d8fd419272418cdf5768
treec8c287d4c6d5b224a765b33acd97fd76df2cccab
parentc5c55c997fe83c659014c31f8a94a3a09cda7822
crypto: inside-secure - fix use of the SG list

Replace sg_nents_for_len by sg_nents when DMA mapping/unmapping buffers
and when looping over the SG entries. This fix cases where the SG
entries aren't used fully, which would in such cases led to using fewer
SG entries than needed (and thus the engine wouldn't have access to the
full input data and the result would be wrong).

Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/inside-secure/safexcel_cipher.c
drivers/crypto/inside-secure/safexcel_hash.c