[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7fcc8361-7928-3e56-686b-9382bef9107e@nxp.com>
Date: Fri, 21 Aug 2020 15:02:48 +0300
From: Horia Geantă <horia.geanta@....com>
To: Herbert Xu <herbert@...dor.apana.org.au>
Cc: "Andrei Botila (OSS)" <andrei.botila@....nxp.com>,
Aymen Sghaier <aymen.sghaier@....com>,
"David S. Miller" <davem@...emloft.net>,
"linux-crypto@...r.kernel.org" <linux-crypto@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH RESEND 1/9] crypto: caam/jr - add fallback for XTS with
more than 8B IV
On 8/21/2020 6:47 AM, Herbert Xu wrote:
> On Tue, Aug 11, 2020 at 05:30:41PM +0300, Horia Geantă wrote:
>>
>>> + if (IS_ERR(fallback)) {
>>> + pr_err("Failed to allocate %s fallback: %ld\n",
>>> + tfm_name, PTR_ERR(fallback));
>>> + return PTR_ERR(fallback);
>> Shouldn't error out so early. It might be that the fallback won't be needed.
>> Let's postpone this until we're sure fallback is required.
>
> Why? The generic should always be there as otherwise you won't
> even pass the self-test. If we're OOM then we should error out
> ASAP.
>
self-tests don't check the cases where a fallback is needed,
so in theory things could go well for a misconfigured kernel
(where a fallback is not available).
But I agree, if driver is updated to select CRYPTO_XTS
then it's probably better to return an error here.
Thanks,
Horia
Powered by blists - more mailing lists