From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CABE6C433E3 for ; Fri, 21 Aug 2020 03:47:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B23C62076E for ; Fri, 21 Aug 2020 03:47:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728095AbgHUDrt (ORCPT ); Thu, 20 Aug 2020 23:47:49 -0400 Received: from helcar.hmeau.com ([216.24.177.18]:49744 "EHLO fornost.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727859AbgHUDrt (ORCPT ); Thu, 20 Aug 2020 23:47:49 -0400 Received: from gwarestrin.arnor.me.apana.org.au ([192.168.0.7]) by fornost.hmeau.com with smtp (Exim 4.92 #5 (Debian)) id 1k8y1l-0008RK-9o; Fri, 21 Aug 2020 13:47:42 +1000 Received: by gwarestrin.arnor.me.apana.org.au (sSMTP sendmail emulation); Fri, 21 Aug 2020 13:47:41 +1000 Date: Fri, 21 Aug 2020 13:47:41 +1000 From: Herbert Xu To: Horia =?utf-8?Q?Geant=C4=83?= Cc: "Andrei Botila (OSS)" , Aymen Sghaier , "David S. Miller" , "linux-crypto@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH RESEND 1/9] crypto: caam/jr - add fallback for XTS with more than 8B IV Message-ID: <20200821034741.GB25442@gondor.apana.org.au> References: <20200806163551.14395-1-andrei.botila@oss.nxp.com> <20200806163551.14395-2-andrei.botila@oss.nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt