[PATCH v2] erofs: fix build error with CONFIG_EROFS_FS_ZIP_ACCEL=y

Bo Liu posted 1 patch 2 months, 3 weeks ago
There is a newer version of this series
fs/erofs/Kconfig | 1 +
1 file changed, 1 insertion(+)
[PATCH v2] erofs: fix build error with CONFIG_EROFS_FS_ZIP_ACCEL=y
Posted by Bo Liu 2 months, 3 weeks ago
fix build err:
 ld.lld: error: undefined symbol: crypto_req_done
   referenced by decompressor_crypto.c
       fs/erofs/decompressor_crypto.o:(z_erofs_crypto_decompress) in archive vmlinux.a
   referenced by decompressor_crypto.c
       fs/erofs/decompressor_crypto.o:(z_erofs_crypto_decompress) in archive vmlinux.a

 ld.lld: error: undefined symbol: crypto_acomp_decompress
   referenced by decompressor_crypto.c
       fs/erofs/decompressor_crypto.o:(z_erofs_crypto_decompress) in archive vmlinux.a

 ld.lld: error: undefined symbol: crypto_alloc_acomp
   referenced by decompressor_crypto.c
       fs/erofs/decompressor_crypto.o:(z_erofs_crypto_enable_engine) in archive vmlinux.a

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202507161032.QholMPtn-lkp@intel.com/
Fixes: b4a29efc5146 ("erofs: support DEFLATE decompression by using Intel QAT")
Signed-off-by: Bo Liu <liubo03@inspur.com>

v1: https://lore.kernel.org/linux-erofs/7a1dbee70a604583bae5a29f690f4231@inspur.com/T/#t

change since v1:
- add Fixes commits
---
 fs/erofs/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/erofs/Kconfig b/fs/erofs/Kconfig
index 6beeb7063871..60510a041bf1 100644
--- a/fs/erofs/Kconfig
+++ b/fs/erofs/Kconfig
@@ -147,6 +147,7 @@ config EROFS_FS_ZIP_ZSTD
 config EROFS_FS_ZIP_ACCEL
 	bool "EROFS hardware decompression support"
 	depends on EROFS_FS_ZIP
+	select CRYPTO
 	help
 	  Saying Y here includes hardware accelerator support for reading
 	  EROFS file systems containing compressed data.  It gives better
-- 
2.31.1
Re: [PATCH v2] erofs: fix build error with CONFIG_EROFS_FS_ZIP_ACCEL=y
Posted by Gao Xiang 2 months, 3 weeks ago

On 2025/7/17 09:58, Bo Liu wrote:
> fix build err:
>   ld.lld: error: undefined symbol: crypto_req_done
>     referenced by decompressor_crypto.c
>         fs/erofs/decompressor_crypto.o:(z_erofs_crypto_decompress) in archive vmlinux.a
>     referenced by decompressor_crypto.c
>         fs/erofs/decompressor_crypto.o:(z_erofs_crypto_decompress) in archive vmlinux.a
> 
>   ld.lld: error: undefined symbol: crypto_acomp_decompress
>     referenced by decompressor_crypto.c
>         fs/erofs/decompressor_crypto.o:(z_erofs_crypto_decompress) in archive vmlinux.a
> 
>   ld.lld: error: undefined symbol: crypto_alloc_acomp
>     referenced by decompressor_crypto.c
>         fs/erofs/decompressor_crypto.o:(z_erofs_crypto_enable_engine) in archive vmlinux.a
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202507161032.QholMPtn-lkp@intel.com/
> Fixes: b4a29efc5146 ("erofs: support DEFLATE decompression by using Intel QAT")
> Signed-off-by: Bo Liu <liubo03@inspur.com>
> 
> v1: https://lore.kernel.org/linux-erofs/7a1dbee70a604583bae5a29f690f4231@inspur.com/T/#t
> 
> change since v1:
> - add Fixes commits
> ---
>   fs/erofs/Kconfig | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/fs/erofs/Kconfig b/fs/erofs/Kconfig
> index 6beeb7063871..60510a041bf1 100644
> --- a/fs/erofs/Kconfig
> +++ b/fs/erofs/Kconfig
> @@ -147,6 +147,7 @@ config EROFS_FS_ZIP_ZSTD
>   config EROFS_FS_ZIP_ACCEL
>   	bool "EROFS hardware decompression support"
>   	depends on EROFS_FS_ZIP
> +	select CRYPTO

After testing, I think we should rely on
CRYPTO_ACOMP or CRYPTO_ACOMP2 instead.

Otherwise it will still fails.

Thanks,
Gao Xiang
RE: [PATCH v2] erofs: fix build error with CONFIG_EROFS_FS_ZIP_ACCEL=y
Posted by Bo Liu (刘波)-浪潮信息 2 months, 3 weeks ago
>On 2025/7/17 09:58, Bo Liu wrote:
>> fix build err:
>>   ld.lld: error: undefined symbol: crypto_req_done
>>     referenced by decompressor_crypto.c
>>         fs/erofs/decompressor_crypto.o:(z_erofs_crypto_decompress) in
>archive vmlinux.a
>>     referenced by decompressor_crypto.c
>>         fs/erofs/decompressor_crypto.o:(z_erofs_crypto_decompress) in
>> archive vmlinux.a
>>
>>   ld.lld: error: undefined symbol: crypto_acomp_decompress
>>     referenced by decompressor_crypto.c
>>         fs/erofs/decompressor_crypto.o:(z_erofs_crypto_decompress) in
>> archive vmlinux.a
>>
>>   ld.lld: error: undefined symbol: crypto_alloc_acomp
>>     referenced by decompressor_crypto.c
>>         fs/erofs/decompressor_crypto.o:(z_erofs_crypto_enable_engine)
>> in archive vmlinux.a
>>
>> Reported-by: kernel test robot <lkp@intel.com>
>> Closes:
>> https://lore.kernel.org/oe-kbuild-all/202507161032.QholMPtn-lkp@intel.
>> com/
>> Fixes: b4a29efc5146 ("erofs: support DEFLATE decompression by using
>> Intel QAT")
>> Signed-off-by: Bo Liu <liubo03@inspur.com>
>>
>> v1:
>> https://lore.kernel.org/linux-erofs/7a1dbee70a604583bae5a29f690f4231@i
>> nspur.com/T/#t
>>
>> change since v1:
>> - add Fixes commits
>> ---
>>   fs/erofs/Kconfig | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/fs/erofs/Kconfig b/fs/erofs/Kconfig index
>> 6beeb7063871..60510a041bf1 100644
>> --- a/fs/erofs/Kconfig
>> +++ b/fs/erofs/Kconfig
>> @@ -147,6 +147,7 @@ config EROFS_FS_ZIP_ZSTD
>>   config EROFS_FS_ZIP_ACCEL
>>   	bool "EROFS hardware decompression support"
>>   	depends on EROFS_FS_ZIP
>> +	select CRYPTO
>
>After testing, I think we should rely on CRYPTO_ACOMP or CRYPTO_ACOMP2
>instead.
>
>Otherwise it will still fails.

I will change it.

Thanks.
Bo Liu.