Hi Herbert, we should be able to autoload modules via their cra_driver_name, not only by the module name. I added a few MODULE_ALIAS()es, for now only for aes.ko which sets its driver-name and for SHA1/256 modules that I need as fallbacks for padlock-sha.
Should I resend this patch with all soft-crypto algos having the -generic module alias? Michal
Crypto modules should be loadable by their .cra_driver_name, so we should make MODULE_ALIAS()es with these names. Signed-off-by: Michal Ludvig <[EMAIL PROTECTED]> Index: linux/crypto/aes.c =================================================================== --- linux.orig/crypto/aes.c +++ linux/crypto/aes.c @@ -453,3 +453,4 @@ module_exit(aes_fini); MODULE_DESCRIPTION("Rijndael (AES) Cipher Algorithm"); MODULE_LICENSE("Dual BSD/GPL"); +MODULE_ALIAS("aes-generic"); Index: linux/crypto/sha1.c =================================================================== --- linux.orig/crypto/sha1.c +++ linux/crypto/sha1.c @@ -109,6 +109,7 @@ static void sha1_final(struct crypto_tfm static struct crypto_alg alg = { .cra_name = "sha1", + .cra_driver_name= "sha1-generic", .cra_flags = CRYPTO_ALG_TYPE_DIGEST, .cra_blocksize = SHA1_HMAC_BLOCK_SIZE, .cra_ctxsize = sizeof(struct sha1_ctx), @@ -137,3 +138,5 @@ module_exit(fini); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("SHA1 Secure Hash Algorithm"); + +MODULE_ALIAS("sha1-generic"); Index: linux/crypto/sha256.c =================================================================== --- linux.orig/crypto/sha256.c +++ linux/crypto/sha256.c @@ -309,6 +309,7 @@ static void sha256_final(struct crypto_t static struct crypto_alg alg = { .cra_name = "sha256", + .cra_driver_name= "sha256-generic", .cra_flags = CRYPTO_ALG_TYPE_DIGEST, .cra_blocksize = SHA256_HMAC_BLOCK_SIZE, .cra_ctxsize = sizeof(struct sha256_ctx), @@ -337,3 +338,5 @@ module_exit(fini); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("SHA256 Secure Hash Algorithm"); + +MODULE_ALIAS("sha256-generic");