REGRESSION: ChaCha fails to build in randconfig

Arnd Bergmann arnd at arndb.de
Fri Jan 17 08:46:34 PST 2020


On Fri, Jan 17, 2020 at 5:22 PM Ard Biesheuvel
<ard.biesheuvel at linaro.org> wrote:
>
> On Fri, 17 Jan 2020 at 17:02, Russell King - ARM Linux admin
> <linux at armlinux.org.uk> wrote:
> >
> > Ard,
> >
> > Randconfig builds have found an issue with a commit in the last merge
> > window:
> >
> > chacha-glue.c:(.text+0xc0): undefined reference to `chacha_4block_xor_neon'
> >
> > This seems to be a result of this commit:
> >
> > commit b36d8c09e710c71f6a9690b6586fea2d1c9e1e27
> > Author: Ard Biesheuvel <ardb at kernel.org>
> > Date:   Fri Nov 8 13:22:14 2019 +0100
> >
> >     crypto: arm/chacha - remove dependency on generic ChaCha driver
> >
> > CRYPTO_CHACHA20_NEON does not depend on KERNEL_MODE_NEON, yet the
> > makefile has:
> >
> > obj-$(CONFIG_CRYPTO_CHACHA20_NEON) += chacha-neon.o
> > chacha-neon-y := chacha-scalar-core.o chacha-glue.o
> > chacha-neon-$(CONFIG_KERNEL_MODE_NEON) += chacha-neon-core.o
> >
> > chacha-glue.c refers to chacha_4block_xor_neon in chacha_doneon(),
> > and I guess some compilers are not clever enough to eliminate that
> > code with KERNEL_MODE_NEON is disabled.
> >
> > Arnd has a patch that adds a dependency to stop this being a problem,
> > but that is probably not what you want.  Please fix.
> >
>
> Thanks for the head's up
>
> I'll post something along the lines of the below, that should convince
> the compiler that chacha_4block_xor_neon() is never called when
> CONFIG_KERNEL_MODE_NEON is not enabled.
>

I also see this related warning on linux-next:

    WARNING: unmet direct dependencies detected for CRYPTO_LIB_CHACHA20POLY1305
      Depends on [m]: CRYPTO [=y] && (CRYPTO_ARCH_HAVE_LIB_CHACHA [=m]
|| !CRYPTO_ARCH_HAVE_LIB_CHACHA [=m]) &&
(CRYPTO_ARCH_HAVE_LIB_POLY1305 [=y] || !CRYPTO_ARCH_HAVE_LIB_POLY1305
[=y])
      Selected by [y]:
      - WIREGUARD [=y] && NETDEVICES [=y] && NET_CORE [=y] && NET [=y]
&& INET [=y] && (IPV6 [=y] || !IPV6 [=y])



More information about the linux-arm-kernel mailing list