linux/drivers/crypto/marvell/cesa
Arnd Bergmann efbc7764c4 crypto: marvell/cesa - Fix type mismatch warning
Commit df8fc4e934 ("kbuild: Enable -fstrict-flex-arrays=3") uncovered
a type mismatch in cesa 3des support that leads to a memcpy beyond the
end of a structure:

In function 'fortify_memcpy_chk',
    inlined from 'mv_cesa_des3_ede_setkey' at drivers/crypto/marvell/cesa/cipher.c:307:2:
include/linux/fortify-string.h:583:25: error: call to '__write_overflow_field' declared with attribute warning: detected write beyond size of field (1st parameter); maybe use struct_group()? [-Werror=attribute-warning]
  583 |                         __write_overflow_field(p_size_field, size);
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This is probably harmless as the actual data that is copied has the correct
type, but clearly worth fixing nonetheless.

Fixes: 4ada483978 ("crypto: marvell/cesa - add Triple-DES support")
Cc: Kees Cook <keescook@chromium.org>
Cc: Gustavo A. R. Silva" <gustavoars@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2023-06-02 18:21:32 +08:00
..
cesa.c crypto: marvell/cesa - Use request_complete helpers 2023-02-13 18:34:49 +08:00
cesa.h crypto: marvell/cesa - change FPGA indirect article to an 2021-06-17 15:07:30 +08:00
cipher.c crypto: marvell/cesa - Fix type mismatch warning 2023-06-02 18:21:32 +08:00
hash.c crypto: marvell/cesa - Use crypto_wait_req 2023-02-03 12:54:54 +08:00
Makefile
tdma.c crypto: marvell/cesa - Use request_complete helpers 2023-02-13 18:34:49 +08:00