Linux cryptographic layer development
 help / color / mirror / Atom feed
From: Josh Boyer <jwboyer@redhat.com>
To: Herbert Xu <herbert@gondor.hengli.com.au>
Cc: linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] crypto: aesni-intel - Add ivsize to ablk_ecb_alg
Date: Fri, 19 Aug 2011 08:15:16 -0400	[thread overview]
Message-ID: <20110819121516.GA2270@zod.bos.redhat.com> (raw)
In-Reply-To: <20110819081207.GA3954@gondor.apana.org.au>

On Fri, Aug 19, 2011 at 04:12:08PM +0800, Herbert Xu wrote:
> On Fri, Aug 19, 2011 at 03:32:24PM +0800, Herbert Xu wrote:
> > 
> > Meanwhile I'll make a patch that ensures cryptd is registered
> > before aesni.
> 
> Please try this patch.  Thanks!

This worked great.  I'm confused why adding ivsize to the ablk_ecb_alg
"worked" as well, but looking at the traces again I agree this seems
like the actual problem.

Thanks!

> commit 9d4c522a113f6caa8b792ae829a25490fa87b1a2
> Author: Herbert Xu <herbert@gondor.apana.org.au>
> Date:   Fri Aug 19 16:11:23 2011 +0800
> 
>     crypto: cryptd - Use subsys_initcall to prevent races with aesni
>     
>     As cryptd is depeneded on by other algorithms such as aesni-intel,
>     it needs to be registered before them.  When everything is built
>     as modules, this occurs naturally.  However, for this to work when
>     they are built-in, we need to use subsys_initcall in cryptd.
>     
>     Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

Tested-by: Josh Boyer <jwboyer@redhat.com>

> diff --git a/crypto/cryptd.c b/crypto/cryptd.c
> index e46d21a..671d4d6 100644
> --- a/crypto/cryptd.c
> +++ b/crypto/cryptd.c
> @@ -945,7 +945,7 @@ static void __exit cryptd_exit(void)
>  	crypto_unregister_template(&cryptd_tmpl);
>  }
>  
> -module_init(cryptd_init);
> +subsys_initcall(cryptd_init);
>  module_exit(cryptd_exit);
>  
>  MODULE_LICENSE("GPL");
> -- 
> 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:[~2011-08-19 12:15 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-11 16:40 [PATCH] crypto: aesni-intel - Add ivsize to ablk_ecb_alg Josh Boyer
2011-08-15  7:15 ` Herbert Xu
2011-08-15 11:50   ` Josh Boyer
2011-08-16 12:32     ` Herbert Xu
2011-08-18 17:44       ` Josh Boyer
2011-08-19  0:02         ` Herbert Xu
2011-08-19  2:15           ` Josh Boyer
2011-08-19  7:32             ` Herbert Xu
2011-08-19  8:12               ` Herbert Xu
2011-08-19 12:15                 ` Josh Boyer [this message]
2011-08-20  8:08                   ` 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=20110819121516.GA2270@zod.bos.redhat.com \
    --to=jwboyer@redhat.com \
    --cc=herbert@gondor.hengli.com.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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