Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp3303384pxu; Sun, 29 Nov 2020 22:58:43 -0800 (PST) X-Google-Smtp-Source: ABdhPJw3MDu96w/TmKv5AnHxQm6KkSekSY+PBQl0QjNpTp3gwvK2xK7mR8EvvSJFZzgEQrAZw5Vs X-Received: by 2002:a50:d493:: with SMTP id s19mr7587780edi.104.1606719523639; Sun, 29 Nov 2020 22:58:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606719523; cv=none; d=google.com; s=arc-20160816; b=Md8/teF59gu8tA779QdiM9yHYrRHh9/aIJWpLgVdpvSy28mqaDiaRm06NOrYDynla/ 9I36EHhpeH0c81RbRIrCk8DHCC34C+uXGDAP0BWNnUszZAXXU7CzXK45iA07os0Izwgo WigGgTD6YiGhaF8c3mrz0BL3EXleP8Sg5ffi6/5BPi33twMQyUTThwHLtp3ofsq9OMBf r4BgiVPgv2DUiQvTS5Drp1Uo+mN9cniBFpPEif5t1DmCdKwZAX6Rt6lDCtAcPC6OM/F2 4jUlgXzNhjHO3vviizJ58x5Lq3yB9Dxe2jhHeHFt4AY4dPSAOpEbT7cwd9+0Mty6KYd8 Boqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=xSiduJ9fifTpx5McL5PDn+UIEaoZCceQXpBbLt6XzI4=; b=TLKAyQLtlDeTfQfsf3fL9dGUl0yU0bj6et0ZpHEr6U0S8ywC8MXoiU2HtNDogn86Dh 8anNfrouQHvHmuvJHSEtNT2pzuz/cHoAhzLgHXS1jnaINFKzmCW1+8WEon2XHhEyGde7 0jYmlu4FlJU8qikEuICp5ytZEBOa6p3dE/3YUe/oz29foJF+qSyu4uMP1t5MOcJozwhy sIdUUbguvpgWpcopnTaqaSlWzcDXWluvHoxB+MKegtXYTDC2dPH75rFR9MIyU6dXp88W faH1PVVh7ithx7BAQ0RhORc5LGTqCbatM9bjhUnC+yQs27XkiDgMDsGgYAARJXwSIwnN EtRg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v15si10301198ejx.615.2020.11.29.22.58.03; Sun, 29 Nov 2020 22:58:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-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-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725976AbgK3GzF (ORCPT + 99 others); Mon, 30 Nov 2020 01:55:05 -0500 Received: from out4436.biz.mail.alibaba.com ([47.88.44.36]:50550 "EHLO out4436.biz.mail.alibaba.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725884AbgK3GzF (ORCPT ); Mon, 30 Nov 2020 01:55:05 -0500 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R191e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=alimailimapcm10staff010182156082;MF=tianjia.zhang@linux.alibaba.com;NM=1;PH=DS;RN=5;SR=0;TI=SMTPD_---0UGwypdg_1606719263; Received: from B-455UMD6M-2027.local(mailfrom:tianjia.zhang@linux.alibaba.com fp:SMTPD_---0UGwypdg_1606719263) by smtp.aliyun-inc.com(127.0.0.1); Mon, 30 Nov 2020 14:54:23 +0800 Subject: Re: [PATCH] crypto: ecrdsa - use subsys_initcall instead of module_init To: Herbert Xu Cc: Vitaly Chikunov , "David S. Miller" , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org References: <20201015110241.89676-1-tianjia.zhang@linux.alibaba.com> <20201015120504.GA12976@gondor.apana.org.au> <20201130022422.GA21049@gondor.apana.org.au> From: Tianjia Zhang Message-ID: Date: Mon, 30 Nov 2020 14:54:23 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.4.3 MIME-Version: 1.0 In-Reply-To: <20201130022422.GA21049@gondor.apana.org.au> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/30/20 10:24 AM, Herbert Xu wrote: > On Mon, Nov 30, 2020 at 10:21:56AM +0800, Tianjia Zhang wrote: >> >>> That is true only if there are non-generic implementations of >>> the algorithms, which is not the case here. Please explain the >>> real reason why this is needed. >> >> This is a generic algorithm, the author Vitaly Chikunov has also confirmed >> it, please consider this patch again. > > As I said, the generic algorithm only needs to be loaded early *if* > there are non-generic implementations. > > Cheers, > For ecrdsa, there is no reason to advance the initialization to subsys_init, this is just to make code clean up to have algorithm initialization uniform with other implementations. It’s just that I think that in the commit c4741b230597 ("crypto: run initcalls for generic implementations earlier"), the modification to ecrdsa happened to be omitted, because from the point of commit time, it was submitted at the same time as the ecrdsa commits, and it may happen to be omitted for ecrdsa. Best regards, Tianjia