Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp318488pxb; Mon, 13 Sep 2021 20:31:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzktxEvJRw/1R4J2NjG91fAbCdjHrJTnlWiLtfnkP1R/PY6OIrfKRLthxW8LqTytlN/l8uu X-Received: by 2002:a05:6402:5110:: with SMTP id m16mr17339442edd.281.1631590318083; Mon, 13 Sep 2021 20:31:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631590318; cv=none; d=google.com; s=arc-20160816; b=YbxY9qFqcqUm9QVqIUhdE4Uo+mvFCRLi0MJYqnEW94qDU21Tf9DGwyKxLc9w4M9zFy UuNMQLP4sUZbCdrLvxY0xYh0cKR2tMEPcA0GF1vDwJRFWAoSivh0xqUZqVEbbECQCkqS 5/4nV6VSAsUIHAODyZmWevTukOr6l9mtLrV0FcpxfBtghUwZxM52tfdmfUiXoMyyzlRg 8WDj3caynNWZhjuIieH16+QCBCo75aAOYWeBxCysP6cyBWb+N5ByMX0n7G6r3rL2JRLq /68/ykQKCMT/rN4QIehrUqNvOhMWQ2p+FyUMG12C8YHR/KZITU8jVT2l3hZoI5Q61kxn fVqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=Hy3vMlHojIL9qrfxR2BT66whnViK8Idi+jdSC6Dysuk=; b=s3SPJ5ourIdQ3U73KdQXc6hoddgLZawwYayf9ZHzPuYQ+QfYp05mSdAy3jmUkuuvLG 3gbSIQurOginYAWV9EU/BFiwYvCpnxbUl0D68xyvJ4Yn/v1/gG+zG8MaZiXbaHVr0B+Z C54ZdR8zgp+PvJBbOtY4Xh2kSTwYVFWttNQBC2q/Vn4eJkXXVq0/rRIE4wQqLPycZmKd PMPkoR3BCw1+2QMkLZSWPN89wVd1J75zPpWTt5cOfLkCv65xGHzlerWyW71uQa5I643j Nd6Z3TEL/FV8mtRqYLIFHpGebGEWkgNyN7uyBCFdz4ZWvY0W0+4rBHqeKhi8jk1eDWuc 1Qlw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hx12si6055616ejc.672.2021.09.13.20.31.24; Mon, 13 Sep 2021 20:31:58 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238594AbhINDaR (ORCPT + 99 others); Mon, 13 Sep 2021 23:30:17 -0400 Received: from helcar.hmeau.com ([216.24.177.18]:55126 "EHLO deadmen.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238424AbhINDaR (ORCPT ); Mon, 13 Sep 2021 23:30:17 -0400 Received: from gondobar.mordor.me.apana.org.au ([192.168.128.4] helo=gondobar) by deadmen.hmeau.com with esmtp (Exim 4.92 #5 (Debian)) id 1mPz7z-00042R-AX; Tue, 14 Sep 2021 11:28:59 +0800 Received: from herbert by gondobar with local (Exim 4.92) (envelope-from ) id 1mPz7y-0005Yj-BX; Tue, 14 Sep 2021 11:28:58 +0800 Date: Tue, 14 Sep 2021 11:28:58 +0800 From: Herbert Xu To: Eric Biggers Cc: Linux Crypto Mailing List , Vladis Dronov , Simo Sorce Subject: Re: [PATCH] crypto: api - Fix built-in testing dependency failures Message-ID: <20210914032858.GA19339@gondor.apana.org.au> References: <20210913071251.GA15235@gondor.apana.org.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Mon, Sep 13, 2021 at 11:16:03AM -0700, Eric Biggers wrote: > > Are there any specific examples that you could give? The one that triggered this was ecdh-nist-p256-generic, which calls into drbg. Both ecdh and drbg are at level subsys_initcall so the order between them is random. Beyond this, obviously we have already moved many algorithms ot subsys_initcall precisely for this purpose and with this patch, they can all be moved back to module_init. > 'tested' is set before the algorithm has actually been tested, and it sounds > like the same as CRYPTO_ALG_TESTED which already exists. Maybe it should be > called something else, like 'test_started'? Sure, I can rename that. > Is there a way to continue iterating from the previous algorithm, so that this > doesn't take quadratic time? It's certainly possible to optimise this, but I'm not inclined to do it unless someone can show me that it's a real issue :) The simplest way to optimise this would be to create a separate list for the test larvae. > A comment explaining why the tests aren't run until late_initcall would be > helpful. People shouldn't have to dig through commit messages to understand the > code. Sure. > Also, did you check whether there is anything that relies on the crypto API > being available before or during late_initcall? That wouldn't work with this > new approach, right? The patch is supposed to deal with that scenario by starting the test on-demand should someone request for it before late_initcall. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt