New: IB/rxe: build error due to unmet dependency for CRYPTO_CRC32 by RDMA_RXE
https://bugzilla.kernel.org/show_bug.cgi?id=210021
Bug ID: 210021
Summary: IB/rxe: build error due to unmet dependency for
CRYPTO_CRC32 by RDMA_RXE
Product: Drivers
Version: 2.5
Kernel Version: 5.4.4
Hardware: All
OS: Linux
Tree: Mainline
Status: NEW
Severity: normal
Priority: P1
Component: Infiniband/RDMA
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected], [email protected]
Regression: No
Created attachment 293417
--> https://bugzilla.kernel.org/attachment.cgi?id=293417&action=edit
reproduce.tar.gz
Attachment (reproduce.tar.gz) content:
- sample.config: Config file to reproduce the bug.
- build_out.txt: Output of Kbuild including the error messages.
When RDMA_RXE is enabled and CRYPTO is disabled, it results in the following Kbuild warning:
WARNING: unmet direct dependencies detected for CRYPTO_CRC32
Depends on [n]: CRYPTO [=n]
Selected by [y]:
- RDMA_RXE [=y] && (INFINIBAND_USER_ACCESS [=y] || !INFINIBAND_USER_ACCESS
[=y]) && INET [=y] && PCI [=y] && INFINIBAND [=y] && (!64BIT [=y] || ARCH_DMA_ADDR_T_64BIT [=y])
Building the kernel fails due to this unmet direct dependency issue as follows:
[...]
LD .tmp_vmlinux1crypto/crc32_generic.o: In function `crc32_mod_fini':
crc32_generic.c:(.exit.text+0x8): undefined reference to `crypto_unregister_shash'crypto/crc32_generic.o: In function `crc32_mod_init':
crc32_generic.c:(.init.text+0x8): undefined reference to `crypto_register_shash'drivers/infiniband/sw/rxe/rxe.o: In function `rxe_dealloc':
rxe.c:(.text+0x102): undefined reference to crypto_destroy_tfm' drivers/infiniband/sw/rxe/rxe_req.o: In function rxe_crc32.isra.17':
rxe_req.c:(.text+0x219): undefined reference to crypto_shash_update' drivers/infiniband/sw/rxe/rxe_recv.o: In function rxe_crc32.isra.7':
rxe_recv.c:(.text+0xeb): undefined reference to crypto_shash_update' drivers/infiniband/sw/rxe/rxe_verbs.o: In function rxe_register_device':
rxe_verbs.c:(.text+0x117d): undefined reference to crypto_alloc_shash' drivers/infiniband/sw/rxe/rxe_mr.o: In function rxe_crc32.isra.3':
rxe_mr.c:(.text+0x13b): undefined reference to crypto_shash_update' drivers/infiniband/sw/rxe/rxe_icrc.o: In function rxe_crc32.isra.0':
rxe_icrc.c:(.text+0x26): undefined reference to `crypto_shash_update' Makefile:1077: recipe for target 'vmlinux' failed
make: *** [vmlinux] Error 1
Steps to reproduce the bug for v5.4.4:
1. wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
2. chmod +x ~/bin/make.cross
3. tar -xvf reproduce.tar.gz # sample.config and build_out.txt
4. cp sample.config path/to/linux-source-v5.4.4/.config
5. cd path/to/linux-source-v5.4.4/
6. ~/bin/make.cross ARCH=x86_64 clean
7. ~/bin/make.cross ARCH=x86_64 olddefconfig # unmet direct dependency
warning
8. ~/bin/make.cross ARCH=x86_64 # should have a build error
The output for the steps [6-8] can be found in build_out.txt.
The build error happens as follows: RDMA_RXE selects CRYPTO_CRC32. CRYPTO_CRC32 selects CRYPTO_HASH, and CRYPTO_HASH selects CRYPTO_HASH2. When RDMA_RXE selects CRYPTO_CRC32 without accounting for its direct dependency (CRYPTO), CRYPTO_CRC32 gets enabled but it does not select CRYPTO_HASH thus CRYPTO_HASH2. Consequently, the required functions such crypto_unregister_shash are left undefined, causing the build error.
Thanks,
Necip
Signature · 2 lines
You are receiving this mail because: You are watching the assignee of the bug.
Quoted 26 lines · On Tue, Nov 3, 2020 at 7:33 PM <[email protected]> wrote:
https://bugzilla.kernel.org/show_bug.cgi?id=210021
Bug ID: 210021
Summary: IB/rxe: build error due to unmet dependency for
CRYPTO_CRC32byRDMA_RXE
Product: Drivers
Version: 2.5
Kernel Version: 5.4.4
Hardware: All
OS: Linux
Tree: Mainline
Status: NEW
Severity: normal
Priority: P1
Component: Infiniband/RDMA
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected], [email protected]
Regression: NoCreated attachment 293417
--> https://bugzilla.kernel.org/attachment.cgi?id=293417&action=edit
reproduce.tar.gz
Quoted 8 lines
Attachment (reproduce.tar.gz) content:
- sample.config: Config file to reproduce the bug.
- build_out.txt: Output ofKbuildincluding the error messages.When
RDMA_RXEis enabled and CRYPTO is disabled, it results in the followingKbuildwarning:WARNING: unmet direct dependencies detected for
CRYPTO_CRC32
https://lkml.org/lkml/2020/9/15/360
Please check this mail thread.
The discussion is in the above link.
Zhu Yanjun
Quoted 59 lines
Depends on [n]: CRYPTO [=n]
Selected by [y]:
-RDMA_RXE[=y] && (INFINIBAND_USER_ACCESS[=y] || !INFINIBAND_USER_ACCESS
[=y]) && INET [=y] && PCI [=y] && INFINIBAND [=y] && (!64BIT [=y] ||ARCH_DMA_ADDR_T_64BIT[=y])Building the kernel fails due to this unmet direct dependency issue as follows:
[...]
LD .tmp_vmlinux1crypto/crc32_generic.o: In function `crc32_mod_fini':
crc32_generic.c:(.exit.text+0x8): undefined reference to `crypto_unregister_shash'crypto/crc32_generic.o: In function `crc32_mod_init':
crc32_generic.c:(.init.text+0x8): undefined reference to `crypto_register_shash'drivers/infiniband/sw/rxe/rxe.o: In function `rxe_dealloc':
rxe.c:(.text+0x102): undefined reference tocrypto_destroy_tfm' drivers/infiniband/sw/rxe/rxe_req.o: In functionrxe_crc32.isra.17':
rxe_req.c:(.text+0x219): undefined reference tocrypto_shash_update' drivers/infiniband/sw/rxe/rxe_recv.o: In functionrxe_crc32.isra.7':
rxe_recv.c:(.text+0xeb): undefined reference tocrypto_shash_update' drivers/infiniband/sw/rxe/rxe_verbs.o: In functionrxe_register_device':
rxe_verbs.c:(.text+0x117d): undefined reference tocrypto_alloc_shash' drivers/infiniband/sw/rxe/rxe_mr.o: In functionrxe_crc32.isra.3':
rxe_mr.c:(.text+0x13b): undefined reference tocrypto_shash_update' drivers/infiniband/sw/rxe/rxe_icrc.o: In functionrxe_crc32.isra.0':
rxe_icrc.c:(.text+0x26): undefined reference to `crypto_shash_update' Makefile:1077: recipe for target 'vmlinux' failed
make: *** [vmlinux] Error 1Steps to reproduce the bug for v5.4.4:
1. wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
2. chmod +x ~/bin/make.cross
3. tar -xvf reproduce.tar.gz # sample.config and build_out.txt
4. cp sample.config path/to/linux-source-v5.4.4/.config
5. cd path/to/linux-source-v5.4.4/
6. ~/bin/make.cross ARCH=x86_64 clean
7. ~/bin/make.cross ARCH=x86_64 olddefconfig # unmet direct dependency
warning
8. ~/bin/make.cross ARCH=x86_64 # should have a build errorThe output for the steps [6-8] can be found in build_out.txt.
The build error happens as follows:
RDMA_RXEselectsCRYPTO_CRC32.CRYPTO_CRC32selectsCRYPTO_HASH, andCRYPTO_HASHselectsCRYPTO_HASH2. WhenRDMA_RXEselectsCRYPTO_CRC32without accounting for its direct dependency (CRYPTO),CRYPTO_CRC32gets enabled but it does not selectCRYPTO_HASHthusCRYPTO_HASH2. Consequently, the required functions suchcrypto_unregister_shashare left undefined, causing the build error.Thanks,
Necip--
You are receiving this mail because:
You are watching the assignee of the bug.
Quoted 33 lines · Zhu Yanjun
Quoted 32 lines · On Tue, Nov 3, 2020 at 7:33 PM <[email protected]> wrote:
https://bugzilla.kernel.org/show_bug.cgi?id=210021
Bug ID: 210021
Summary: IB/rxe: build error due to unmet dependency for
CRYPTO_CRC32byRDMA_RXE
Product: Drivers
Version: 2.5
Kernel Version: 5.4.4
Hardware: All
OS: Linux
Tree: Mainline
Status: NEW
Severity: normal
Priority: P1
Component: Infiniband/RDMA
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected], [email protected]
Regression: NoCreated attachment 293417
reproduce.tar.gzAttachment (reproduce.tar.gz) content:
- sample.config: Config file to reproduce the bug.
- build_out.txt: Output ofKbuildincluding the error messages.When
RDMA_RXEis enabled and CRYPTO is disabled, it results in the followingKbuildwarning:
Quoted 7 lines
Quoted 1 line
WARNING: unmet direct dependencies detected for
CRYPTO_CRC32https://lkml.org/lkml/2020/9/15/360
Please check this mail thread.
The discussion is in the above link.
I'd like crypto people to weight on what is proper here
Jason