crypto: remove CRYPTO_TFM_RES_BAD_BLOCK_LEN
authorEric Biggers <ebiggers@google.com>
Tue, 31 Dec 2019 03:19:35 +0000 (21:19 -0600)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 9 Jan 2020 03:30:52 +0000 (11:30 +0800)
commit5c925e8b10a5f43f220755aceb9d5f14b2f4e2c5
tree4b076d771bb60303be9fbde31c0c17380c3a1ab3
parentf9d89b853ec1709345c0e2f1f51ae53188eef981
crypto: remove CRYPTO_TFM_RES_BAD_BLOCK_LEN

The flag CRYPTO_TFM_RES_BAD_BLOCK_LEN is never checked for, and it's
only set by one driver.  And even that single driver's use is wrong
because the driver is setting the flag from ->encrypt() and ->decrypt()
with no locking, which is unsafe because ->encrypt() and ->decrypt() can
be executed by many threads in parallel on the same tfm.

Just remove this flag.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/ccree/cc_aead.c
drivers/crypto/ccree/cc_cipher.c
include/linux/crypto.h