Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp18026771ybl; Thu, 2 Jan 2020 17:03:51 -0800 (PST) X-Google-Smtp-Source: APXvYqwNZ7/mSsq4o6Yg7g9y/NZ1tu4BEfAyaleXP5pBhO/tBWlp35oVYramwzqTEDAgj73DpNut X-Received: by 2002:a9d:12f1:: with SMTP id g104mr98360871otg.334.1578013431706; Thu, 02 Jan 2020 17:03:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578013431; cv=none; d=google.com; s=arc-20160816; b=DJSHH8oq4QEMdymN5eundMFuVyryoC1yxXnk8V1YTwqLNmsCgKHvOP1+sFtZzymcIp xK73TL3fDo/6tAJ9iuMeEfHBXfismzRwtetAQeYDtOkPpsCwmYHdwsVYw0cmx65th1I7 nk72cjuz/fX4etgiEHfWqfeqifmi+WX5f0Y/q7lO2qGizxSq61I0Rsq1iRi5CnjIJYeE aBL+WWgI9LZt1tyRKr21hl6m0tng89kW7E+XYArT8ajvhfov6uL45XKgTQ1yro4i+5Qr FtYGVtiws53lm/X9AKOxgO/eJST7Yr+7q5fQj9u2qoEMJ0XWjx2kaez7CxJKU0snZ/F2 EX1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=0n5CHxyC9F4C4lUl1usgtrokUD9tOYgXYbZSv2wRA2s=; b=gQEDEy5Y383d7jS6Qy4FEHaY0DAIRsbTh1N+XSNvAnyUAIvEVa0zqWD1RhfXaPBAuY N3gNpAWOVCKBVDDu9yymAcLeD0k7FIrFrJDEmbIRIYu4Eq29RrisZe1jpNW03qG2fD3l llTgpBeoC1CWoGcONuk4LvRViCqfKg5o36t8Lj6zeYC+lRnQ/Fh+cIN+Fc42i+/N7Nhl WxhKu4Mlg3IyZi+2qOGiXC4MpaID2bnHOYgJA4f06SmhpVStj060bkjsmfbPJL+ljgBt DGc4WAppAMOFeg8/k1FbKcf3KwpmkzjO/kMNGsvxI49aw/1ve4QW88TqGBEL1o4MMkXQ rGqw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z24si22327294otm.101.2020.01.02.17.03.29; Thu, 02 Jan 2020 17:03:51 -0800 (PST) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726148AbgACBDT (ORCPT + 99 others); Thu, 2 Jan 2020 20:03:19 -0500 Received: from inva020.nxp.com ([92.121.34.13]:47460 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727134AbgACBDT (ORCPT ); Thu, 2 Jan 2020 20:03:19 -0500 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 6107A1A1B0C; Fri, 3 Jan 2020 02:03:12 +0100 (CET) Received: from inva024.eu-rdc02.nxp.com (inva024.eu-rdc02.nxp.com [134.27.226.22]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 543001A1B0B; Fri, 3 Jan 2020 02:03:12 +0100 (CET) Received: from lorenz.ea.freescale.net (lorenz.ea.freescale.net [10.171.71.5]) by inva024.eu-rdc02.nxp.com (Postfix) with ESMTP id 0416B205C2; Fri, 3 Jan 2020 02:03:11 +0100 (CET) From: Iuliana Prodan To: Herbert Xu , Horia Geanta , Aymen Sghaier Cc: "David S. Miller" , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, linux-imx , Iuliana Prodan Subject: [PATCH v2 00/10] crypto: caam - backlogging support Date: Fri, 3 Jan 2020 03:02:43 +0200 Message-Id: <1578013373-1956-1-git-send-email-iuliana.prodan@nxp.com> X-Mailer: git-send-email 2.1.0 X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Integrate crypto_engine framework into CAAM, to make use of the engine queue. Added support for SKCIPHER, HASH, RSA and AEAD algorithms. This is intended to be used for CAAM backlogging support. The requests, with backlog flag (e.g. from dm-crypt) will be listed into crypto-engine queue and processed by CAAM when free. While here, I've also made some refactorization. Patches #1 - #4 include some refactorizations on caamalg, caamhash and caampkc. Patches #5, #6 change the return code of caam_jr_enqueue function to -EINPROGRESS, in case of success, -ENOSPC in case the CAAM is busy, -EIO if it cannot map the caller's descriptor. Also, to keep each request information, like backlog flag, a new struct is passed as argument to enqueue function. Patches #7 - #10 integrate crypto_engine into CAAM, for SKCIPHER/AEAD/RSA/HASH algorithms. --- Changes since V1: - remove helper function - akcipher_request_cast; - remove any references to crypto_async_request, use specific request type; - remove bypass crypto-engine queue, in case is empty; - update some commit messages; - remove unrelated changes, like whitespaces; - squash some changes from patch #9 to patch #6; - added Reviewed-by. --- Iuliana Prodan (10): crypto: caam - refactor skcipher/aead/gcm/chachapoly {en,de}crypt functions crypto: caam - refactor ahash_done callbacks crypto: caam - refactor ahash_edesc_alloc crypto: caam - refactor RSA private key _done callbacks crypto: caam - change return code in caam_jr_enqueue function crypto: caam - refactor caam_jr_enqueue crypto: caam - support crypto_engine framework for SKCIPHER algorithms crypto: caam - add crypto_engine support for AEAD algorithms crypto: caam - add crypto_engine support for RSA algorithms crypto: caam - add crypto_engine support for HASH algorithms drivers/crypto/caam/Kconfig | 1 + drivers/crypto/caam/caamalg.c | 450 +++++++++++++++++++---------------------- drivers/crypto/caam/caamhash.c | 357 +++++++++++++++++--------------- drivers/crypto/caam/caampkc.c | 205 ++++++++++++------- drivers/crypto/caam/caampkc.h | 22 ++ drivers/crypto/caam/caamrng.c | 4 +- drivers/crypto/caam/intern.h | 3 + drivers/crypto/caam/jr.c | 37 +++- drivers/crypto/caam/key_gen.c | 2 +- 9 files changed, 597 insertions(+), 484 deletions(-) -- 2.1.0