Backporting issue in compat.ko

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
SaKr_4783036
Level 1
Level 1
First like given

Hi,

I want to port driver for CYW43455. I used this  Cypress Linux WiFi Driver Release (FMAC) [2020-06-25]  release. I need to port this driver for 4.9 kernel. I followed the instructions in README file given in the backports. During the cross compilation of modules, I have seen the following warning.

WARNING: "hash_algo_name" [/Downloads/cypress/v5.4.18-backports/compat/compat.ko] undefined!

Similarly, during insmod compat.ko in the target board. I got the following error:

sakthi@localhost:~$ sudo insmod compat.ko

insmod: ERROR: could not insert module compat.ko: Unknown symbol in module

In dmesg, I got the following logs after insmod of compat.ko,

[  627.941252] compat: loading out-of-tree module taints kernel.

[  627.949143] compat: Unknown symbol hash_algo_name (err 0)

Could you please let me know how to fix this issue?

Thanks,

Sakthi

0 Likes
1 Solution
yasa_4608926
Level 4
Level 4
Distributor - Marubun (Japan)
250 sign-ins 5 solutions authored 25 replies posted

Hi,

"hash_algo_name" is implemented in the Linux Kernel source code "crypto/hash_info.c".

To use it, you need CONFIG_CRYPTO_HASH_INFO=y in your kernel configuration.

Please refer the README in FMAC package.

For FMAC, you need to enable the following in the kernel configuration.

#4. Enable below configs in .config

#     CONFIG_ASYMMETRIC_KEY_TYPE=y

#     CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=y

#     CONFIG_X509_CERTIFICATE_PARSER=y

#     CONFIG_PKCS7_MESSAGE_PARSER=y

If CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=y, CONFIG_CRYPTO_HASH_INFO will be enabled by the dependency.

Best regards,

Yasa

View solution in original post

2 Replies
yasa_4608926
Level 4
Level 4
Distributor - Marubun (Japan)
250 sign-ins 5 solutions authored 25 replies posted

Hi,

"hash_algo_name" is implemented in the Linux Kernel source code "crypto/hash_info.c".

To use it, you need CONFIG_CRYPTO_HASH_INFO=y in your kernel configuration.

Please refer the README in FMAC package.

For FMAC, you need to enable the following in the kernel configuration.

#4. Enable below configs in .config

#     CONFIG_ASYMMETRIC_KEY_TYPE=y

#     CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=y

#     CONFIG_X509_CERTIFICATE_PARSER=y

#     CONFIG_PKCS7_MESSAGE_PARSER=y

If CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=y, CONFIG_CRYPTO_HASH_INFO will be enabled by the dependency.

Best regards,

Yasa

GauravS_31
Moderator
Moderator
Moderator
10 questions asked 250 solutions authored 250 sign-ins

Just to add more details to the above response, if you check the kernel source and go to the path crypto/Makefile, you will find the following:

obj-$(CONFIG_CRYPTO_HASH_INFO) += hash_info.o

And if you check the path crypto/asymmetric_keys/Kconfig, you will find the following:

config ASYMMETRIC_PUBLIC_KEY_SUBTYPE
tristate "Asymmetric public-key crypto algorithm subtype"
select MPILIB
select CRYPTO_HASH_INFO
select CRYPTO_AKCIPHER
help
This option provides support for asymmetric public key type handling.
If signature generation and/or verification are to be used,
appropriate hash algorithms (such as SHA-1) must be available.
ENOPKG will be reported if the requisite algorithm is unavailable.

So, enabling  CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=y enables CONFIG_CRYPTO_HASH_INFO=y which in turn allows compilation of hash_info.c, which contains the definition of hash_algo_name

0 Likes