[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAMj1kXFUG8Q8YB4M1GBsjcehrSMH8DYcPu4dFebxVAiZdew2gA@mail.gmail.com>
Date: Tue, 1 Dec 2020 09:37:02 +0100
From: Ard Biesheuvel <ardb@...nel.org>
To: Tianjia Zhang <tianjia.zhang@...ux.alibaba.com>
Cc: Herbert Xu <herbert@...dor.apana.org.au>,
Vitaly Chikunov <vt@...linux.org>,
"David S. Miller" <davem@...emloft.net>,
Linux Crypto Mailing List <linux-crypto@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] crypto: ecrdsa - use subsys_initcall instead of module_init
On Mon, 30 Nov 2020 at 07:58, Tianjia Zhang
<tianjia.zhang@...ux.alibaba.com> wrote:
>
>
>
> 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.
>
Whether or not it is a generic algorithm is irrelevant.
What is relevant is whether any other implementations exist of the
same algorithm, because in this case, the generic implementation must
be available earlier, so that it can be used for testing the other
implementation.
This concern does not apply for ecrdsa, so this patch is unnecessary.
Powered by blists - more mailing lists