Skip to contentSkip to conversation

crypto: acomp: export all scomp interfaces

PATCH In review Arnd Bergmann 2 participants 3 messages Oct 27, 2016 – Oct 28, 2016 Crypto API

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 crypto: acomp: export all scomp interfaces

The newly added scomp/acomp interface has a couple of functions that should be exported to allow linking the two drivers as loadable modules:

ERROR: "crypto_acomp_scomp_free_ctx" [crypto/acompress.ko] undefined!
ERROR: "crypto_acomp_scomp_alloc_ctx" [crypto/acompress.ko] undefined!
ERROR: "crypto_init_scomp_ops_async" [crypto/acompress.ko] undefined!

Alternatively, both of them could be combined into one loadable module.

Fixes 1ab53a77b772 ("crypto: acomp - add driver-side scomp interface")
---
 crypto/scompress.c | 3 +++
 1 file changed, 3 insertions(+)
crypto/scompress.c +3 -0
index 35e396d154b7..1f9cdcddb2ce 100644
@@ -267,6 +267,7 @@ int crypto_init_scomp_ops_async(struct crypto_tfm *tfm)
 
 	return 0;
 }
+EXPORT_SYMBOL_GPL(crypto_init_scomp_ops_async);
 
 struct acomp_req *crypto_acomp_scomp_alloc_ctx(struct acomp_req *req)
 {
@@ -286,6 +287,7 @@ struct acomp_req *crypto_acomp_scomp_alloc_ctx(struct acomp_req *req)
 
 	return req;
 }
+EXPORT_SYMBOL_GPL(crypto_acomp_scomp_alloc_ctx);
 
 void crypto_acomp_scomp_free_ctx(struct acomp_req *req)
 {
@@ -298,6 +300,7 @@ void crypto_acomp_scomp_free_ctx(struct acomp_req *req)
 	if (ctx)
 		crypto_scomp_free_ctx(scomp, ctx);
 }
+EXPORT_SYMBOL_GPL(crypto_acomp_scomp_free_ctx);
 
 static const struct crypto_type crypto_scomp_type = {
 	.extsize = crypto_alg_extsize,
Signature · 1 line
2.9.0
#1 lore raw

Hi Arnd,

Quoted 7 lines · Arnd Bergmann

The newly added scomp/acomp interface has a couple of functions that should be exported to allow linking the two drivers as loadable modules:

ERROR: "crypto_acomp_scomp_free_ctx" [crypto/acompress.ko] undefined!
ERROR: "crypto_acomp_scomp_alloc_ctx" [crypto/acompress.ko] undefined!
ERROR: "crypto_init_scomp_ops_async" [crypto/acompress.ko] undefined!

These functions were not exported on purpose. They should not be called by other modules.

Quoted 1 line

Alternatively, both of them could be combined into one loadable module.

I think this is the correct approach. Here is a patch with an alternative fix: https://patchwork.kernel.org/patch/9396503/

Thanks,

--
Giovanni

#2 lore raw
Quoted 10 lines · CEST Giovanni Cabiddu

Hi Arnd,

Quoted 7 lines · Arnd Bergmann

The newly added scomp/acomp interface has a couple of functions that should be exported to allow linking the two drivers as loadable modules:

ERROR: "crypto_acomp_scomp_free_ctx" [crypto/acompress.ko] undefined!
ERROR: "crypto_acomp_scomp_alloc_ctx" [crypto/acompress.ko] undefined!
ERROR: "crypto_init_scomp_ops_async" [crypto/acompress.ko] undefined!

Quoted 6 lines

These functions were not exported on purpose. They should not be called by other modules.

Quoted 1 line

Alternatively, both of them could be combined into one loadable module.

I think this is the correct approach. Here is a patch with an alternative fix: https://patchwork.kernel.org/patch/9396503/

Yes, your patch is exactly what I had in mind as the alternative, looks good to me.

Arnd