Re: [PATCH] crypto: Add soft module dependency to load HW accelerated crypto modules

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Feb 16, 2014 at 07:41:23AM +0800, Herbert Xu wrote:
> On Fri, Feb 14, 2014 at 06:01:06PM -0800, Tim Chen wrote:
> > 
> > Module A selects CRYPTO_ALG_B in config, which causes the generic
> > ALG_B to get built and a module dependency to the generic
> > ALG_B to be established.  Then when module A loads,
> 
> No, if you select ALG_B then yes it'll get built but it certainly
> won't establish a module dependency on ALG_B.  Only a softdep could
> create such a dependency.
> 
My understanding was that the soft dependencies were there to work exactly at
the softdep directive was in modprobe.conf.  That it to say, "Module B would
like to have Module A installed, but it won't be fatal if it can't be done".
The more correct example I've seen thus far has been the crct10dif crc
algorithm for x86.  In lib/crc-t10dif we have a crc-t10dif function which makes
use of the generic crc_t10dif_generic function defined in crct10dif_common.c.
However, x86 has an accelerated version of the function defined in the
crct10dif-pcmul module (thats aliased to crct10dif).  So the library funcion in
the kernel lists crct10dif as a soft dependency and modprobe tries to load it,
but just carries on if it fails.

Although as I write that, several things confuse me.  When are module
dependencies meant to be satisfied on behalf of the monolithic kernel, where
that dependecy is defined?  I'm guessing right before the init routine is
called for that code, but I'm not sure.  Also, I'm a bit confused by Marco and
Lukas' statement about how they see soft dependencies working.  I'm not sure
where the requirement to recognize soft dependencies comes from in depmod.

Regards
Neil

> Cheers,
> -- 
> Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
> Home Page: http://gondor.apana.org.au/~herbert/
> PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
> --
> To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux