aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/crypto
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2011-11-01 08:39:56 -0400
committerHerbert Xu <herbert@gondor.apana.org.au>2012-01-13 00:38:40 -0500
commitd912bb7677f46d78a3cde8a4afd45a3fca4b34e9 (patch)
treeca71395d275b4408639f98a421b3ce0e735ee99a /drivers/crypto
parentd0b03c5fe469ed0f3d7d94372c8bf77c64fcfce8 (diff)
crypto: Add CRYPTO_ALG_KERN_DRIVER_ONLY flag
The added CRYPTO_ALG_KERN_DRIVER_ONLY indicates whether a cipher is only available via a kernel driver. If the cipher implementation might be available by using an instruction set or by porting the kernel code, then it must not be set. Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto')
-rw-r--r--drivers/crypto/caam/caamalg.c3
-rw-r--r--drivers/crypto/geode-aes.c6
-rw-r--r--drivers/crypto/hifn_795x.c3
-rw-r--r--drivers/crypto/ixp4xx_crypto.c2
-rw-r--r--drivers/crypto/mv_cesa.c12
-rw-r--r--drivers/crypto/n2_core.c7
-rw-r--r--drivers/crypto/omap-aes.c8
-rw-r--r--drivers/crypto/omap-sham.c4
-rw-r--r--drivers/crypto/picoxcell_crypto.c46
-rw-r--r--drivers/crypto/s5p-sss.c6
-rw-r--r--drivers/crypto/talitos.c1
11 files changed, 73 insertions, 25 deletions
diff --git a/drivers/crypto/caam/caamalg.c b/drivers/crypto/caam/caamalg.c
index e73cf2e8110a..e9acadbb1d34 100644
--- a/drivers/crypto/caam/caamalg.c
+++ b/drivers/crypto/caam/caamalg.c
@@ -2205,7 +2205,8 @@ static struct caam_crypto_alg *caam_alg_alloc(struct device *ctrldev,
2205 alg->cra_blocksize = template->blocksize; 2205 alg->cra_blocksize = template->blocksize;
2206 alg->cra_alignmask = 0; 2206 alg->cra_alignmask = 0;
2207 alg->cra_ctxsize = sizeof(struct caam_ctx); 2207 alg->cra_ctxsize = sizeof(struct caam_ctx);
2208 alg->cra_flags = CRYPTO_ALG_ASYNC | template->type; 2208 alg->cra_flags = CRYPTO_ALG_ASYNC | CRYPTO_ALG_KERN_DRIVER_ONLY |
2209 template->type;
2209 switch (template->type) { 2210 switch (template->type) {
2210 case CRYPTO_ALG_TYPE_ABLKCIPHER: 2211 case CRYPTO_ALG_TYPE_ABLKCIPHER:
2211 alg->cra_type = &crypto_ablkcipher_type; 2212 alg->cra_type = &crypto_ablkcipher_type;
diff --git a/drivers/crypto/geode-aes.c b/drivers/crypto/geode-aes.c
index 219d09cbb0d1..f3e36c86b6c3 100644
--- a/drivers/crypto/geode-aes.c
+++ b/drivers/crypto/geode-aes.c
@@ -393,7 +393,8 @@ static struct crypto_alg geode_cbc_alg = {
393 .cra_driver_name = "cbc-aes-geode", 393 .cra_driver_name = "cbc-aes-geode",
394 .cra_priority = 400, 394 .cra_priority = 400,
395 .cra_flags = CRYPTO_ALG_TYPE_BLKCIPHER | 395 .cra_flags = CRYPTO_ALG_TYPE_BLKCIPHER |
396 CRYPTO_ALG_NEED_FALLBACK, 396 CRYPTO_ALG_KERN_DRIVER_ONLY |
397 CRYPTO_ALG_NEED_FALLBACK,
397 .cra_init = fallback_init_blk, 398 .cra_init = fallback_init_blk,
398 .cra_exit = fallback_exit_blk, 399 .cra_exit = fallback_exit_blk,
399 .cra_blocksize = AES_MIN_BLOCK_SIZE, 400 .cra_blocksize = AES_MIN_BLOCK_SIZE,
@@ -479,7 +480,8 @@ static struct crypto_alg geode_ecb_alg = {
479 .cra_driver_name = "ecb-aes-geode", 480 .cra_driver_name = "ecb-aes-geode",
480 .cra_priority = 400, 481 .cra_priority = 400,
481 .cra_flags = CRYPTO_ALG_TYPE_BLKCIPHER | 482 .cra_flags = CRYPTO_ALG_TYPE_BLKCIPHER |
482 CRYPTO_ALG_NEED_FALLBACK, 483 CRYPTO_ALG_KERN_DRIVER_ONLY |
484 CRYPTO_ALG_NEED_FALLBACK,
483 .cra_init = fallback_init_blk, 485 .cra_init = fallback_init_blk,
484 .cra_exit = fallback_exit_blk, 486 .cra_exit = fallback_exit_blk,
485 .cra_blocksize = AES_MIN_BLOCK_SIZE, 487 .cra_blocksize = AES_MIN_BLOCK_SIZE,
diff --git a/drivers/crypto/hifn_795x.c b/drivers/crypto/hifn_795x.c
index fe765f49de58..6bd9d1768202 100644
--- a/drivers/crypto/hifn_795x.c
+++ b/drivers/crypto/hifn_795x.c
@@ -2494,7 +2494,8 @@ static int hifn_alg_alloc(struct hifn_device *dev, struct hifn_alg_template *t)
2494 t->drv_name, dev->name); 2494 t->drv_name, dev->name);
2495 2495
2496 alg->alg.cra_priority = 300; 2496 alg->alg.cra_priority = 300;
2497 alg->alg.cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER | CRYPTO_ALG_ASYNC; 2497 alg->alg.cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER |
2498 CRYPTO_ALG_KERN_DRIVER_ONLY | CRYPTO_ALG_ASYNC;
2498 alg->alg.cra_blocksize = t->bsize; 2499 alg->alg.cra_blocksize = t->bsize;
2499 alg->alg.cra_ctxsize = sizeof(struct hifn_context); 2500 alg->alg.cra_ctxsize = sizeof(struct hifn_context);
2500 alg->alg.cra_alignmask = 0; 2501 alg->alg.cra_alignmask = 0;
diff --git a/drivers/crypto/ixp4xx_crypto.c b/drivers/crypto/ixp4xx_crypto.c
index 4c20c5bf6058..a82c11af9f48 100644
--- a/drivers/crypto/ixp4xx_crypto.c
+++ b/drivers/crypto/ixp4xx_crypto.c
@@ -1449,6 +1449,7 @@ static int __init ixp_module_init(void)
1449 /* block ciphers */ 1449 /* block ciphers */
1450 cra->cra_type = &crypto_ablkcipher_type; 1450 cra->cra_type = &crypto_ablkcipher_type;
1451 cra->cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER | 1451 cra->cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER |
1452 CRYPTO_ALG_KERN_DRIVER_ONLY |
1452 CRYPTO_ALG_ASYNC; 1453 CRYPTO_ALG_ASYNC;
1453 if (!cra->cra_ablkcipher.setkey) 1454 if (!cra->cra_ablkcipher.setkey)
1454 cra->cra_ablkcipher.setkey = ablk_setkey; 1455 cra->cra_ablkcipher.setkey = ablk_setkey;
@@ -1461,6 +1462,7 @@ static int __init ixp_module_init(void)
1461 /* authenc */ 1462 /* authenc */
1462 cra->cra_type = &crypto_aead_type; 1463 cra->cra_type = &crypto_aead_type;
1463 cra->cra_flags = CRYPTO_ALG_TYPE_AEAD | 1464 cra->cra_flags = CRYPTO_ALG_TYPE_AEAD |
1465 CRYPTO_ALG_KERN_DRIVER_ONLY |
1464 CRYPTO_ALG_ASYNC; 1466 CRYPTO_ALG_ASYNC;
1465 cra->cra_aead.setkey = aead_setkey; 1467 cra->cra_aead.setkey = aead_setkey;
1466 cra->cra_aead.setauthsize = aead_setauthsize; 1468 cra->cra_aead.setauthsize = aead_setauthsize;
diff --git a/drivers/crypto/mv_cesa.c b/drivers/crypto/mv_cesa.c
index 597235a2f8f9..8ad2883505a5 100644
--- a/drivers/crypto/mv_cesa.c
+++ b/drivers/crypto/mv_cesa.c
@@ -898,7 +898,8 @@ struct crypto_alg mv_aes_alg_ecb = {
898 .cra_name = "ecb(aes)", 898 .cra_name = "ecb(aes)",
899 .cra_driver_name = "mv-ecb-aes", 899 .cra_driver_name = "mv-ecb-aes",
900 .cra_priority = 300, 900 .cra_priority = 300,
901 .cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER | CRYPTO_ALG_ASYNC, 901 .cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER |
902 CRYPTO_ALG_KERN_DRIVER_ONLY | CRYPTO_ALG_ASYNC,
902 .cra_blocksize = 16, 903 .cra_blocksize = 16,
903 .cra_ctxsize = sizeof(struct mv_ctx), 904 .cra_ctxsize = sizeof(struct mv_ctx),
904 .cra_alignmask = 0, 905 .cra_alignmask = 0,
@@ -920,7 +921,8 @@ struct crypto_alg mv_aes_alg_cbc = {
920 .cra_name = "cbc(aes)", 921 .cra_name = "cbc(aes)",
921 .cra_driver_name = "mv-cbc-aes", 922 .cra_driver_name = "mv-cbc-aes",
922 .cra_priority = 300, 923 .cra_priority = 300,
923 .cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER | CRYPTO_ALG_ASYNC, 924 .cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER |
925 CRYPTO_ALG_KERN_DRIVER_ONLY | CRYPTO_ALG_ASYNC,
924 .cra_blocksize = AES_BLOCK_SIZE, 926 .cra_blocksize = AES_BLOCK_SIZE,
925 .cra_ctxsize = sizeof(struct mv_ctx), 927 .cra_ctxsize = sizeof(struct mv_ctx),
926 .cra_alignmask = 0, 928 .cra_alignmask = 0,
@@ -952,7 +954,8 @@ struct ahash_alg mv_sha1_alg = {
952 .cra_driver_name = "mv-sha1", 954 .cra_driver_name = "mv-sha1",
953 .cra_priority = 300, 955 .cra_priority = 300,
954 .cra_flags = 956 .cra_flags =
955 CRYPTO_ALG_ASYNC | CRYPTO_ALG_NEED_FALLBACK, 957 CRYPTO_ALG_ASYNC | CRYPTO_ALG_KERN_DRIVER_ONLY |
958 CRYPTO_ALG_NEED_FALLBACK,
956 .cra_blocksize = SHA1_BLOCK_SIZE, 959 .cra_blocksize = SHA1_BLOCK_SIZE,
957 .cra_ctxsize = sizeof(struct mv_tfm_hash_ctx), 960 .cra_ctxsize = sizeof(struct mv_tfm_hash_ctx),
958 .cra_init = mv_cra_hash_sha1_init, 961 .cra_init = mv_cra_hash_sha1_init,
@@ -976,7 +979,8 @@ struct ahash_alg mv_hmac_sha1_alg = {
976 .cra_driver_name = "mv-hmac-sha1", 979 .cra_driver_name = "mv-hmac-sha1",
977 .cra_priority = 300, 980 .cra_priority = 300,
978 .cra_flags = 981 .cra_flags =
979 CRYPTO_ALG_ASYNC | CRYPTO_ALG_NEED_FALLBACK, 982 CRYPTO_ALG_ASYNC | CRYPTO_ALG_KERN_DRIVER_ONLY |
983 CRYPTO_ALG_NEED_FALLBACK,
980 .cra_blocksize = SHA1_BLOCK_SIZE, 984 .cra_blocksize = SHA1_BLOCK_SIZE,
981 .cra_ctxsize = sizeof(struct mv_tfm_hash_ctx), 985 .cra_ctxsize = sizeof(struct mv_tfm_hash_ctx),
982 .cra_init = mv_cra_hash_hmac_sha1_init, 986 .cra_init = mv_cra_hash_hmac_sha1_init,
diff --git a/drivers/crypto/n2_core.c b/drivers/crypto/n2_core.c
index 8944dabc0e3c..67b97c5fd859 100644
--- a/drivers/crypto/n2_core.c
+++ b/drivers/crypto/n2_core.c
@@ -1402,7 +1402,8 @@ static int __devinit __n2_register_one_cipher(const struct n2_cipher_tmpl *tmpl)
1402 snprintf(alg->cra_name, CRYPTO_MAX_ALG_NAME, "%s", tmpl->name); 1402 snprintf(alg->cra_name, CRYPTO_MAX_ALG_NAME, "%s", tmpl->name);
1403 snprintf(alg->cra_driver_name, CRYPTO_MAX_ALG_NAME, "%s-n2", tmpl->drv_name); 1403 snprintf(alg->cra_driver_name, CRYPTO_MAX_ALG_NAME, "%s-n2", tmpl->drv_name);
1404 alg->cra_priority = N2_CRA_PRIORITY; 1404 alg->cra_priority = N2_CRA_PRIORITY;
1405 alg->cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER | CRYPTO_ALG_ASYNC; 1405 alg->cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER |
1406 CRYPTO_ALG_KERN_DRIVER_ONLY | CRYPTO_ALG_ASYNC;
1406 alg->cra_blocksize = tmpl->block_size; 1407 alg->cra_blocksize = tmpl->block_size;
1407 p->enc_type = tmpl->enc_type; 1408 p->enc_type = tmpl->enc_type;
1408 alg->cra_ctxsize = sizeof(struct n2_cipher_context); 1409 alg->cra_ctxsize = sizeof(struct n2_cipher_context);
@@ -1493,7 +1494,9 @@ static int __devinit __n2_register_one_ahash(const struct n2_hash_tmpl *tmpl)
1493 snprintf(base->cra_name, CRYPTO_MAX_ALG_NAME, "%s", tmpl->name); 1494 snprintf(base->cra_name, CRYPTO_MAX_ALG_NAME, "%s", tmpl->name);
1494 snprintf(base->cra_driver_name, CRYPTO_MAX_ALG_NAME, "%s-n2", tmpl->name); 1495 snprintf(base->cra_driver_name, CRYPTO_MAX_ALG_NAME, "%s-n2", tmpl->name);
1495 base->cra_priority = N2_CRA_PRIORITY; 1496 base->cra_priority = N2_CRA_PRIORITY;
1496 base->cra_flags = CRYPTO_ALG_TYPE_AHASH | CRYPTO_ALG_NEED_FALLBACK; 1497 base->cra_flags = CRYPTO_ALG_TYPE_AHASH |
1498 CRYPTO_ALG_KERN_DRIVER_ONLY |
1499 CRYPTO_ALG_NEED_FALLBACK;
1497 base->cra_blocksize = tmpl->block_size; 1500 base->cra_blocksize = tmpl->block_size;
1498 base->cra_ctxsize = sizeof(struct n2_hash_ctx); 1501 base->cra_ctxsize = sizeof(struct n2_hash_ctx);
1499 base->cra_module = THIS_MODULE; 1502 base->cra_module = THIS_MODULE;
diff --git a/drivers/crypto/omap-aes.c b/drivers/crypto/omap-aes.c
index 5b970d9e9956..63e57b57a12c 100644
--- a/drivers/crypto/omap-aes.c
+++ b/drivers/crypto/omap-aes.c
@@ -756,7 +756,9 @@ static struct crypto_alg algs[] = {
756 .cra_name = "ecb(aes)", 756 .cra_name = "ecb(aes)",
757 .cra_driver_name = "ecb-aes-omap", 757 .cra_driver_name = "ecb-aes-omap",
758 .cra_priority = 100, 758 .cra_priority = 100,
759 .cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER | CRYPTO_ALG_ASYNC, 759 .cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER |
760 CRYPTO_ALG_KERN_DRIVER_ONLY |
761 CRYPTO_ALG_ASYNC,
760 .cra_blocksize = AES_BLOCK_SIZE, 762 .cra_blocksize = AES_BLOCK_SIZE,
761 .cra_ctxsize = sizeof(struct omap_aes_ctx), 763 .cra_ctxsize = sizeof(struct omap_aes_ctx),
762 .cra_alignmask = 0, 764 .cra_alignmask = 0,
@@ -776,7 +778,9 @@ static struct crypto_alg algs[] = {
776 .cra_name = "cbc(aes)", 778 .cra_name = "cbc(aes)",
777 .cra_driver_name = "cbc-aes-omap", 779 .cra_driver_name = "cbc-aes-omap",
778 .cra_priority = 100, 780 .cra_priority = 100,
779 .cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER | CRYPTO_ALG_ASYNC, 781 .cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER |
782 CRYPTO_ALG_KERN_DRIVER_ONLY |
783 CRYPTO_ALG_ASYNC,
780 .cra_blocksize = AES_BLOCK_SIZE, 784 .cra_blocksize = AES_BLOCK_SIZE,
781 .cra_ctxsize = sizeof(struct omap_aes_ctx), 785 .cra_ctxsize = sizeof(struct omap_aes_ctx),
782 .cra_alignmask = 0, 786 .cra_alignmask = 0,
diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c
index 6399a8f1938a..a3fd6fc504b1 100644
--- a/drivers/crypto/omap-sham.c
+++ b/drivers/crypto/omap-sham.c
@@ -953,6 +953,7 @@ static struct ahash_alg algs[] = {
953 .cra_driver_name = "omap-sha1", 953 .cra_driver_name = "omap-sha1",
954 .cra_priority = 100, 954 .cra_priority = 100,
955 .cra_flags = CRYPTO_ALG_TYPE_AHASH | 955 .cra_flags = CRYPTO_ALG_TYPE_AHASH |
956 CRYPTO_ALG_KERN_DRIVER_ONLY |
956 CRYPTO_ALG_ASYNC | 957 CRYPTO_ALG_ASYNC |
957 CRYPTO_ALG_NEED_FALLBACK, 958 CRYPTO_ALG_NEED_FALLBACK,
958 .cra_blocksize = SHA1_BLOCK_SIZE, 959 .cra_blocksize = SHA1_BLOCK_SIZE,
@@ -975,6 +976,7 @@ static struct ahash_alg algs[] = {
975 .cra_driver_name = "omap-md5", 976 .cra_driver_name = "omap-md5",
976 .cra_priority = 100, 977 .cra_priority = 100,
977 .cra_flags = CRYPTO_ALG_TYPE_AHASH | 978 .cra_flags = CRYPTO_ALG_TYPE_AHASH |
979 CRYPTO_ALG_KERN_DRIVER_ONLY |
978 CRYPTO_ALG_ASYNC | 980 CRYPTO_ALG_ASYNC |
979 CRYPTO_ALG_NEED_FALLBACK, 981 CRYPTO_ALG_NEED_FALLBACK,
980 .cra_blocksize = SHA1_BLOCK_SIZE, 982 .cra_blocksize = SHA1_BLOCK_SIZE,
@@ -998,6 +1000,7 @@ static struct ahash_alg algs[] = {
998 .cra_driver_name = "omap-hmac-sha1", 1000 .cra_driver_name = "omap-hmac-sha1",
999 .cra_priority = 100, 1001 .cra_priority = 100,
1000 .cra_flags = CRYPTO_ALG_TYPE_AHASH | 1002 .cra_flags = CRYPTO_ALG_TYPE_AHASH |
1003 CRYPTO_ALG_KERN_DRIVER_ONLY |
1001 CRYPTO_ALG_ASYNC | 1004 CRYPTO_ALG_ASYNC |
1002 CRYPTO_ALG_NEED_FALLBACK, 1005 CRYPTO_ALG_NEED_FALLBACK,
1003 .cra_blocksize = SHA1_BLOCK_SIZE, 1006 .cra_blocksize = SHA1_BLOCK_SIZE,
@@ -1022,6 +1025,7 @@ static struct ahash_alg algs[] = {
1022 .cra_driver_name = "omap-hmac-md5", 1025 .cra_driver_name = "omap-hmac-md5",
1023 .cra_priority = 100, 1026 .cra_priority = 100,
1024 .cra_flags = CRYPTO_ALG_TYPE_AHASH | 1027 .cra_flags = CRYPTO_ALG_TYPE_AHASH |
1028 CRYPTO_ALG_KERN_DRIVER_ONLY |
1025 CRYPTO_ALG_ASYNC | 1029 CRYPTO_ALG_ASYNC |
1026 CRYPTO_ALG_NEED_FALLBACK, 1030 CRYPTO_ALG_NEED_FALLBACK,
1027 .cra_blocksize = SHA1_BLOCK_SIZE, 1031 .cra_blocksize = SHA1_BLOCK_SIZE,
diff --git a/drivers/crypto/picoxcell_crypto.c b/drivers/crypto/picoxcell_crypto.c
index 58480d009324..410a03c01ca4 100644
--- a/drivers/crypto/picoxcell_crypto.c
+++ b/drivers/crypto/picoxcell_crypto.c
@@ -1322,6 +1322,7 @@ static struct spacc_alg ipsec_engine_algs[] = {
1322 .cra_driver_name = "cbc-aes-picoxcell", 1322 .cra_driver_name = "cbc-aes-picoxcell",
1323 .cra_priority = SPACC_CRYPTO_ALG_PRIORITY, 1323 .cra_priority = SPACC_CRYPTO_ALG_PRIORITY,
1324 .cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER | 1324 .cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER |
1325 CRYPTO_ALG_KERN_DRIVER_ONLY |
1325 CRYPTO_ALG_ASYNC | 1326 CRYPTO_ALG_ASYNC |
1326 CRYPTO_ALG_NEED_FALLBACK, 1327 CRYPTO_ALG_NEED_FALLBACK,
1327 .cra_blocksize = AES_BLOCK_SIZE, 1328 .cra_blocksize = AES_BLOCK_SIZE,
@@ -1349,6 +1350,7 @@ static struct spacc_alg ipsec_engine_algs[] = {
1349 .cra_driver_name = "ecb-aes-picoxcell", 1350 .cra_driver_name = "ecb-aes-picoxcell",
1350 .cra_priority = SPACC_CRYPTO_ALG_PRIORITY, 1351 .cra_priority = SPACC_CRYPTO_ALG_PRIORITY,
1351 .cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER | 1352 .cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER |
1353 CRYPTO_ALG_KERN_DRIVER_ONLY |
1352 CRYPTO_ALG_ASYNC | CRYPTO_ALG_NEED_FALLBACK, 1354 CRYPTO_ALG_ASYNC | CRYPTO_ALG_NEED_FALLBACK,
1353 .cra_blocksize = AES_BLOCK_SIZE, 1355 .cra_blocksize = AES_BLOCK_SIZE,
1354 .cra_ctxsize = sizeof(struct spacc_ablk_ctx), 1356 .cra_ctxsize = sizeof(struct spacc_ablk_ctx),
@@ -1373,7 +1375,9 @@ static struct spacc_alg ipsec_engine_algs[] = {
1373 .cra_name = "cbc(des)", 1375 .cra_name = "cbc(des)",
1374 .cra_driver_name = "cbc-des-picoxcell", 1376 .cra_driver_name = "cbc-des-picoxcell",
1375 .cra_priority = SPACC_CRYPTO_ALG_PRIORITY, 1377 .cra_priority = SPACC_CRYPTO_ALG_PRIORITY,
1376 .cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER | CRYPTO_ALG_ASYNC, 1378 .cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER |
1379 CRYPTO_ALG_ASYNC |
1380 CRYPTO_ALG_KERN_DRIVER_ONLY,
1377 .cra_blocksize = DES_BLOCK_SIZE, 1381 .cra_blocksize = DES_BLOCK_SIZE,
1378 .cra_ctxsize = sizeof(struct spacc_ablk_ctx), 1382 .cra_ctxsize = sizeof(struct spacc_ablk_ctx),
1379 .cra_type = &crypto_ablkcipher_type, 1383 .cra_type = &crypto_ablkcipher_type,
@@ -1398,7 +1402,9 @@ static struct spacc_alg ipsec_engine_algs[] = {
1398 .cra_name = "ecb(des)", 1402 .cra_name = "ecb(des)",
1399 .cra_driver_name = "ecb-des-picoxcell", 1403 .cra_driver_name = "ecb-des-picoxcell",
1400 .cra_priority = SPACC_CRYPTO_ALG_PRIORITY, 1404 .cra_priority = SPACC_CRYPTO_ALG_PRIORITY,
1401 .cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER | CRYPTO_ALG_ASYNC, 1405 .cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER |
1406 CRYPTO_ALG_ASYNC |
1407 CRYPTO_ALG_KERN_DRIVER_ONLY,
1402 .cra_blocksize = DES_BLOCK_SIZE, 1408 .cra_blocksize = DES_BLOCK_SIZE,
1403 .cra_ctxsize = sizeof(struct spacc_ablk_ctx), 1409 .cra_ctxsize = sizeof(struct spacc_ablk_ctx),
1404 .cra_type = &crypto_ablkcipher_type, 1410 .cra_type = &crypto_ablkcipher_type,
@@ -1422,7 +1428,9 @@ static struct spacc_alg ipsec_engine_algs[] = {
1422 .cra_name = "cbc(des3_ede)", 1428 .cra_name = "cbc(des3_ede)",
1423 .cra_driver_name = "cbc-des3-ede-picoxcell", 1429 .cra_driver_name = "cbc-des3-ede-picoxcell",
1424 .cra_priority = SPACC_CRYPTO_ALG_PRIORITY, 1430 .cra_priority = SPACC_CRYPTO_ALG_PRIORITY,
1425 .cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER | CRYPTO_ALG_ASYNC, 1431 .cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER |
1432 CRYPTO_ALG_ASYNC |
1433 CRYPTO_ALG_KERN_DRIVER_ONLY,
1426 .cra_blocksize = DES3_EDE_BLOCK_SIZE, 1434 .cra_blocksize = DES3_EDE_BLOCK_SIZE,
1427 .cra_ctxsize = sizeof(struct spacc_ablk_ctx), 1435 .cra_ctxsize = sizeof(struct spacc_ablk_ctx),
1428 .cra_type = &crypto_ablkcipher_type, 1436 .cra_type = &crypto_ablkcipher_type,
@@ -1447,7 +1455,9 @@ static struct spacc_alg ipsec_engine_algs[] = {
1447 .cra_name = "ecb(des3_ede)", 1455 .cra_name = "ecb(des3_ede)",
1448 .cra_driver_name = "ecb-des3-ede-picoxcell", 1456 .cra_driver_name = "ecb-des3-ede-picoxcell",
1449 .cra_priority = SPACC_CRYPTO_ALG_PRIORITY, 1457 .cra_priority = SPACC_CRYPTO_ALG_PRIORITY,
1450 .cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER | CRYPTO_ALG_ASYNC, 1458 .cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER |
1459 CRYPTO_ALG_ASYNC |
1460 CRYPTO_ALG_KERN_DRIVER_ONLY,
1451 .cra_blocksize = DES3_EDE_BLOCK_SIZE, 1461 .cra_blocksize = DES3_EDE_BLOCK_SIZE,
1452 .cra_ctxsize = sizeof(struct spacc_ablk_ctx), 1462 .cra_ctxsize = sizeof(struct spacc_ablk_ctx),
1453 .cra_type = &crypto_ablkcipher_type, 1463 .cra_type = &crypto_ablkcipher_type,
@@ -1472,7 +1482,9 @@ static struct spacc_alg ipsec_engine_algs[] = {
1472 .cra_name = "authenc(hmac(sha1),cbc(aes))", 1482 .cra_name = "authenc(hmac(sha1),cbc(aes))",
1473 .cra_driver_name = "authenc-hmac-sha1-cbc-aes-picoxcell", 1483 .cra_driver_name = "authenc-hmac-sha1-cbc-aes-picoxcell",
1474 .cra_priority = SPACC_CRYPTO_ALG_PRIORITY, 1484 .cra_priority = SPACC_CRYPTO_ALG_PRIORITY,
1475 .cra_flags = CRYPTO_ALG_TYPE_AEAD | CRYPTO_ALG_ASYNC, 1485 .cra_flags = CRYPTO_ALG_TYPE_AEAD |
1486 CRYPTO_ALG_ASYNC |
1487 CRYPTO_ALG_KERN_DRIVER_ONLY,
1476 .cra_blocksize = AES_BLOCK_SIZE, 1488 .cra_blocksize = AES_BLOCK_SIZE,
1477 .cra_ctxsize = sizeof(struct spacc_aead_ctx), 1489 .cra_ctxsize = sizeof(struct spacc_aead_ctx),
1478 .cra_type = &crypto_aead_type, 1490 .cra_type = &crypto_aead_type,
@@ -1500,7 +1512,9 @@ static struct spacc_alg ipsec_engine_algs[] = {
1500 .cra_name = "authenc(hmac(sha256),cbc(aes))", 1512 .cra_name = "authenc(hmac(sha256),cbc(aes))",
1501 .cra_driver_name = "authenc-hmac-sha256-cbc-aes-picoxcell", 1513 .cra_driver_name = "authenc-hmac-sha256-cbc-aes-picoxcell",
1502 .cra_priority = SPACC_CRYPTO_ALG_PRIORITY, 1514 .cra_priority = SPACC_CRYPTO_ALG_PRIORITY,
1503 .cra_flags = CRYPTO_ALG_TYPE_AEAD | CRYPTO_ALG_ASYNC, 1515 .cra_flags = CRYPTO_ALG_TYPE_AEAD |
1516 CRYPTO_ALG_ASYNC |
1517 CRYPTO_ALG_KERN_DRIVER_ONLY,
1504 .cra_blocksize = AES_BLOCK_SIZE, 1518 .cra_blocksize = AES_BLOCK_SIZE,
1505 .cra_ctxsize = sizeof(struct spacc_aead_ctx), 1519 .cra_ctxsize = sizeof(struct spacc_aead_ctx),
1506 .cra_type = &crypto_aead_type, 1520 .cra_type = &crypto_aead_type,
@@ -1527,7 +1541,9 @@ static struct spacc_alg ipsec_engine_algs[] = {
1527 .cra_name = "authenc(hmac(md5),cbc(aes))", 1541 .cra_name = "authenc(hmac(md5),cbc(aes))",
1528 .cra_driver_name = "authenc-hmac-md5-cbc-aes-picoxcell", 1542 .cra_driver_name = "authenc-hmac-md5-cbc-aes-picoxcell",
1529 .cra_priority = SPACC_CRYPTO_ALG_PRIORITY, 1543 .cra_priority = SPACC_CRYPTO_ALG_PRIORITY,
1530 .cra_flags = CRYPTO_ALG_TYPE_AEAD | CRYPTO_ALG_ASYNC, 1544 .cra_flags = CRYPTO_ALG_TYPE_AEAD |
1545 CRYPTO_ALG_ASYNC |
1546 CRYPTO_ALG_KERN_DRIVER_ONLY,
1531 .cra_blocksize = AES_BLOCK_SIZE, 1547 .cra_blocksize = AES_BLOCK_SIZE,
1532 .cra_ctxsize = sizeof(struct spacc_aead_ctx), 1548 .cra_ctxsize = sizeof(struct spacc_aead_ctx),
1533 .cra_type = &crypto_aead_type, 1549 .cra_type = &crypto_aead_type,
@@ -1554,7 +1570,9 @@ static struct spacc_alg ipsec_engine_algs[] = {
1554 .cra_name = "authenc(hmac(sha1),cbc(des3_ede))", 1570 .cra_name = "authenc(hmac(sha1),cbc(des3_ede))",
1555 .cra_driver_name = "authenc-hmac-sha1-cbc-3des-picoxcell", 1571 .cra_driver_name = "authenc-hmac-sha1-cbc-3des-picoxcell",
1556 .cra_priority = SPACC_CRYPTO_ALG_PRIORITY, 1572 .cra_priority = SPACC_CRYPTO_ALG_PRIORITY,
1557 .cra_flags = CRYPTO_ALG_TYPE_AEAD | CRYPTO_ALG_ASYNC, 1573 .cra_flags = CRYPTO_ALG_TYPE_AEAD |
1574 CRYPTO_ALG_ASYNC |
1575 CRYPTO_ALG_KERN_DRIVER_ONLY,
1558 .cra_blocksize = DES3_EDE_BLOCK_SIZE, 1576 .cra_blocksize = DES3_EDE_BLOCK_SIZE,
1559 .cra_ctxsize = sizeof(struct spacc_aead_ctx), 1577 .cra_ctxsize = sizeof(struct spacc_aead_ctx),
1560 .cra_type = &crypto_aead_type, 1578 .cra_type = &crypto_aead_type,
@@ -1582,7 +1600,9 @@ static struct spacc_alg ipsec_engine_algs[] = {
1582 .cra_name = "authenc(hmac(sha256),cbc(des3_ede))", 1600 .cra_name = "authenc(hmac(sha256),cbc(des3_ede))",
1583 .cra_driver_name = "authenc-hmac-sha256-cbc-3des-picoxcell", 1601 .cra_driver_name = "authenc-hmac-sha256-cbc-3des-picoxcell",
1584 .cra_priority = SPACC_CRYPTO_ALG_PRIORITY, 1602 .cra_priority = SPACC_CRYPTO_ALG_PRIORITY,
1585 .cra_flags = CRYPTO_ALG_TYPE_AEAD | CRYPTO_ALG_ASYNC, 1603 .cra_flags = CRYPTO_ALG_TYPE_AEAD |
1604 CRYPTO_ALG_ASYNC |
1605 CRYPTO_ALG_KERN_DRIVER_ONLY,
1586 .cra_blocksize = DES3_EDE_BLOCK_SIZE, 1606 .cra_blocksize = DES3_EDE_BLOCK_SIZE,
1587 .cra_ctxsize = sizeof(struct spacc_aead_ctx), 1607 .cra_ctxsize = sizeof(struct spacc_aead_ctx),
1588 .cra_type = &crypto_aead_type, 1608 .cra_type = &crypto_aead_type,
@@ -1609,7 +1629,9 @@ static struct spacc_alg ipsec_engine_algs[] = {
1609 .cra_name = "authenc(hmac(md5),cbc(des3_ede))", 1629 .cra_name = "authenc(hmac(md5),cbc(des3_ede))",
1610 .cra_driver_name = "authenc-hmac-md5-cbc-3des-picoxcell", 1630 .cra_driver_name = "authenc-hmac-md5-cbc-3des-picoxcell",
1611 .cra_priority = SPACC_CRYPTO_ALG_PRIORITY, 1631 .cra_priority = SPACC_CRYPTO_ALG_PRIORITY,
1612 .cra_flags = CRYPTO_ALG_TYPE_AEAD | CRYPTO_ALG_ASYNC, 1632 .cra_flags = CRYPTO_ALG_TYPE_AEAD |
1633 CRYPTO_ALG_ASYNC |
1634 CRYPTO_ALG_KERN_DRIVER_ONLY,
1613 .cra_blocksize = DES3_EDE_BLOCK_SIZE, 1635 .cra_blocksize = DES3_EDE_BLOCK_SIZE,
1614 .cra_ctxsize = sizeof(struct spacc_aead_ctx), 1636 .cra_ctxsize = sizeof(struct spacc_aead_ctx),
1615 .cra_type = &crypto_aead_type, 1637 .cra_type = &crypto_aead_type,
@@ -1639,7 +1661,9 @@ static struct spacc_alg l2_engine_algs[] = {
1639 .cra_name = "f8(kasumi)", 1661 .cra_name = "f8(kasumi)",
1640 .cra_driver_name = "f8-kasumi-picoxcell", 1662 .cra_driver_name = "f8-kasumi-picoxcell",
1641 .cra_priority = SPACC_CRYPTO_ALG_PRIORITY, 1663 .cra_priority = SPACC_CRYPTO_ALG_PRIORITY,
1642 .cra_flags = CRYPTO_ALG_TYPE_GIVCIPHER | CRYPTO_ALG_ASYNC, 1664 .cra_flags = CRYPTO_ALG_TYPE_GIVCIPHER |
1665 CRYPTO_ALG_ASYNC |
1666 CRYPTO_ALG_KERN_DRIVER_ONLY,
1643 .cra_blocksize = 8, 1667 .cra_blocksize = 8,
1644 .cra_ctxsize = sizeof(struct spacc_ablk_ctx), 1668 .cra_ctxsize = sizeof(struct spacc_ablk_ctx),
1645 .cra_type = &crypto_ablkcipher_type, 1669 .cra_type = &crypto_ablkcipher_type,
diff --git a/drivers/crypto/s5p-sss.c b/drivers/crypto/s5p-sss.c
index 3376bca200fc..bc986f806086 100644
--- a/drivers/crypto/s5p-sss.c
+++ b/drivers/crypto/s5p-sss.c
@@ -518,7 +518,8 @@ static struct crypto_alg algs[] = {
518 .cra_driver_name = "ecb-aes-s5p", 518 .cra_driver_name = "ecb-aes-s5p",
519 .cra_priority = 100, 519 .cra_priority = 100,
520 .cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER | 520 .cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER |
521 CRYPTO_ALG_ASYNC, 521 CRYPTO_ALG_ASYNC |
522 CRYPTO_ALG_KERN_DRIVER_ONLY,
522 .cra_blocksize = AES_BLOCK_SIZE, 523 .cra_blocksize = AES_BLOCK_SIZE,
523 .cra_ctxsize = sizeof(struct s5p_aes_ctx), 524 .cra_ctxsize = sizeof(struct s5p_aes_ctx),
524 .cra_alignmask = 0x0f, 525 .cra_alignmask = 0x0f,
@@ -538,7 +539,8 @@ static struct crypto_alg algs[] = {
538 .cra_driver_name = "cbc-aes-s5p", 539 .cra_driver_name = "cbc-aes-s5p",
539 .cra_priority = 100, 540 .cra_priority = 100,
540 .cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER | 541 .cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER |
541 CRYPTO_ALG_ASYNC, 542 CRYPTO_ALG_ASYNC |
543 CRYPTO_ALG_KERN_DRIVER_ONLY,
542 .cra_blocksize = AES_BLOCK_SIZE, 544 .cra_blocksize = AES_BLOCK_SIZE,
543 .cra_ctxsize = sizeof(struct s5p_aes_ctx), 545 .cra_ctxsize = sizeof(struct s5p_aes_ctx),
544 .cra_alignmask = 0x0f, 546 .cra_alignmask = 0x0f,
diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c
index 2d8c78901686..dc641c796526 100644
--- a/drivers/crypto/talitos.c
+++ b/drivers/crypto/talitos.c
@@ -2648,6 +2648,7 @@ static struct talitos_crypto_alg *talitos_alg_alloc(struct device *dev,
2648 alg->cra_priority = TALITOS_CRA_PRIORITY; 2648 alg->cra_priority = TALITOS_CRA_PRIORITY;
2649 alg->cra_alignmask = 0; 2649 alg->cra_alignmask = 0;
2650 alg->cra_ctxsize = sizeof(struct talitos_ctx); 2650 alg->cra_ctxsize = sizeof(struct talitos_ctx);
2651 alg->cra_flags |= CRYPTO_ALG_KERN_DRIVER_ONLY;
2651 2652
2652 t_alg->dev = dev; 2653 t_alg->dev = dev;
2653 2654