On Tue, Nov 3, 2020 at 7:33 PM <bugzilla-daemon@xxxxxxxxxxxxxxxxxxx> wrote: > > 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: drivers_infiniband-rdma@xxxxxxxxxxxxxxxxxxxx > Reporter: fazilyildiran@xxxxxxxxx > CC: dledford@xxxxxxxxxx, fazilyildiran@xxxxxxxxx, > leon@xxxxxxx, paul@xxxxxxxxx > 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 https://lkml.org/lkml/2020/9/15/360 Please check this mail thread. The discussion is in the above link. Zhu Yanjun > 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_vmlinux1 > crypto/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 > > -- > You are receiving this mail because: > You are watching the assignee of the bug.