Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp5149217pxb; Tue, 28 Sep 2021 11:33:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyv8soiYIXnDw5Ua/fIG8tB9NO5rEdkuEje1s2lrc4Ppp2yROXX6D3M1WdziNnz+1uZ/uMT X-Received: by 2002:a17:90a:9f95:: with SMTP id o21mr1443738pjp.21.1632854007992; Tue, 28 Sep 2021 11:33:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632854007; cv=none; d=google.com; s=arc-20160816; b=eGIAG7dRBYGsRlBt9hNB1iyq+opHakgBPL3O35dQDHeULfhqZgStj9ZT+B+iEeNFYb dcUBYNnzKRDk9k4B43XPFilL4I7EkrXKtqiHyS6VCFJQ29ORlEtBwIH4UiRby0HTHB2y 9i4WA7rVZ3/GSldpP1j7QCU53u1tV0j/cc4FYwP8aXJWthwEZwFtHHMLk7ppeEy+eA66 lEwgXXYHN1R5P2JhZ7JpM6ZhDmILpFJqZSBE+h/V/XR9u0AxcYQ92vtY61Vy8hvTqTJj f2hvf051wBg8ONjJeIO+ujaGFZKB2kVtUSljuOzr9VvXKcS/yq6x1NN2Tlw8atMpMQFF lUqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=kRih3VQ+jy7k87HqlBWsMt5YIDL5m/OaPczLo8E/SNc=; b=j4jOVCTiRuoXyns08BjF7yRikT1TN9rvelxE0FXmJ6vCbDMi/DWERam4F2AHN5YXvs nmijeX9SiSR2XQwskmFFXEn0p/h5o3IvXhdrV9U2LtocTJr40/xMG3c+rQ9EA2+mkZn7 Ol0Znf9FNx0wg1z8ozNfuJMImpc7aRa1hbQrUZ95pNwjnKnf9XtTsF8BrmzQvW1kvbkn X47MqCc+A7N1u9oZc/ITWJDmVEtC+VVIppu5cD8uE9vCxq7TFRdzM4lNvmMWMRwEZKkm doDPFzgPMHzjbSEKBnzzKR1CyMPPe4Sh3E3mEActQ8+9HrezvV0k8iSLdcCmiXekOvrR /tbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=VaC3EgKS; 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 s20si4519165pjn.20.2021.09.28.11.33.04; Tue, 28 Sep 2021 11:33:27 -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=VaC3EgKS; 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 S230287AbhI1Seh (ORCPT + 99 others); Tue, 28 Sep 2021 14:34:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:42330 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241724AbhI1Sdz (ORCPT ); Tue, 28 Sep 2021 14:33:55 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4761861246; Tue, 28 Sep 2021 18:32:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1632853933; bh=ITumyMSLVuu7tgo4iRF6EGhJy0N7SHomYPhr6cSr0MI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=VaC3EgKSrHGizNtBgdPVNZzinC4iR1U0WSkLghN+fHfbtWd7dYGoUB2w1IZ2nHo0N aR/koF6+R91rbaE36NwCaK7XMe0BkSH8XqyyMdCVV+DMExUCgCzfDAPuTOVWmE3V6R khIyqvTQDIPQ3/HnlHXJV65m902aJ1FY/qapyy+akG7rPX27khZHMPjGSmt1bzAqTN VzW8dccLjOD7BAdqCAFdNZDM0TJ99Hi+/646v67sLa0cGTkF8HkkDPszPSNQRX+1r9 Xei6OpzlxS/05iY90x9qK3uCL0LaTetJsInjTyvMyw2/0UeXsu0JtESBhG6rCayGxO uOlMPA9hglGRQ== Date: Tue, 28 Sep 2021 11:32:09 -0700 From: Nathan Chancellor To: Herbert Xu Cc: Linux Crypto Mailing List , Vladis Dronov , Simo Sorce , Eric Biggers , llvm@lists.linux.dev Subject: Re: [v2 PATCH] crypto: api - Fix built-in testing dependency failures Message-ID: References: <20210913071251.GA15235@gondor.apana.org.au> <20210917002619.GA6407@gondor.apana.org.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210917002619.GA6407@gondor.apana.org.au> Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Fri, Sep 17, 2021 at 08:26:19AM +0800, Herbert Xu wrote: > When complex algorithms that depend on other algorithms are built > into the kernel, the order of registration must be done such that > the underlying algorithms are ready before the ones on top are > registered. As otherwise they would fail during the self-test > which is required during registration. > > In the past we have used subsystem initialisation ordering to > guarantee this. The number of such precedence levels are limited > and they may cause ripple effects in other subsystems. > > This patch solves this problem by delaying all self-tests during > boot-up for built-in algorithms. They will be tested either when > something else in the kernel requests for them, or when we have > finished registering all built-in algorithms, whichever comes > earlier. > > Reported-by: Vladis Dronov > Signed-off-by: Herbert Xu This patch as commit 3cefb01905df ("crypto: api - Fix built-in testing dependency failures") in -next (along with the follow up fix) causes the following depmod error: $ make -skj"$(nproc)" ARCH=powerpc CROSS_COMPILE=powerpc-linux- INSTALL_MOD_PATH=rootfs ppc44x_defconfig all modules_install depmod: ERROR: Cycle detected: crypto -> crypto_algapi -> crypto depmod: ERROR: Found 2 modules in dependency cycles! make: *** [Makefile:1946: modules_install] Error 1 Initially reported on our CI: https://github.com/ClangBuiltLinux/continuous-integration2/runs/3732847295?check_suite_focus=true Cheers, Nathan