Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp242095imw; Mon, 4 Jul 2022 08:23:39 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vUpB+GTejlR4LKUYejZKTyTb6h5Diw1entYpAjAGUGGpC/v7vYmmzjnB/mfXLP3V7OKKVg X-Received: by 2002:aa7:c597:0:b0:43a:473b:8bae with SMTP id g23-20020aa7c597000000b0043a473b8baemr9415390edq.384.1656948219517; Mon, 04 Jul 2022 08:23:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656948219; cv=none; d=google.com; s=arc-20160816; b=V3lZzhD0Rk2kqbcAQrck5OwTa+GLJf4k9N08cxxMi1YkNAe/YRDgMhDfZTYQBlmdXL ajEY6iQCIWnOOmFuHbIx69bVWq3PmQbx+EKZxsnFHdvzpg1LXMODQsURJL+3ot50jleQ EQ16g+vvqxXe0ywKeRcp6N55OTOjWt7oAKdpdA10EBH7pNAVhpEshoEu3YkidYcxfgN9 PeWcpPTK7H65JETZ+UfvxwLCOiUxMSjfrj+JIww47w/WKtTj5XZb399WCLqnP8X8H0j7 VZYxbLA7TPqBKvND6KxoOITFrajR5chfp1l+UODUI9kkWLN0oyta/v3kIuBpMnnNtJjO F57Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=rp477veCl7PiPqX7ATXvfpa+/m/k7gEuL107Sf46ZoE=; b=hhZJoh2eue/3nAGaSpeSDBeDTOwVZ0K3TyhDHX0M1xXUIWQK2btHdA4rFwYkg3KrQH 37ZRyJ9EDQNODgwoBMOlaks/z1ZhfB7qlQMRf1PFDJ2blupTC2ao736d7t+Wfq1rGuTx 5F+sOEhXBDBZYUSEUwq+y2Qg633r1kG+j7CBlhWRYvqLenubE/MVCoj+/xGQhHQ8nHKJ HIwlwaq98VRTV8zhDjWUq4K5cGT2RFRIWkF89t2YW5NmJNw5prjE0wmUdbuefsp2duLr FR+iQ/Bx44Aocy7UoMuoTvA9vMONNutf7Fd+bXdZBCMHoo34aavDj39vpldNZBZVSBl2 zGhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=InATMP3D; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mp37-20020a1709071b2500b0072a4249e9b5si2735998ejc.17.2022.07.04.08.23.14; Mon, 04 Jul 2022 08:23:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=InATMP3D; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233903AbiGDO7A (ORCPT + 99 others); Mon, 4 Jul 2022 10:59:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56682 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233235AbiGDO67 (ORCPT ); Mon, 4 Jul 2022 10:58:59 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 25B6F62D4 for ; Mon, 4 Jul 2022 07:58:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1656946738; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rp477veCl7PiPqX7ATXvfpa+/m/k7gEuL107Sf46ZoE=; b=InATMP3Db3b+9MtOq7+z77rjlsp/iDT3AUhsqekfCvL8uP6t2iXoLxOw2V6jA6VCKOUd8N 26o3qY+CsoavWHOoPSxRJAlZpoT6lgbfy5NYMYTQiot1GHfDlmiN2sE57mEhYBuwHZYxe6 sAv50kRoXTmN0siNUbKSI/FzU8nkZw4= Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-635-Cg1C5LFHN8e5UejlDacuOg-1; Mon, 04 Jul 2022 10:58:57 -0400 X-MC-Unique: Cg1C5LFHN8e5UejlDacuOg-1 Received: by mail-ed1-f69.google.com with SMTP id o11-20020a056402438b00b0043676efd75dso7416436edc.16 for ; Mon, 04 Jul 2022 07:58:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=rp477veCl7PiPqX7ATXvfpa+/m/k7gEuL107Sf46ZoE=; b=AU2h+UuVxurEdNYvUywrUuvPxUFLD78ud4yBuEDa2zKF2vYcjAqOR4Bk6Y6X5SZaGT NMJctlmECjobIqFdox+W7RUWL3BmDLgcXflD3MC5KIHU0Tyk1ogdGxxCdloZq/VSuu/O 2tS9tGtY9msa04y/5Zy+U3jEY0hbDFY+wGGCmaaI+uKSzifkNpGxPpBnYcAJsUjYyHr4 +r/YTpRqVTYfH28La2D/27D9MBXi50W4h1o0h0vKEmYx9ytETabqjPkThFcSr0G/Rb6e 3pLm7uxI/BjhYh+MaqavkN+EY1y36Sox8sTlSb1WBu8sOySQS6+DVOyRs4pu2/Oc+jRR XBRQ== X-Gm-Message-State: AJIora9X5kcIXsVv4JqLJ8n26ErmHIK3Q4sDqtyoh4gul/6ijhIcWIbw KMR6dNYSvSHTT7A+SqrditVdmSKLwO+DYrtuLwZIL3/A/6M3d7rW7Y1423mxMiK1zohMJcJXuwe wYFrkcvo4AKFEFtIn+fynPLOXUg34CjysVVpW5Ms8 X-Received: by 2002:a17:906:106:b0:722:e997:a365 with SMTP id 6-20020a170906010600b00722e997a365mr29647724eje.169.1656946735381; Mon, 04 Jul 2022 07:58:55 -0700 (PDT) X-Received: by 2002:a17:906:106:b0:722:e997:a365 with SMTP id 6-20020a170906010600b00722e997a365mr29647706eje.169.1656946735195; Mon, 04 Jul 2022 07:58:55 -0700 (PDT) MIME-Version: 1.0 References: <202207030630.6SZVkrWf-lkp@intel.com> In-Reply-To: From: Vlad Dronov Date: Mon, 4 Jul 2022 16:58:44 +0200 Message-ID: Subject: Re: include/crypto/chacha.h:100: undefined reference to `chacha_crypt_arch' To: kernel test robot Cc: kbuild-all@lists.01.org, LKML , Herbert Xu , Harald Freudenberger Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Mon, Jul 4, 2022 at 4:35 PM Vlad Dronov wrote: > > Hi, > > On Sun, Jul 3, 2022 at 12:51 AM kernel test robot wrote: > > ... > > config: s390-buildonly-randconfig-r005-20220703 (https://download.01.or= g/0day-ci/archive/20220703/202207030630.6SZVkrWf-lkp@intel.com/config) > > ... > > s390-linux-ld: lib/crypto/chacha20poly1305.o: in function `chacha_cr= ypt': > > >> include/crypto/chacha.h:100: undefined reference to `chacha_crypt_ar= ch' > > >> s390-linux-ld: include/crypto/chacha.h:100: undefined reference to `= chacha_crypt_arch' > > ... > > Kconfig warnings: (for reference only) > > WARNING: unmet direct dependencies detected for CRYPTO_LIB_CHACHA20P= OLY1305 > > Depends on (CRYPTO_ARCH_HAVE_LIB_CHACHA || !CRYPTO_ARCH_HAVE_LIB_CHA= CHA && (CRYPTO_ARCH_HAVE_LIB_POLY1305 || !CRYPTO_ARCH_HAVE_LIB_POLY1305 && = CRYPTO > > Ok, this is either weird or I do not understand how the Kconfig system wo= rks. > > What I look at is CRYPTO_LIB_CHACHA20POLY1305 definition: > > [ lib/crypto/Kconfig ] > config CRYPTO_LIB_CHACHA20POLY1305 > tristate "ChaCha20-Poly1305 AEAD support (8-byte nonce library versio= n)" > depends on CRYPTO_ARCH_HAVE_LIB_CHACHA || !CRYPTO_ARCH_HAVE_LIB_CHACH= A > depends on CRYPTO_ARCH_HAVE_LIB_POLY1305 || !CRYPTO_ARCH_HAVE_LIB_POL= Y1305 > depends on CRYPTO > > and this test's random config (s390-buildonly-randconfig-r005-20220703): > > $ grep -e CRYPTO_LIB_CHACHA20POLY1305 -e CRYPTO_ARCH_HAVE_LIB_CHACHA > -e CRYPTO_ARCH_HAVE_LIB_POLY1305 -e CRYPTO=3D config > CONFIG_CRYPTO=3Dy > CONFIG_CRYPTO_ARCH_HAVE_LIB_CHACHA=3Dm > CONFIG_CRYPTO_LIB_CHACHA20POLY1305=3Dy > // missing CRYPTO_ARCH_HAVE_LIB_POLY1305 implies =3Dn (I guess?) > > I'm following the canonical "Kconfig Language" doc ( > https://www.kernel.org/doc/html/latest/kbuild/kconfig-language.html ) > which states: > > > - dependencies: =E2=80=9Cdepends on=E2=80=9D > > This defines a dependency for this menu entry. If multiple dependencies= are defined, they are connected with =E2=80=98&&=E2=80=99. > > and > > > '!' (6) > > '&&' (7) > > '||' (8) > > > > 6. Returns the result of (2-/expr/). > > 7. Returns the result of min(/expr/, /expr/). > > 8. Returns the result of max(/expr/, /expr/). > > An expression can have a value of =E2=80=98n=E2=80=99, =E2=80=98m=E2=80= =99 or =E2=80=98y=E2=80=99 (or 0, 1, 2 respectively for calculations). > > So calculating: > > (CRYPTO_ARCH_HAVE_LIB_CHACHA || !CRYPTO_ARCH_HAVE_LIB_CHACHA) && > (CRYPTO_ARCH_HAVE_LIB_POLY1305 || !CRYPTO_ARCH_HAVE_LIB_POLY1305) && > CRYPTO > > I find it equal to: > > (m || !m) && (n || !n) && y =3D> m && y && y =3D> m > > So CRYPTO_LIB_CHACHA20POLY1305 should be no higher than M, but it is > =3DY in a config file =3D> weird :\ (or me wrong somewhere). > > WDYT? Ok, I should have tested this beforehand. With the configs set as above: CONFIG_CRYPTO=3Dy CONFIG_CRYPTO_CHACHA20_X86_64=3Dm // implies the next line =3Dm CONFIG_CRYPTO_ARCH_HAVE_LIB_CHACHA=3Dm CONFIG_CRYPTO_ARCH_HAVE_LIB_POLY1305 is not set // =3Dn "make menuconfig" allows only =3Dn and =3Dm for CRYPTO_LIB_CHACHA20POLY1305= indeed. So the test robot has fed an invalid config to a build process. Let me forward this thread to lkp@lists.01.org to report this issue. Best regards, Vladis Dronov | Red Hat, Inc. | The Core Kernel | Senior Software Engineer