From patchwork Thu Feb 4 21:43:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thara Gopinath X-Patchwork-Id: 376334 Delivered-To: patch@linaro.org Received: by 2002:a02:b18a:0:0:0:0:0 with SMTP id t10csp1654904jah; Thu, 4 Feb 2021 13:45:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJzW26vkSV7A1059LuvojwimTpYw0MgYVwIgEsHjql1vx3ii2lAMJ8v6MpBaG2sqrYWPhTQl X-Received: by 2002:a17:906:c010:: with SMTP id e16mr1032129ejz.91.1612475106805; Thu, 04 Feb 2021 13:45:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612475106; cv=none; d=google.com; s=arc-20160816; b=K5e6JolwrcYB3prLBpAlTe+YFYhoEk40assk2Sqeem5N8FDeCY8D9ksxOp09Hsrz8v oLE70HxROx5I1ms+/H3JDaItOAQqiRG7rctzoTI7zMlkRGxbmvuyLloeHRl2iiJZAsBx KW270SOsHRbo7fUJ34/6L++2oZk5hMJmzCgrBa2WbR8c4J/olFZW5HykXxYon5yBqCXg QR+niZ3CQZ9aHEUT5GNhudZb7YbpRDSA5GTfseivn3t68tAqnqV1ANvsjAqzafKBIGAr EsX4VjwMqxwSHTE+OtCc2ghR0HEW/LrZWpS4u7UiGMkNW5+9gfAjyhSNMSEz4NAFibUI t6wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=G6n3XQ08yWZ9lzKICVX9QM9j4Y+beb5V9nQwAwfR7q4=; b=MHV5rxHd3BWghgMi4mr84FoxIsOuEciUBstPUmKtEsQbRwgo3zVEcr8moDTTtYyggC e8A390leYCmMGiIbqnKS7ULplKYf2Kq4ahsanti7KZik1N+4LwxFcyMxETt5aENO8AuA fbbcegGK0ly60OZEv8cVdLkZDm2BkUWGccKoqd/V8sr1+yIbp48ulH/9QJVDU/OYplue U8+zA/Pa9t4m60drZ376VH2fD4ZpRZ0IErNbbhx5Jk1xF/tEZ5wt7K7Qj8SDfOqasjBb WXceiI2TbTNyMlQvfs52h668ViVHbJcXK2sqXRdozDCY+Y6s/1oErKZcD+V9opPGZycU m3AA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="ezB6M2/Q"; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i15si1501760edx.596.2021.02.04.13.45.06; Thu, 04 Feb 2021 13:45:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="ezB6M2/Q"; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229623AbhBDVoo (ORCPT + 2 others); Thu, 4 Feb 2021 16:44:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35206 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229534AbhBDVol (ORCPT ); Thu, 4 Feb 2021 16:44:41 -0500 Received: from mail-qk1-x734.google.com (mail-qk1-x734.google.com [IPv6:2607:f8b0:4864:20::734]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 92DB5C061786 for ; Thu, 4 Feb 2021 13:44:01 -0800 (PST) Received: by mail-qk1-x734.google.com with SMTP id x81so4969764qkb.0 for ; Thu, 04 Feb 2021 13:44:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=G6n3XQ08yWZ9lzKICVX9QM9j4Y+beb5V9nQwAwfR7q4=; b=ezB6M2/QlZUpa1ox9B4HIAOSvCFe8I6qZwJcMTf0enbjJeQreVhgCnVQ1x9DwECQea 5Zo7pvBL8XcjfKNEhZoF18Zcfb1Jw25eI68YktzRsnqiHhJ2UslLMsmDSa1jUwo9wciS UuA5TaVjnnnsna4uPNeqAeCiP0kRVaWnIb8mw78UJc8a+rZYW/LOruL7fk/xTXJc8VPl 2hNaO/oYs0jIAGubvMjJljmrmJ390GNjTZcQ+ADnds58FQuBkuw+waAdoDg6XGr2hTXO 71aayzIbWeCSud8u5pOSwgLqPQWiGBErlgBO1WfwHBl4bZIT5pRRDkxqUIFEk7B55OQM FgpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=G6n3XQ08yWZ9lzKICVX9QM9j4Y+beb5V9nQwAwfR7q4=; b=Qa5giT2e0HFzZgTZPt0EcbAwrBvOqDDCy1RC9yYEoMZ/xV8YzSVcNbrvuEOwWJ2IjE I7ltslu3GKQAus5gwqMHcS9F9PGgqEfK4rMqh5/GXkn86yXpVI1EbRFyf79hGo5VIC9N LYabgDZRU5xb+emFEO5PaDM63hqOhyUjNXgM/zTBsXr3GbvMM3DbvGIpHwxlig14SpWG hDd50uJtUs9UZsJ4L8QXjCPR1hOzW4WGNbvb78XpJ9zC3tohGgv8q4f0xI0DrOWkyWXN A8zpanXxSFmLUYxDWMHOBs9fjfNCO2Q5WlYbeN3/qmp1rgB42D4Vln16uqbRmRqiaiFx QtDA== X-Gm-Message-State: AOAM531BTX6dps9AiCtPtkZo9OOPnhn3Ew7GAhURhY8ILac+jRf5CXC6 HGl9SXhFpufwhbayIaSP/7idTQ== X-Received: by 2002:a37:68f:: with SMTP id 137mr1207526qkg.420.1612475040654; Thu, 04 Feb 2021 13:44:00 -0800 (PST) Received: from pop-os.fios-router.home (pool-71-163-245-5.washdc.fios.verizon.net. [71.163.245.5]) by smtp.googlemail.com with ESMTPSA id h185sm6353858qkd.122.2021.02.04.13.43.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Feb 2021 13:44:00 -0800 (PST) From: Thara Gopinath To: herbert@gondor.apana.org.au, davem@davemloft.net, bjorn.andersson@linaro.org Cc: ebiggers@google.com, ardb@kernel.org, sivaprak@codeaurora.org, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v5 00/11] Regression fixes/clean ups in the Qualcomm crypto engine driver Date: Thu, 4 Feb 2021 16:43:48 -0500 Message-Id: <20210204214359.1993065-1-thara.gopinath@linaro.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org This patch series is a result of running kernel crypto fuzz tests (by enabling CONFIG_CRYPTO_MANAGER_EXTRA_TESTS) on the transformations currently supported via the Qualcomm crypto engine on sdm845. The first nine patches are fixes for various regressions found during testing. The last two patches are minor clean ups of unused variable and parameters. v4->v5: - Fixed build warning/error in patch for wrong assignment of const pointer as reported by kernel test robot . - Rebased to 5.11-rc6. v3->v4: - Fixed the bug where only two bytes of byte_count were getting saved and restored instead of all eight bytes. Thanks Bjorn for catching this. - Split patch 3 "Fix regressions found during fuzz testing" into 6 patches as requested by Bjorn. - Dropped crypto from all subject headers. - Rebased to 5.11-rc5 v2->v3: - Made the comparison between keys to check if any two keys are same for triple des algorithms constant-time as per Nym Seddon's suggestion. - Rebased to 5.11-rc4. v1->v2: - Introduced custom struct qce_sha_saved_state to store and restore partial sha transformation. - Rebased to 5.11-rc3. Thara Gopinath (11): crypto: qce: sha: Restore/save ahash state with custom struct in export/import crypto: qce: sha: Hold back a block of data to be transferred as part of final crypto: qce: skcipher: Return unsupported if key1 and key 2 are same for AES XTS algorithm crypto: qce: skcipher: Return unsupported if any three keys are same for DES3 algorithms crypto: qce: skcipher: Return error for zero length messages crypto: qce: skcipher: Return error for non-blocksize data(ECB/CBC algorithms) crypto: qce: skcipher: Set ivsize to 0 for ecb(aes) crypto: qce: skcipher: Improve the conditions for requesting AES fallback cipher crypto: qce: common: Set data unit size to message length for AES XTS transformation crypto: qce: Remover src_tbl from qce_cipher_reqctx crypto: qce: Remove totallen and offset in qce_start drivers/crypto/qce/cipher.h | 1 - drivers/crypto/qce/common.c | 25 +++--- drivers/crypto/qce/common.h | 3 +- drivers/crypto/qce/sha.c | 143 +++++++++++++--------------------- drivers/crypto/qce/skcipher.c | 72 ++++++++++++++--- 5 files changed, 129 insertions(+), 115 deletions(-) -- 2.25.1