OpenCloudOS-Kernel/drivers/crypto
Eneas U de Queiroz 3ee50c896d crypto: qce - save a sg table slot for result buf
When ctr-aes-qce is used for gcm-mode, an extra sg entry for the
authentication tag is present, causing trouble when the qce driver
prepares the dst-results sg table for dma.

It computes the number of entries needed with sg_nents_for_len, leaving
out the tag entry.  Then it creates a sg table with that number plus
one, used to store a result buffer.

When copying the sg table, there's no limit to the number of entries
copied, so the extra slot is filled with the authentication tag sg.
When the driver tries to add the result sg, the list is full, and it
returns EINVAL.

By limiting the number of sg entries copied to the dest table, the slot
for the result buffer is guaranteed to be unused.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2019-12-27 18:18:04 +08:00
..
allwinner crypto: sun4i-ss - make unexported sun4i_ss_pm_ops static 2019-12-27 18:18:03 +08:00
amcc crypto: crypto4xx - fix double-free in crypto4xx_destroy_sdr 2019-11-08 23:15:52 +08:00
amlogic crypto: amlogic - add unspecified HAS_IOMEM dependency 2019-12-20 14:58:34 +08:00
axis crypto: artpec6 - use devm_platform_ioremap_resource() to simplify code 2019-08-09 15:11:58 +10:00
bcm crypto: bcm-spu - switch to skcipher API 2019-11-17 09:02:46 +08:00
caam crypto: caam - Add support for i.MX8M Mini 2019-12-27 18:18:03 +08:00
cavium crypto: cavium/cpt - switch to skcipher API 2019-11-17 09:02:47 +08:00
ccp crypto: ccp - provide in-kernel API to submit TEE commands 2019-12-20 14:58:32 +08:00
ccree crypto: ccree - fix backlog memory leak 2019-12-11 16:36:55 +08:00
chelsio crypto: chtls - Fixed memory leak 2019-12-27 18:18:04 +08:00
hisilicon crypto: hisilicon - still no need to check return value of debugfs_create functions 2019-12-20 14:58:33 +08:00
inside-secure crypto: inside-secure - Fix hang case on EIP97 with basic DES/3DES ops 2019-12-20 14:58:34 +08:00
marvell crypto: marvell/cesa - rename blkcipher to skcipher 2019-11-17 09:02:49 +08:00
mediatek crypto: mediatek - switch to skcipher API 2019-11-17 09:02:47 +08:00
nx crypto: nx - remove stale comment referring to the blkcipher walk API 2019-11-17 09:02:49 +08:00
qat compat_ioctl: remove most of fs/compat_ioctl.c 2019-12-01 13:46:15 -08:00
qce crypto: qce - save a sg table slot for result buf 2019-12-27 18:18:04 +08:00
rockchip crypto: rockchip - switch to skcipher API 2019-11-17 09:02:48 +08:00
stm32 crypto: stm32/hash - Use dma_request_chan() instead dma_request_slave_channel() 2019-12-27 18:18:03 +08:00
ux500 crypto: Kconfig - Fix indentation 2019-12-11 16:36:05 +08:00
virtio crypto: virtio - switch to skcipher API 2019-11-17 09:02:45 +08:00
vmx crypto: vmx - Avoid weird build failures 2019-11-22 18:48:39 +08:00
Kconfig crypto: inside-secure - add unspecified HAS_IOMEM dependency 2019-12-20 14:58:34 +08:00
Makefile crypto: sun4i-ss - Move to Allwinner directory 2019-11-01 13:38:31 +08:00
atmel-aes-regs.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
atmel-aes.c crypto: atmel-aes - Fix CTR counter overflow when multiple fragments 2019-12-20 14:58:35 +08:00
atmel-authenc.h crypto: atmel - Fix authenc support when it is set to m 2019-11-08 23:00:45 +08:00
atmel-ecc.c crypto: atmel-ecc - factor out code that can be shared 2019-05-30 15:35:45 +08:00
atmel-i2c.c crypto: atmel - Fix -Wunused-const-variable warning 2019-08-30 18:05:31 +10:00
atmel-i2c.h crypto: atmel - Fix -Wunused-const-variable warning 2019-08-30 18:05:31 +10:00
atmel-sha-regs.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
atmel-sha.c crypto: atmel-{sha,tdes} - Print warn message even when deferring 2019-12-20 14:58:35 +08:00
atmel-sha204a.c crypto: atmel-sha204a - Use device-managed registration API 2019-08-02 14:43:59 +10:00
atmel-tdes-regs.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
atmel-tdes.c crypto: atmel-{aes,tdes} - Update the IV only when the op succeeds 2019-12-20 14:58:35 +08:00
exynos-rng.c crypto: exynos - use devm_platform_ioremap_resource() to simplify code 2019-08-09 15:11:59 +10:00
geode-aes.c crypto: geode-aes - convert to skcipher API and make thread-safe 2019-10-23 19:46:56 +11:00
geode-aes.h crypto: geode-aes - convert to skcipher API and make thread-safe 2019-10-23 19:46:56 +11:00
hifn_795x.c crypto: hifn - switch to skcipher API 2019-11-17 09:02:47 +08:00
img-hash.c crypto: img-hash - Use dma_request_chan instead dma_request_slave_channel 2019-12-27 18:18:03 +08:00
ixp4xx_crypto.c crypto: ixp4xx - switch to skcipher API 2019-11-17 09:02:47 +08:00
mxs-dcp.c crypto: mxs - switch to skcipher API 2019-11-17 09:02:47 +08:00
n2_asm.S License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
n2_core.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2019-11-25 19:49:58 -08:00
n2_core.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
omap-aes-gcm.c crypto: omap-aes-gcm - convert to use crypto engine 2019-12-11 16:37:00 +08:00
omap-aes.c crypto: omap-aes-gcm - convert to use crypto engine 2019-12-11 16:37:00 +08:00
omap-aes.h crypto: omap-aes-gcm - convert to use crypto engine 2019-12-11 16:37:00 +08:00
omap-crypto.c crypto: omap-crypto - copy the temporary data to output buffer properly 2019-12-11 16:37:00 +08:00
omap-crypto.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
omap-des.c crypto: omap-des - handle NULL cipher request 2019-12-11 16:37:00 +08:00
omap-sham.c crypto: omap-sham - fix unaligned sg list handling 2019-12-11 16:37:00 +08:00
padlock-aes.c crypto: padlock-aes - convert to skcipher API 2019-10-23 19:46:58 +11:00
padlock-sha.c crypto: padlock-sha - Use init_tfm/exit_tfm interface 2019-12-11 16:48:39 +08:00
picoxcell_crypto.c crypto: picoxcell - adjust the position of tasklet_init and fix missed tasklet_kill 2019-12-20 14:58:33 +08:00
picoxcell_crypto_regs.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
qcom-rng.c crypto: qcom-rng - use devm_platform_ioremap_resource() to simplify code 2019-08-09 15:12:03 +10:00
s5p-sss.c crypto: s5p - switch to skcipher API 2019-11-17 09:02:46 +08:00
sahara.c crypto: sahara - switch to skcipher API 2019-11-17 09:02:48 +08:00
talitos.c crypto: talitos - switch to skcipher API 2019-11-17 09:02:49 +08:00
talitos.h crypto: talitos - drop icv_ool 2019-07-03 22:13:11 +08:00