linux_dsm_epyc7002/drivers/crypto/allwinner
Corentin Labbe 2f7287fbcb crypto: sun4i-ss - fix kmap usage
[ Upstream commit 9bc3dd24e7dccd50757db743a3635ad5b0497e6e ]

With the recent kmap change, some tests which were conditional on
CONFIG_DEBUG_HIGHMEM now are enabled by default.
This permit to detect a problem in sun4i-ss usage of kmap.

sun4i-ss uses two kmap via sg_miter (one for input, one for output), but
using two kmap at the same time is hard:
"the ordering has to be correct and with sg_miter that's probably hard to get
right." (quoting Tlgx)

So the easiest solution is to never have two sg_miter/kmap open at the same time.
After each use of sg_miter, I store the current index, for being able to
resume sg_miter to the right place.

Fixes: 6298e94821 ("crypto: sunxi-ss - Add Allwinner Security System crypto accelerator")
Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-03-04 11:37:37 +01:00
..
sun4i-ss crypto: sun4i-ss - fix kmap usage 2021-03-04 11:37:37 +01:00
sun8i-ce crypto: sun8i-ce - fix two error path's memory leak 2020-12-30 11:53:17 +01:00
sun8i-ss crypto: sun8i-ss - fix comparison of integer expressions of different signedness 2020-09-25 17:48:51 +10:00
Kconfig crypto: sun8i-ce - Add support for the TRNG 2020-09-25 17:48:28 +10:00
Makefile crypto: allwinner - Add sun8i-ss cryptographic offloader 2019-11-01 13:38:31 +08:00