From patchwork Wed Feb 3 14:32:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thara Gopinath X-Patchwork-Id: 375414 Delivered-To: patch@linaro.org Received: by 2002:a02:b18a:0:0:0:0:0 with SMTP id t10csp388865jah; Wed, 3 Feb 2021 06:35:12 -0800 (PST) X-Google-Smtp-Source: ABdhPJz3BS9ndkWDmN5foMMoH03jd9Vl62j0RLisCr3IBK+nhCWQdL1EIzw88K5SGefqemou98y/ X-Received: by 2002:a50:bc15:: with SMTP id j21mr3209909edh.187.1612362912116; Wed, 03 Feb 2021 06:35:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612362912; cv=none; d=google.com; s=arc-20160816; b=c5nXhS1xeicNTFvTC39j1r2MtYlwLx0n/7mESiGi3luGJDDibzK0hrLxcjZ025kP7Q QhIlZWMpUL7G5POPyUrb/+t382/H8ItnAGt6i8vdwMpu9GuGeqwQP8uHou1iMIatxYrj L5yBDM4fXX0Io+oybJGFXVApJIQNY3IZglLz7Qjp7TcuEPOTW3I6EZ5ebthe3W1oBs3G aKJJ7E1UPmiS9lC5yl1cN+l/tYWxEAlrRgbdcGtreVI3PI2kEGtaDYNVxNWQqKgBjnxz oULN2aspEautcaP9KpjiXy5rqZEZ6PzdlfLIi2FNnxOs5mwxc1TABvqS3i0lw9RyKx6P UkjA== 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=hFVpsPmskX5v5OqYWeZ4v5kCJDeC7TSVZUZ0ux0+ShY=; b=GVkYcKgi/B1gAcUHxYnVBpcibluqJ6Xes5jtSSoQtvdueonb+AnICmupBuE+YYRxJ5 eSJ2R8quE5+KzbZFdIoFeESAWECMIJb9gtMIbyvqysc6pgJ1QRo+MBX4vI/BCLcTbwFy PU1k1qg4HBI27YRcU/T8gp20U5btSn72qtPQ8GB4/hq/FMdb3XqWq8FVcP8nzRiENmAn 1+soImpHEOTleHw7ixpztnTS2nQBZZhIWT1szpfcdeRnGcerF0qgm4aAlm53DYce7OOA JeT4z0LfOX30tfo1BuxxTAfBncUI70EH1tkxjHS/3rkVdRClFbJTcniTJTK10hYhdsEs yIzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BFaYS9tA; 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 s18si1533688ejd.741.2021.02.03.06.35.11; Wed, 03 Feb 2021 06:35:12 -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=BFaYS9tA; 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 S232417AbhBCOdv (ORCPT + 2 others); Wed, 3 Feb 2021 09:33:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56058 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232184AbhBCOdu (ORCPT ); Wed, 3 Feb 2021 09:33:50 -0500 Received: from mail-qt1-x830.google.com (mail-qt1-x830.google.com [IPv6:2607:f8b0:4864:20::830]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 639D2C0613D6 for ; Wed, 3 Feb 2021 06:33:10 -0800 (PST) Received: by mail-qt1-x830.google.com with SMTP id r20so14075598qtm.3 for ; Wed, 03 Feb 2021 06:33:10 -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=hFVpsPmskX5v5OqYWeZ4v5kCJDeC7TSVZUZ0ux0+ShY=; b=BFaYS9tA+mKRULFIRN2SY/lioEm3Rj8LTAXQOMEsgMJilhbHf0kKrlgQeNdZuIaCSr VHhzrEHqc9v0u+Re5pvN28/nfwJmte7sl0hi/pIXmu5GlHSL1K6EAhgYVBN0b2Mq+ERI d8fZ525GvTMXQCfMcB9bCKCtDYHW0MKWC6/NoRQm+Te3o5rd2yVNu5JGiofwbOtRVISf g65Y4Ry/eMxuQWZibn2XEMM5Koy5fwaCv2QiSQJdn1kwmtZ9ONpRdftOxLHm6OqQpUWj GWbJjZz9VY/XYVZJMBihRCLBolUIqi3p9Zk08G+Pxwcu8momnEJNgPHjSs0Sk07jt347 r+Vw== 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=hFVpsPmskX5v5OqYWeZ4v5kCJDeC7TSVZUZ0ux0+ShY=; b=cwoF80c6YqrEmD8sBV3L7h/+QZSfIozIWD4TbXuGxvmCekSMozaTGI7dLql2VoLXiS CJropNal6nQBWDUxpNKpIhrPMMS1n95e6InfmQ8N6Zon/i3DG0pd0lEUOGHQlyFXfRaV ujBSw5NskRWxnNlGeYaiGGN/GQW+lO1+UlqgpN7oDvmGjWf7jBqIBLnJut2VJwPFScux YKNeVZNIyHaIZhzhcCfXI1gAbOdyx2Kf7MV7RdqD2KqmxhaCxFLXCB3LiA35K8AQDJDc Rq7gH2v3gw9zc9pXtnbdbEiXwKRM+FadMwPdPgBFwCAlmvTJIAQYa9lGM5KJxy2L1Yyp FfgQ== X-Gm-Message-State: AOAM533cghaUgW3YA9RbSy+z6wJerECf6Vqye9E3Pin0v7/CocQxy+89 xpyCvu/v1Rl5BxQkMz8kwWv1Bg== X-Received: by 2002:ac8:4990:: with SMTP id f16mr2608167qtq.184.1612362789340; Wed, 03 Feb 2021 06:33:09 -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 v15sm1775433qkv.36.2021.02.03.06.33.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Feb 2021 06:33:08 -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 v4 00/11] Regression fixes/clean ups in the Qualcomm crypto engine driver Date: Wed, 3 Feb 2021 09:32:56 -0500 Message-Id: <20210203143307.1351563-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. 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 drivers: 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