Re: [PATCH 0/8] crypto: remove the CRYPTO_TFM_RES_* flags

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 31 Dec 2019 at 04:21, Eric Biggers <ebiggers@xxxxxxxxxx> wrote:
>
> The CRYPTO_TFM_RES_* flags are pointless since they are never checked
> anywhere.  And it's not really possible for anyone to start using them
> without a lot of work, since many drivers aren't setting them or are
> setting them when they shouldn't.
>
> Also, if we ever actually need to start distinguishing ->setkey() errors
> better (which is somewhat unlikely, as it's been a long time with no one
> caring), we'd probably be much better off just using different return
> values, like -EINVAL if the key is invalid for the algorithm vs.
> -EKEYREJECTED if the key was rejected by a policy like "no weak keys".
> That would be much simpler, less error-prone, and easier to test.
>
> So let's just remove these flags for now.  This gets rid of a lot of
> pointless boilerplate code.
>
> Patches 6 and 8 are a bit large since they touch so many drivers, though
> the changes are straightforward and it would seem overkill to do this as
> a series of 70 separate patches.  But let me know if it's needed.
>
> Eric Biggers (8):
>   crypto: chelsio - fix writing tfm flags to wrong place
>   crypto: artpec6 - return correct error code for failed setkey()
>   crypto: atmel-sha - fix error handling when setting hmac key
>   crypto: remove unused tfm result flags
>   crypto: remove CRYPTO_TFM_RES_BAD_BLOCK_LEN
>   crypto: remove CRYPTO_TFM_RES_BAD_KEY_LEN
>   crypto: remove CRYPTO_TFM_RES_WEAK_KEY
>   crypto: remove propagation of CRYPTO_TFM_RES_* flags
>
...
>  108 files changed, 218 insertions(+), 917 deletions(-)
>

For the series:
Acked-by: Ard Biesheuvel <ardb@xxxxxxxxxx>



[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux