ef5c2e165a
commit ed527b13d800dd515a9e6c582f0a73eca65b2e1b upstream.
The CAAM driver currently violates an undocumented and slightly
controversial requirement imposed by the crypto stack that a buffer
referred to by the request structure via its virtual address may not
be modified while any scatterlists passed via the same request
structure are mapped for inbound DMA.
This may result in errors like
alg: aead: decryption failed on test 1 for gcm_base(ctr-aes-caam,ghash-generic): ret=74
alg: aead: Failed to load transform for gcm(aes): -2
on non-cache coherent systems, due to the fact that the GCM driver
passes an IV buffer by virtual address which shares a cacheline with
the auth_tag buffer passed via a scatterlist, resulting in corruption
of the auth_tag when the IV is updated while the DMA mapping is live.
Since the IV that is returned to the caller is only valid for CBC mode,
and given that the in-kernel users of CBC (such as CTS) don't trigger the
same issue as the GCM driver, let's just disable the output IV generation
for all modes except CBC for the time being.
Fixes:
|
||
---|---|---|
.. | ||
amcc | ||
axis | ||
bcm | ||
caam | ||
cavium | ||
ccp | ||
ccree | ||
chelsio | ||
hisilicon | ||
inside-secure | ||
marvell | ||
mediatek | ||
nx | ||
qat | ||
qce | ||
rockchip | ||
stm32 | ||
sunxi-ss | ||
ux500 | ||
virtio | ||
vmx | ||
atmel-aes-regs.h | ||
atmel-aes.c | ||
atmel-authenc.h | ||
atmel-ecc.c | ||
atmel-ecc.h | ||
atmel-sha-regs.h | ||
atmel-sha.c | ||
atmel-tdes-regs.h | ||
atmel-tdes.c | ||
exynos-rng.c | ||
geode-aes.c | ||
geode-aes.h | ||
hifn_795x.c | ||
img-hash.c | ||
ixp4xx_crypto.c | ||
Kconfig | ||
Makefile | ||
mxc-scc.c | ||
mxs-dcp.c | ||
n2_asm.S | ||
n2_core.c | ||
n2_core.h | ||
omap-aes-gcm.c | ||
omap-aes.c | ||
omap-aes.h | ||
omap-crypto.c | ||
omap-crypto.h | ||
omap-des.c | ||
omap-sham.c | ||
padlock-aes.c | ||
padlock-sha.c | ||
picoxcell_crypto.c | ||
picoxcell_crypto_regs.h | ||
qcom-rng.c | ||
s5p-sss.c | ||
sahara.c | ||
talitos.c | ||
talitos.h |