summaryrefslogtreecommitdiffstats
path: root/drivers/crypto/atmel-i2c.c
diff options
context:
space:
mode:
authorNicolas Toromanoff <nicolas.toromanoff@foss.st.com>2021-11-30 08:55:00 +0100
committerHerbert Xu <herbert@gondor.apana.org.au>2021-12-11 16:48:06 +1100
commit4b898d5cfa4d9a0ad5bc82cb5eafdc092394c6a9 (patch)
treedaf7d36e5e558bf039ad97dc41ab2f7ac7cc2e00 /drivers/crypto/atmel-i2c.c
parentfa97dc2d48b476ea98199d808d3248d285987e99 (diff)
downloadlinux-4b898d5cfa4d9a0ad5bc82cb5eafdc092394c6a9.tar.bz2
crypto: stm32/cryp - fix bugs and crash in tests
Extra crypto manager auto test were crashing or failling due to 2 reasons: - block in a dead loop (dues to issues in cipher end process management) - crash due to read/write unmapped memory (this crash was also reported when using openssl afalg engine) Rework interrupt management, interrupts are masked as soon as they are no more used: if input buffer is fully consumed, "Input FIFO not full" interrupt is masked and if output buffer is full, "Output FIFO not empty" interrupt is masked. And crypto request finish when input *and* outpout buffer are fully read/write. About the crash due to unmapped memory, using scatterwalk_copychunks() that will map and copy each block fix the issue. Using this api and copying full block will also fix unaligned data access, avoid early copy of in/out buffer, and make useless the extra alignment constraint. Fixes: 9e054ec21ef8 ("crypto: stm32 - Support for STM32 CRYP crypto module") Reported-by: Marek Vasut <marex@denx.de> Signed-off-by: Nicolas Toromanoff <nicolas.toromanoff@foss.st.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/atmel-i2c.c')
0 files changed, 0 insertions, 0 deletions