linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: Megha Dey <megha.dey@intel.com>
Cc: linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org
Subject: Re: [RFC] crypto: Remove mcryptd
Date: Wed, 8 Aug 2018 17:56:21 +0800	[thread overview]
Message-ID: <20180808095621.h7ecacftx5ofe5ki@gondor.apana.org.au> (raw)
In-Reply-To: <1532651107.19157.24.camel@megha-Z97X-UD7-TH>

On Thu, Jul 26, 2018 at 05:25:07PM -0700, Megha Dey wrote:
> 
> 1. On the existing algorithms covered in aesni_intel-glue.c (eg:
> __cbc-aes-aesni), 3 algorithms are registered in /proc/crypto:
> 
>      __cbc(aes)
>      cryptd(__cbc-aes-aesni)--> registered via cryptd_create_skcipher
> 
>      cbc(aes)
>      cbc-aes-aesni	--> registered via simd_skcipher_create_compat
> 
>      __cbc(aes)
>      __cbc-aes-aesni    --> registered as the internal algorithm
> 
> I would want to know why do we need the cryptd(__cbc-aes-aesni)
> algorithm at all. I do not see any of the associated setkey, encrypt or
> decrypt functions getting called during the selftest or while running
> tcrypt. I just see the simd_(setkey, encrypt, decrypt) functions
> directly called the inner algorithms. However, if I remove the cryptd
> algorithm, none of the algorithms are registered.

The simd functions are the fast path where you are running in a
context where SIMD can be used directly.  cryptd is the slow path
where we defer the work to a work queue.

> > What you need to do is create an actual simd wrapper with cryptd
>  
> This simd wrapper is already present for skcipher right(in simd.c)?
> Assuming we only have ciphers and no hash algorithms, are any changes
> required in these wrappers?

For skcipher yes they already exist.  But this thread was about
hashes.

Cheers,
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

  reply	other threads:[~2018-08-08  9:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-12  1:44 [RFC] crypto: Remove mcryptd Megha Dey
2018-05-31 18:15 ` Megha Dey
2018-07-20  3:53 ` Herbert Xu
2018-07-27  0:25   ` Megha Dey
2018-08-08  9:56     ` Herbert Xu [this message]
2018-08-10  2:40       ` Megha Dey
2018-08-16  6:55         ` Herbert Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180808095621.h7ecacftx5ofe5ki@gondor.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=megha.dey@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).