]> git.baikalelectronics.ru Git - kernel.git/commitdiff
crypto: qce - add CRYPTO_ALG_KERN_DRIVER_ONLY flag
authorEneas U de Queiroz <cotequeiroz@gmail.com>
Thu, 19 Sep 2019 21:33:02 +0000 (18:33 -0300)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 4 Oct 2019 15:06:20 +0000 (01:06 +1000)
Set the CRYPTO_ALG_KERN_DRIVER_ONLY flag to all algorithms exposed by
the qce driver, since they are all hardware accelerated, accessible
through a kernel driver only, and not available directly to userspace.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/qce/ablkcipher.c
drivers/crypto/qce/sha.c

index 7a98bf5cc9672ab26e7a3e0048aced98a844febf..f0b59a8bbed0f81d2734d24479a935ffd9303d82 100644 (file)
@@ -380,7 +380,7 @@ static int qce_ablkcipher_register_one(const struct qce_ablkcipher_def *def,
 
        alg->cra_priority = 300;
        alg->cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER | CRYPTO_ALG_ASYNC |
-                        CRYPTO_ALG_NEED_FALLBACK;
+                        CRYPTO_ALG_NEED_FALLBACK | CRYPTO_ALG_KERN_DRIVER_ONLY;
        alg->cra_ctxsize = sizeof(struct qce_cipher_ctx);
        alg->cra_alignmask = 0;
        alg->cra_type = &crypto_ablkcipher_type;
index 0853e74583ade76fc4081c15bf09c9ac8cc92947..95ab16fc8fd6b5180f1833a21e60ba06ced6d665 100644 (file)
@@ -495,7 +495,7 @@ static int qce_ahash_register_one(const struct qce_ahash_def *def,
        base = &alg->halg.base;
        base->cra_blocksize = def->blocksize;
        base->cra_priority = 300;
-       base->cra_flags = CRYPTO_ALG_ASYNC;
+       base->cra_flags = CRYPTO_ALG_ASYNC | CRYPTO_ALG_KERN_DRIVER_ONLY;
        base->cra_ctxsize = sizeof(struct qce_sha_ctx);
        base->cra_alignmask = 0;
        base->cra_module = THIS_MODULE;