Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp7778667ybh; Thu, 8 Aug 2019 23:19:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqyCw4QTRbTrdnypWJSTXiGLtqkdazgyQjmtgVd87Npnx2roPI7bJeaGADdxVZA1uAHnQsVa X-Received: by 2002:a17:902:5983:: with SMTP id p3mr7684693pli.232.1565331589782; Thu, 08 Aug 2019 23:19:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565331589; cv=none; d=google.com; s=arc-20160816; b=vleaIh7qDTlAFfl0xV4391kCYbZ5Gm9p7OUIGDYVIOMPDVrNvkqcTOoLWkrv6x76VM 09S/60Q9jSv3ljcl3jGR+OYAnTvo++2qrFI669wFMqdlWyWEyQqBKdNSKnA1xNQD9z6y GOHPQIEGIkQkRrGxvfXJTwhONR6v1H2E9R/EnigK0UbCIwPTRiAqrLqRP8ban70IoPNp uoMg8hlXM4Wm7j8R0DSYHi/n1EQCS2rmfXPNDc9MfWZ/75TuwPjybN/9t6twqIHVtAxP iF7cmeZMga8PTmEusIpUW9W8nkWwWfJMEI9bnJowjaY1oCQdZukn8LU3lLQtcaIuOSOj Y7Kg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=FiMUdjVUF19HnAw5Q/O+ppvH6AaMUPjezHmBQuGq0u8=; b=fBmAKrr8ZXgdmDQcg0Oh+QGJgAJYobfDxJ/H8ijKvrZSpgWejjPYN1QUxtsj2Ac1hg xLgYhlGDkqISZtazTVIZ2MRIH1fqutcmdzFi7+DzcVJB0l/LdFezcmdWOD+GI/Lh9kxh XdehdxnrUNKzW6PpE5HCxdw6NV5TVrMi70Lr9stzvTrhdkmy6f9h5cmUroOb2GPUIky7 hmZvnep501fp+yYMOoKPmB0xbUjRj+qRvcG9v2RsnfessKgnPYDJwmI4kRHgDWSPUF6T LhGcBydEZbHE4C6mTrk4Ptgl9dpbcjmGKVfG93GnRmN4eKsYvhsNQFL+fcxb3sI7qCjS i1aA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 1si3469665plq.153.2019.08.08.23.19.36; Thu, 08 Aug 2019 23:19:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2405584AbfHIGTF (ORCPT + 99 others); Fri, 9 Aug 2019 02:19:05 -0400 Received: from helcar.hmeau.com ([216.24.177.18]:37422 "EHLO fornost.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725920AbfHIGTF (ORCPT ); Fri, 9 Aug 2019 02:19:05 -0400 Received: from gondolin.me.apana.org.au ([192.168.0.6] helo=gondolin.hengli.com.au) by fornost.hmeau.com with esmtps (Exim 4.89 #2 (Debian)) id 1hvyEw-0007Mx-6c; Fri, 09 Aug 2019 16:19:02 +1000 Received: from herbert by gondolin.hengli.com.au with local (Exim 4.80) (envelope-from ) id 1hvyEv-0002p9-CJ; Fri, 09 Aug 2019 16:19:01 +1000 Date: Fri, 9 Aug 2019 16:19:01 +1000 From: Herbert Xu To: Iuliana Prodan Cc: Horia Geanta , Aymen Sghaier , "David S. Miller" , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, linux-imx Subject: Re: [PATCH v5 00/14] crypto: caam - fixes for kernel v5.3 Message-ID: <20190809061901.GL10392@gondor.apana.org.au> References: <1564578495-9883-1-git-send-email-iuliana.prodan@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1564578495-9883-1-git-send-email-iuliana.prodan@nxp.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Wed, Jul 31, 2019 at 04:08:01PM +0300, Iuliana Prodan wrote: > The series solves: > - the failures found with fuzz testing; > - resources clean-up on caampkc/caamrng exit path. > > The first 10 patches solve the issues found with > CONFIG_CRYPTO_MANAGER_EXTRA_TESTS enabled. > They modify the drivers to provide a valid error (and not the hardware > error ID) to the user, via completion callbacks. > They check key length, assoclen, authsize and input size to solve the > fuzz tests that expect -EINVAL to be returned when these values are > not valid. > > The next 4 patches check the algorithm registration for caampkc > module and unregister it only if the registration was successful. > Also, on caampkc/caamrng, the exit point function is executed only if the > registration was successful to avoid double freeing of resources in case > the initialization function failed. > > This patch depends on series: > https://patchwork.kernel.org/project/linux-crypto/list/?series=153441 > > Changes since v4: > - use, newly renamed, helper aes function, to validate keylen. > > Horia Geantă (5): > crypto: caam/qi - fix error handling in ERN handler > crypto: caam - fix return code in completion callbacks > crypto: caam - update IV only when crypto operation succeeds > crypto: caam - keep both virtual and dma key addresses > crypto: caam - fix MDHA key derivation for certain user key lengths > > Iuliana Prodan (9): > crypto: caam - check key length > crypto: caam - check authsize > crypto: caam - check assoclen > crypto: caam - check zero-length input > crypto: caam - update rfc4106 sh desc to support zero length input > crypto: caam - free resources in case caam_rng registration failed > crypto: caam - execute module exit point only if necessary > crypto: caam - unregister algorithm only if the registration succeeded > crypto: caam - change return value in case CAAM has no MDHA > > drivers/crypto/caam/Kconfig | 2 + > drivers/crypto/caam/caamalg.c | 227 +++++++++++++++---------- > drivers/crypto/caam/caamalg_desc.c | 47 ++++-- > drivers/crypto/caam/caamalg_desc.h | 2 +- > drivers/crypto/caam/caamalg_qi.c | 225 +++++++++++++++---------- > drivers/crypto/caam/caamalg_qi2.c | 320 +++++++++++++++++++++++------------- > drivers/crypto/caam/caamhash.c | 114 ++++++++----- > drivers/crypto/caam/caamhash_desc.c | 5 +- > drivers/crypto/caam/caamhash_desc.h | 2 +- > drivers/crypto/caam/caampkc.c | 80 ++++++--- > drivers/crypto/caam/caamrng.c | 17 +- > drivers/crypto/caam/desc_constr.h | 34 ++-- > drivers/crypto/caam/error.c | 61 ++++--- > drivers/crypto/caam/error.h | 2 +- > drivers/crypto/caam/key_gen.c | 14 +- > drivers/crypto/caam/qi.c | 10 +- > drivers/crypto/caam/regs.h | 1 + > 17 files changed, 748 insertions(+), 415 deletions(-) All applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt