* [PATCH] crypto: Fix crc32c soft dependency
@ 2016-01-18 16:06 Jean Delvare
2016-01-19 7:57 ` Herbert Xu
0 siblings, 1 reply; 3+ messages in thread
From: Jean Delvare @ 2016-01-18 16:06 UTC (permalink / raw)
To: linux-crypto; +Cc: Tim Chen, Herbert Xu, David S. Miller, Michal Marek
I don't think it makes sense for a module to have a soft dependency
on itself. This seems quite cyclic by nature and I can't see what
purpose it could serve.
OTOH libcrc32c calls crypto_alloc_shash("crc32c", 0, 0) so it pretty
much assumes that some incarnation of the "crc32c" hash algorithm has
been loaded. Therefore it makes sense to have the soft dependency
there (as crc-t10dif does.)
Signed-off-by: Jean Delvare <jdelvare@suse.de>
Cc: Tim Chen <tim.c.chen@linux.intel.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: "David S. Miller" <davem@davemloft.net>
---
crypto/crc32c_generic.c | 1 -
lib/libcrc32c.c | 1 +
2 files changed, 1 insertion(+), 1 deletion(-)
--- linux-4.5-rc0.orig/crypto/crc32c_generic.c 2016-01-11 00:01:32.000000000 +0100
+++ linux-4.5-rc0/crypto/crc32c_generic.c 2016-01-18 16:47:35.243398451 +0100
@@ -172,4 +172,3 @@ MODULE_DESCRIPTION("CRC32c (Castagnoli)
MODULE_LICENSE("GPL");
MODULE_ALIAS_CRYPTO("crc32c");
MODULE_ALIAS_CRYPTO("crc32c-generic");
-MODULE_SOFTDEP("pre: crc32c");
--- linux-4.5-rc0.orig/lib/libcrc32c.c 2016-01-11 00:01:32.000000000 +0100
+++ linux-4.5-rc0/lib/libcrc32c.c 2016-01-18 16:47:47.978681236 +0100
@@ -74,3 +74,4 @@ module_exit(libcrc32c_mod_fini);
MODULE_AUTHOR("Clay Haapala <chaapala@cisco.com>");
MODULE_DESCRIPTION("CRC32c (Castagnoli) calculations");
MODULE_LICENSE("GPL");
+MODULE_SOFTDEP("pre: crc32c");
--
Jean Delvare
SUSE L3 Support
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] crypto: Fix crc32c soft dependency
2016-01-18 16:06 [PATCH] crypto: Fix crc32c soft dependency Jean Delvare
@ 2016-01-19 7:57 ` Herbert Xu
2016-01-19 21:13 ` Tim Chen
0 siblings, 1 reply; 3+ messages in thread
From: Herbert Xu @ 2016-01-19 7:57 UTC (permalink / raw)
To: Jean Delvare; +Cc: linux-crypto, Tim Chen, David S. Miller, Michal Marek
On Mon, Jan 18, 2016 at 05:06:05PM +0100, Jean Delvare wrote:
> I don't think it makes sense for a module to have a soft dependency
> on itself. This seems quite cyclic by nature and I can't see what
> purpose it could serve.
>
> OTOH libcrc32c calls crypto_alloc_shash("crc32c", 0, 0) so it pretty
> much assumes that some incarnation of the "crc32c" hash algorithm has
> been loaded. Therefore it makes sense to have the soft dependency
> there (as crc-t10dif does.)
>
> Signed-off-by: Jean Delvare <jdelvare@suse.de>
> Cc: Tim Chen <tim.c.chen@linux.intel.com>
> Cc: Herbert Xu <herbert@gondor.apana.org.au>
> Cc: "David S. Miller" <davem@davemloft.net>
Well caught. Patch applied, thanks!
--
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] crypto: Fix crc32c soft dependency
2016-01-19 7:57 ` Herbert Xu
@ 2016-01-19 21:13 ` Tim Chen
0 siblings, 0 replies; 3+ messages in thread
From: Tim Chen @ 2016-01-19 21:13 UTC (permalink / raw)
To: Herbert Xu; +Cc: Jean Delvare, linux-crypto, David S. Miller, Michal Marek
On Tue, 2016-01-19 at 15:57 +0800, Herbert Xu wrote:
> On Mon, Jan 18, 2016 at 05:06:05PM +0100, Jean Delvare wrote:
> > I don't think it makes sense for a module to have a soft dependency
> > on itself. This seems quite cyclic by nature and I can't see what
> > purpose it could serve.
> >
> > OTOH libcrc32c calls crypto_alloc_shash("crc32c", 0, 0) so it pretty
> > much assumes that some incarnation of the "crc32c" hash algorithm has
> > been loaded. Therefore it makes sense to have the soft dependency
> > there (as crc-t10dif does.)
> >
> > Signed-off-by: Jean Delvare <jdelvare@suse.de>
> > Cc: Tim Chen <tim.c.chen@linux.intel.com>
> > Cc: Herbert Xu <herbert@gondor.apana.org.au>
> > Cc: "David S. Miller" <davem@davemloft.net>
>
> Well caught. Patch applied, thanks!
Thanks for the fix.
Tim
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-01-19 21:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-18 16:06 [PATCH] crypto: Fix crc32c soft dependency Jean Delvare
2016-01-19 7:57 ` Herbert Xu
2016-01-19 21:13 ` Tim Chen
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).