diff options
author | Horia Geantă <horia.geanta@nxp.com> | 2017-09-25 08:30:46 (GMT) |
---|---|---|
committer | Xie Xiaobo <xiaobo.xie@nxp.com> | 2017-09-26 02:59:34 (GMT) |
commit | 1e65b659831680691ffcfca687f568367122873e (patch) | |
tree | fd844bb8bb4ec8dcdc487002779688cb4e6c26b1 /arch | |
parent | 34f9fd43d2fe1adc55fcc8935bdcb6cac7f91a2e (diff) | |
download | linux-1e65b659831680691ffcfca687f568367122873e.tar.xz |
crypto: caam/qi2 - zeroize memory used for S/G entries
Memory used for S/G entries (kmem cache-backed) is not zeroized.
More, the dpaa2_sg_* API does not offer getters, setters for all fields
/ bits.
This means that there are bits that currently have random values.
Probably the most problematic is SGE[BMT] (Bypass Memory Translation).
When this "happens" to be set and IOMMU is enabled in the system,
caam engine will report DMA errors - for e.g. see below self-tests
failing:
[...]
dpaa2_caam dpseci.1: FD error: 000000a8
dpaa2_caam dpseci.1: 40001216: DECO: desc idx 18: DMA Error
alg: skcipher: encryption failed on chunk test 1 for cbc-3des-caam-qi2: ret=5
dpaa2_caam dpseci.1: FD error: 00000088
dpaa2_caam dpseci.1: 40000916: DECO: desc idx 9: DMA Error
alg: aead: encryption failed on test 1 for rfc4106-gcm-aes-caam-qi2: ret=5
dpaa2_caam dpseci.1: FD error: 000000a8
dpaa2_caam dpseci.1: 40001516: DECO: desc idx 21: DMA Error
alg: aead-ddst: encryption failed on test 1 for rfc4543-gcm-aes-caam-qi2: ret=5
dpaa2_caam dpseci.1: FD error: 00000088
dpaa2_caam dpseci.1: 40000916: DECO: desc idx 9: DMA Error
alg: aead: encryption failed on test 1 for gcm-aes-caam-qi2: ret=5
[...]
Fix this by requiring allocated memory to be zeroized.
Fixes: d4df6899d2c6 ("crypto: caam/qi2 - add DPAA2-CAAM driver")
Fixes: 74e4a0d250d3 ("crypto: caam/qi2 - add ablkcipher algorithms")
Fixes: 40865366205a ("crypto: caam/qi2 - add support for TLS 1.0 record")
Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
Diffstat (limited to 'arch')
0 files changed, 0 insertions, 0 deletions