]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: make all generic algorithms set cra_driver_name
authorEric Biggers <ebiggers@google.com>
Mon, 3 Jun 2019 05:40:57 +0000 (22:40 -0700)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 13 Jun 2019 06:31:39 +0000 (14:31 +0800)
commit689027031ef80642446c74bbf06eb76b5c082999
tree863854e36421d48df925cdd0292fdb9373554901
parent323839af1702018c4dab0c683c72cf2a28d757b1
crypto: make all generic algorithms set cra_driver_name

Most generic crypto algorithms declare a driver name ending in
"-generic".  The rest don't declare a driver name and instead rely on
the crypto API automagically appending "-generic" upon registration.

Having multiple conventions is unnecessarily confusing and makes it
harder to grep for all generic algorithms in the kernel source tree.
But also, allowing NULL driver names is problematic because sometimes
people fail to set it, e.g. the case fixed by commit 8db312253c82
("crypto: cavium/zip - fix collision with generic cra_driver_name").

Of course, people can also incorrectly name their drivers "-generic".
But that's much easier to notice / grep for.

Therefore, let's make cra_driver_name mandatory.  In preparation for
this, this patch makes all generic algorithms set cra_driver_name.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
22 files changed:
crypto/anubis.c
crypto/arc4.c
crypto/crypto_null.c
crypto/deflate.c
crypto/fcrypt.c
crypto/khazad.c
crypto/lz4.c
crypto/lz4hc.c
crypto/lzo-rle.c
crypto/lzo.c
crypto/md4.c
crypto/md5.c
crypto/michael_mic.c
crypto/rmd128.c
crypto/rmd160.c
crypto/rmd256.c
crypto/rmd320.c
crypto/serpent_generic.c
crypto/tea.c
crypto/tgr192.c
crypto/wp512.c
crypto/zstd.c