Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp5003694iob; Mon, 9 May 2022 06:43:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzGaFNbXSYYBUPmVQ4avTP61vDTcrYshasEQGbPHfZktbZkwOnkaaTFeoXNsm5cl+HmIjuq X-Received: by 2002:a63:2486:0:b0:3ab:84c3:864a with SMTP id k128-20020a632486000000b003ab84c3864amr13141965pgk.358.1652103823841; Mon, 09 May 2022 06:43:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652103823; cv=none; d=google.com; s=arc-20160816; b=oNpAypRT431zrdgK/CoOmQNhV6FKG2vM3KNEVls3xU3bBnwGru7peE0UrLbkNbwWzm tmlzsbnNwKW+VLxPf52t4D0O39yYeYYrLtzGnKxzs4lRQOJAt/+LmD2bYks5ByB88bHx HyCvpRTiyCnRcgNf1pEVYeGxL+SwnbfC1A1xiFWjQwh7PC2rQg+QPCUpszlAqJRTQBfq RiIMln/2Mbv0yxJJMM0HZipeicssUEr6v6PcX7UYx6c6K6h1C7rPF8iXrYwpv1FYpKmv O3l5PmmMAyUUBtZXrDEGCYvir+e/yYEmWzzP3CJ6/OFg+NbyqjOsjYl/R1+/KotZkzbF iadg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:organization :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=df7VuT9cWM0ByPYFTN47KnQ8ojM4VQ9Staf31jYChNM=; b=k+i5rn9Df+CynS0ZTNfQRR6QgrOfkSynFfBrlw6S6wMe566LKyUC7rjk+MAtqNg2UO +8OptvMXZRJD6+u0RxBqWaJdTJFZyF3lQWjooNCswqH+HIyGN6XsYjn559jTW8x9vun/ h7Ee7bnMUa4DVEp2/G9b0YNtcNRk6Zk+Eb4qb4YoLvdq//n3lRvj3v7tcAd1ttUT9I5O wU6aHDlCNuE88KDHNEWJVFCUCTw9FCaDMp4PVNYxmii4Mu9n/Pm1ZQiFCitKlmBRg+J7 Vnn1eR6L35qyXJOta6cMQn747o1XaalFb+MtAceqz8eY3gwpD0uDJwxYR2/B3JacQRe2 iHbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=juMveDsJ; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id r8-20020a635148000000b003c281e1fd7csi14734544pgl.214.2022.05.09.06.43.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 May 2022 06:43:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=juMveDsJ; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6153023BB7C; Mon, 9 May 2022 06:34:34 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236037AbiEINiZ (ORCPT + 99 others); Mon, 9 May 2022 09:38:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51924 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235972AbiEINiY (ORCPT ); Mon, 9 May 2022 09:38:24 -0400 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7A3E922A2F3 for ; Mon, 9 May 2022 06:34:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1652103270; x=1683639270; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=fJDtz5qyotD7Q0fNMrwQgjBWMRXBnOtlENsRarfqtEM=; b=juMveDsJA7zS8gxLlRdsUibMmkGQJsHjJn8htEsLqOnW1TJbWwfWs4DN lziaAuN5UYO3ItkXtHEeF5G9J+UbJjoKSWl2ff6Lur/SJKNio9H47lq2+ 6ngfkjx9VXOmIH+/72+1s8EduPKRwPZQrWwEJUl/J9SX91KeoQg5AdnDK 2pqWB4f0Vn9+2x2mhxLmPjeJTNHpJy3+8Y2u9PwmokB+QPG7VLSHYHTez eR+8O03BmXOBBmwAdbMPY5VErAb4ROBAHDRKrKguyntt6v6Derremto7m aP2zHGczNtbAqS45GL0wPo8eZiCSGuEdXjeA6f5zvUVxDERe+7/rPongG g==; X-IronPort-AV: E=McAfee;i="6400,9594,10341"; a="248952301" X-IronPort-AV: E=Sophos;i="5.91,211,1647327600"; d="scan'208";a="248952301" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 May 2022 06:34:29 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,211,1647327600"; d="scan'208";a="622967123" Received: from silpixa00400314.ir.intel.com (HELO silpixa00400314.ger.corp.intel.com) ([10.237.222.76]) by fmsmga008.fm.intel.com with ESMTP; 09 May 2022 06:34:27 -0700 From: Giovanni Cabiddu To: herbert@gondor.apana.org.au Cc: linux-crypto@vger.kernel.org, qat-linux@intel.com, Vlad Dronov , Giovanni Cabiddu Subject: [PATCH v3 00/10] crypto: qat - re-enable algorithms Date: Mon, 9 May 2022 14:34:07 +0100 Message-Id: <20220509133417.56043-1-giovanni.cabiddu@intel.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Organization: Intel Research and Development Ireland Ltd - Co. Reg. #308263 - Collinstown Industrial Park, Leixlip, County Kildare - Ireland Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org This set is an extension of a previous set called `crypto: qat - fix dm-crypt related issues` which aims to re-enable the algorithms in the QAT driver after [1]. This fixes a number of issues with the implementation of the QAT algs, both symmetric and asymmetric. In particular this set enables the QAT driver to handle correctly the flags CRYPTO_TFM_REQ_MAY_BACKLOG and CRYPTO_TFM_REQ_MAY_SLEEP, fixes an hidden issue in RSA and DH which appeared after commit f5ff79fddf0e, related to the usage of dma_free_coherent() from a tasklet, and includes important fixes in the akcipher algorithms. One item to mention is that, differently from the previous set, this one does not removes the flag CRYPTO_ALG_ALLOCATES_MEMORY which will be removed after the conversation in [2] is closed. [1] https://lore.kernel.org/linux-crypto/YiEyGoHacN80FcOL@silpixa00400314/ [2] https://lore.kernel.org/linux-crypto/Yl6PlqyucVLCzwF5@silpixa00400314/ Changes from v2: - Removed `crypto: qat - set to zero DH parameters before free` from set. - Added fixes tags to patches `crypto: qat - add param check for RSA` and `crypto: qat - add param check for DH` Changes from v1: - Clarified commit message in `crypto: qat - refactor submission logic` to indicate why the patch should be included in stable kernels - Removed `crypto: qat - use memzero_explicit() for algs` from set after feedback from Greg KH - Replaced memzero_explicit() with memset() in `crypto: qat - set to zero DH parameters before free` after feedback from Greg KH Giovanni Cabiddu (10): crypto: qat - use pre-allocated buffers in datapath crypto: qat - refactor submission logic crypto: qat - add backlog mechanism crypto: qat - fix memory leak in RSA crypto: qat - remove dma_free_coherent() for RSA crypto: qat - remove dma_free_coherent() for DH crypto: qat - add param check for RSA crypto: qat - add param check for DH crypto: qat - honor CRYPTO_TFM_REQ_MAY_SLEEP flag crypto: qat - re-enable registration of algorithms drivers/crypto/qat/qat_4xxx/adf_drv.c | 7 - drivers/crypto/qat/qat_common/Makefile | 1 + drivers/crypto/qat/qat_common/adf_transport.c | 11 + drivers/crypto/qat/qat_common/adf_transport.h | 1 + .../qat/qat_common/adf_transport_internal.h | 1 + drivers/crypto/qat/qat_common/qat_algs.c | 153 +++++---- drivers/crypto/qat/qat_common/qat_algs_send.c | 86 +++++ drivers/crypto/qat/qat_common/qat_algs_send.h | 11 + drivers/crypto/qat/qat_common/qat_asym_algs.c | 304 +++++++++--------- drivers/crypto/qat/qat_common/qat_crypto.c | 10 +- drivers/crypto/qat/qat_common/qat_crypto.h | 44 +++ 11 files changed, 392 insertions(+), 237 deletions(-) create mode 100644 drivers/crypto/qat/qat_common/qat_algs_send.c create mode 100644 drivers/crypto/qat/qat_common/qat_algs_send.h -- 2.35.1