From patchwork Mon Sep 20 10:05:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 514307 Delivered-To: patch@linaro.org Received: by 2002:a02:c816:0:0:0:0:0 with SMTP id p22csp1897173jao; Mon, 20 Sep 2021 03:06:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyOz/DyPg86GI+FnToRm14UN6qRDYj0pSuH2j+bijJmH/p9kFPCRrxTc4E3AtStwbVfUgfL X-Received: by 2002:a05:6402:1c97:: with SMTP id cy23mr28313717edb.241.1632132361467; Mon, 20 Sep 2021 03:06:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632132361; cv=none; d=google.com; s=arc-20160816; b=D8sbNRxidcgz/FgBEKFnRnE/fypkvVfTllFs+2kciVfMLDbVGCMXKm9EECruKYKfda 61BhnqolQXmAQbyVvwok9PEtNC93fK/75swoLNyd2kKoL8uGvcvDUZD0dM/Lot3ITkBf iJdUmI9YbXjyrihFGLE8I2i6GoXQnYLd7pfuVTMmVlnKDZmhpJiDuJV1j/b1ZqRrI8ey xU1rHuTZbJvtGtoKe+A53XWUQzw0Ehz2UR3+FEMqgXdvzrwXt7vvmDuJpBUVZvl8JOxb dqzjvR54G4gBYd6B/2I3+727qY5rYRywNCfLztYgLFsOIX+2mEVHmXaTxyhRa8dKxFzp pYBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=zSgQZhd/qsYnoGPpxuDHtQXXmjCFTcYToQ7fVeqUx+w=; b=OpGHDWaYZcpNRjLmr718USK4seqET2KRNIEdGYfN0n+L3qw8wXzYZFIfJVp90ZHXJH WntxbX2wwr1xq6lE25Kda1WZX1RzCxDLHuwy/EPyacWonypPzQru3bMshrEl4iNCIj54 slZ3eP//5Mfi2YWC2YQ+2wDn5SXUZZj9r6Dk9jumFW1MmIfzdS5T96yXdhkzwjmtGxLR Y58X3996Rv05Yq4NYs9uEmYZQscYE1A8NhU5Bs1VKoEnPFNePY36VqSccGzHhgZLS4QD 7kdooKU4ln7TYRhUodzkbBcoHsYfaWgyOZaVaM7AtwTGB11GnY03C1vnMpEam+mVUeOb LRzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TWh7aaNP; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c19si16586561ejj.716.2021.09.20.03.06.01; Mon, 20 Sep 2021 03:06:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TWh7aaNP; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230175AbhITKHZ (ORCPT + 3 others); Mon, 20 Sep 2021 06:07:25 -0400 Received: from mail.kernel.org ([198.145.29.99]:46228 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231182AbhITKHW (ORCPT ); Mon, 20 Sep 2021 06:07:22 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6FF5760F5D; Mon, 20 Sep 2021 10:05:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1632132356; bh=mEIhB5gFO41gQ3sUmqJQlg/kWWUDHL4ECHOeQmvQpg8=; h=From:To:Cc:Subject:Date:From; b=TWh7aaNP0ht/JZhEtvnli9sWjRSesj7JtMP1fhpkq/Ox6LbM8AIvwD3rMhYAdffZx DflCXf/CEy6LwylZWp8KNf1t21ESsN1wyu9afVi1xJXkb1y2R3+eXuRvGd2GqnprTC IAVp/G8ruQXI2gryAgv4TFgr3cwi3z8ZKMfJAiV1+Gv9fG91wT2WGUmKZ+i4+9DGet RluQGa6j62yzuh21hSnmars9IXYDzPZwP/HGPji3w7pSl1wi7JnOA7/1hvCc5gEn5R hCZA3EPTg4tULLUH/gVasPIZBSqNsEGhqVTTMLga+ZaZDcfhvTW3hB5+M84RRhw/G4 0p8mQnqU74Juw== From: Arnd Bergmann To: Herbert Xu , "David S. Miller" , Vitaly Chikunov , Stefan Berger Cc: Arnd Bergmann , Ard Biesheuvel , Eric Biggers , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] crypto: ecc: fix CRYPTO_DEFAULT_RNG dependency Date: Mon, 20 Sep 2021 12:05:35 +0200 Message-Id: <20210920100551.1568868-1-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org From: Arnd Bergmann The ecc.c file started out as part of the ECDH algorithm but got moved out into a standalone module later. It does not build without CRYPTO_DEFAULT_RNG, so now that other modules are using it as well we can run into this link error: aarch64-linux-ld: ecc.c:(.text+0xfc8): undefined reference to `crypto_default_rng' aarch64-linux-ld: ecc.c:(.text+0xff4): undefined reference to `crypto_put_default_rng' Move the 'select CRYPTO_DEFAULT_RNG' statement into the correct symbol. Fixes: 0d7a78643f69 ("crypto: ecrdsa - add EC-RDSA (GOST 34.10) algorithm") Fixes: 4e6602916bc6 ("crypto: ecdsa - Add support for ECDSA signature verification") Signed-off-by: Arnd Bergmann --- crypto/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.29.2 Reviewed-by: Stefan Berger diff --git a/crypto/Kconfig b/crypto/Kconfig index 536df4b6b825..285f82647d2b 100644 --- a/crypto/Kconfig +++ b/crypto/Kconfig @@ -233,12 +233,12 @@ config CRYPTO_DH config CRYPTO_ECC tristate + select CRYPTO_RNG_DEFAULT config CRYPTO_ECDH tristate "ECDH algorithm" select CRYPTO_ECC select CRYPTO_KPP - select CRYPTO_RNG_DEFAULT help Generic implementation of the ECDH algorithm