linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tim Chen <tim.c.chen@linux.intel.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>,
	Xiong Zhou <jencce.kernel@gmail.com>,
	Stephen Rothwell <sfr@canb.auug.org.au>,
	Linux-Next <linux-next@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	linux-crypto@vger.kernel.org,
	Randy Dunlap <rdunlap@infradead.org>
Subject: Re: linux-next: Tree for May 15 (crypto /crct10dif)
Date: Mon, 20 May 2013 12:09:45 -0700	[thread overview]
Message-ID: <1369076985.27102.319.camel@schen9-DESK> (raw)
In-Reply-To: <20130520114707.GA1187@gondor.apana.org.au>

On Mon, 2013-05-20 at 19:47 +0800, Herbert Xu wrote:

> 
> Nope this is still broken.  We need to move the actual crct10dif
> code into crypto/.  I'll fix up the patch in the tree.
> 
> Also I'm going to get rid of crc_t10dif_update_lib function.  If you
> still want to maintain the ordering you should do so using the
> *_init constructs.
> 

Herbert, 

I used the following constructs in the pclmulqdq version of t10dif
to get the module loaded. 

static const struct x86_cpu_id crct10dif_cpu_id[] = {
        X86_FEATURE_MATCH(X86_FEATURE_PCLMULQDQ),
        {}
};
MODULE_DEVICE_TABLE(x86cpu, crct10dif_cpu_id);

However, the default generic algorithm is used
in the library function. The options CRC_T10DIF, CRYPTO_CRCT10DIF
and CRYPTO_CRCT10DIF_PCLMUL are selected as modules (which
is most likely usage scenario in distribution) on my
test machine.  The library module and generic crypto module was loaded
before the pclmulqdq t10dif module during boot.  How should
things be changed to get this crypto module loaded earlier before the
library?  Should we add another init call level between fs and device
init calls for loading the available crypto algorithms?  
The crc_t10dif_update_lib was originally used to side step this issue.

BTW, latest crypto-dev need the following modification if we get
rid of crc_t10dif_update_lib.

Thanks.

Tim



diff --git a/arch/x86/crypto/crct10dif-pclmul_glue.c
b/arch/x86/crypto/crct10dif-pclmul_glue.c
index 3c0abd3..d838b7f 100644
--- a/arch/x86/crypto/crct10dif-pclmul_glue.c
+++ b/arch/x86/crypto/crct10dif-pclmul_glue.c
@@ -136,8 +136,6 @@ static int __init crct10dif_intel_mod_init(void)
                return -ENODEV;
 
        ret = crypto_register_shash(&alg);
-       if (!ret)
-               crc_t10dif_update_lib();
        return ret;
 }

  parent reply	other threads:[~2013-05-20 19:09 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-15  3:26 linux-next: Tree for May 15 Stephen Rothwell
2013-05-15 17:42 ` linux-next: Tree for May 15 (wireless/brcm) Randy Dunlap
2013-05-15 17:59 ` linux-next: Tree for May 15 (crypto /crct10dif) Randy Dunlap
2013-05-16  3:57   ` Xiong Zhou
2013-05-16  7:22     ` Geert Uytterhoeven
2013-05-16 16:09       ` Tim Chen
2013-05-16 16:59       ` Tim Chen
2013-05-16 18:03         ` Tim Chen
2013-05-17  3:09           ` Xiong Zhou
2013-05-20 11:47           ` Herbert Xu
2013-05-20 12:14             ` Herbert Xu
2013-05-20 19:09             ` Tim Chen [this message]
2013-05-21 13:46               ` Herbert Xu
2013-05-17  3:06       ` Xiong Zhou
2013-05-15 21:03 ` [PATCH -next] platform/x86: fix amilo-rfkill build errors Randy Dunlap

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=1369076985.27102.319.camel@schen9-DESK \
    --to=tim.c.chen@linux.intel.com \
    --cc=geert@linux-m68k.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=jencce.kernel@gmail.com \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=rdunlap@infradead.org \
    --cc=sfr@canb.auug.org.au \
    /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).