Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
* [Bug 210021] New: IB/rxe: build error due to unmet dependency for CRYPTO_CRC32 by RDMA_RXE
@ 2020-11-03 11:32 bugzilla-daemon
  2020-11-03 14:30 ` Zhu Yanjun
  0 siblings, 1 reply; 3+ messages in thread
From: bugzilla-daemon @ 2020-11-03 11:32 UTC (permalink / raw)
  To: linux-rdma

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@kernel-bugs.osdl.org
          Reporter: fazilyildiran@gmail.com
                CC: dledford@redhat.com, fazilyildiran@gmail.com,
                    leon@leon.nu, paul@pgazz.com
        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_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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-11-03 15:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-03 11:32 [Bug 210021] New: IB/rxe: build error due to unmet dependency for CRYPTO_CRC32 by RDMA_RXE bugzilla-daemon
2020-11-03 14:30 ` Zhu Yanjun
2020-11-03 15:30   ` Jason Gunthorpe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox