]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: omap-sham - fix buffer handling for split test cases
authorTero Kristo <t-kristo@ti.com>
Tue, 5 Nov 2019 14:00:55 +0000 (16:00 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Wed, 11 Dec 2019 08:36:58 +0000 (16:36 +0800)
commitab354f5637d9d6bb308c1002e20ab5f7265e69fe
tree29e8631495bdf15f22f00350e603a83277e23742
parente228a3fc7f05cf3813c3f7611d1dca53520b7069
crypto: omap-sham - fix buffer handling for split test cases

Current buffer handling logic fails in a case where the buffer contains
existing data from previous update which is divisible by block size.
This results in a block size of data to be left missing from the sg
list going out to the hw accelerator, ending up in stalling the
crypto accelerator driver (the last request never completes fully due
to missing data.)

Fix this by passing the total size of the data instead of the data size
of current request, and also parsing the buffer contents within the
prepare request handling.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/omap-sham.c