From patchwork Tue Nov 30 07:54:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Toromanoff X-Patchwork-Id: 12694102 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B6543C433F5 for ; Tue, 30 Nov 2021 07:57:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:CC :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=yiBzLZZHY8uoGhbXsZyG5guZZrBCCRYyesHYYM2CaYU=; b=1wGdpdWEYMxL+/ Tf/Ewn08UYbIK69hDIo8rw1UKc/zxOJrBC3EuokVLjiIEINOU2YqQdfskThQeiznXZaPaIRo5gRfW FErytxv0OPeKU+XRu4SGQWwstjroWcP70nDK9COoM5Ln0G0OkBvZf1szg1AsNMiWe1jdaD81eCyqZ xD8qQf82OuFcSyY6YY5FNRaw0QolWoslpTaBXVEBHKggzhybWM7ObIDx0mVbxrtvrwOej6CIRCWsU La5GE/3t2AxGgdO+mUlWQJWtUAO8LB+46o8p809wJKVbOiPQefCDTjMKYNvMDFy/+l3pFJgjZ5leS tL5Xgyh6DPUwSaDl9WMg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mrxzS-003z5g-Ll; Tue, 30 Nov 2021 07:55:50 +0000 Received: from mx08-00178001.pphosted.com ([91.207.212.93] helo=mx07-00178001.pphosted.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mrxzC-003z1P-Uh for linux-arm-kernel@lists.infradead.org; Tue, 30 Nov 2021 07:55:37 +0000 Received: from pps.filterd (m0046660.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 1AU19X2u026836; Tue, 30 Nov 2021 08:55:15 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=selector1; bh=dlwPVVRahJrJmHZdOXPY3D0sp6m5nmpBi68pJQ85Loo=; b=I63soly/CBnRrAFwCS0BSEgNgk2FstguC28JdZF2gQ7YwzCwX/7XmlbQCP4fd7uY5b2p +KxkQpRr0i4GZ87rugQ6Hsj5pxoM8jy84PD8epYtXoYP6tDn0/c1S3JvjBt5SWyxmQvl u1GyWpaNd2UaGH6UYckT10hB5SrlzyuJumEXjJcx2GEQJaNsIqkqvNbZm/VrSRlldRO1 L2+4vvfIaVVhZKsspHSp6r5E+Yv9q0DbfL5muuxEWNpHfrSVAG8LxZBni6haYLUViKY1 VxbPIGxCDNOmejrgU8F+h867tN9LHtJD03542qizl4g5Om9j+25cjC+5/g0gxA3lzZwM ww== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com (PPS) with ESMTPS id 3cna1yshsd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 30 Nov 2021 08:55:14 +0100 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 60B4910002A; Tue, 30 Nov 2021 08:55:13 +0100 (CET) Received: from Webmail-eu.st.com (sfhdag2node2.st.com [10.75.127.5]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 19B6B2194DA; Tue, 30 Nov 2021 08:55:13 +0100 (CET) Received: from localhost (10.75.127.50) by SFHDAG2NODE2.st.com (10.75.127.5) with Microsoft SMTP Server (TLS) id 15.0.1497.26; Tue, 30 Nov 2021 08:55:12 +0100 From: Nicolas Toromanoff To: Herbert Xu , "David S . Miller" , Maxime Coquelin , Alexandre Torgue CC: Marek Vasut , Nicolas Toromanoff , Ard Biesheuvel , , , , Subject: [PATCH v4 0/9] STM32 CRYP driver: many fixes Date: Tue, 30 Nov 2021 08:54:52 +0100 Message-ID: <20211130075501.21958-1-nicolas.toromanoff@foss.st.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-Originating-IP: [10.75.127.50] X-ClientProxiedBy: SFHDAG1NODE2.st.com (10.75.127.2) To SFHDAG2NODE2.st.com (10.75.127.5) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.0.607.475 definitions=2021-11-30_06,2021-11-28_01,2020-04-07_01 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211129_235535_763246_325FA60B X-CRM114-Status: GOOD ( 14.71 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hello, This set of patches update the STM32 CRYP driver. First two update about EPROBE_DEFER management. Then many fixes to success the cryptomanager EXTRA_TESTS. And finally we reorder the initialization to set the key as last step. This patch series applies to cryptodev/master. v1 -> v2 : - use crypto_inc() in "crypto: stm32/cryp - fix CTR counter carry". - more explicit commit description. - with CONFIG_CRYPTO_MANAGER_EXTRA_TESTS=y all tests pass, at boot if built into kernel, at insmod if in module. (as v1) v2->v3: - fix smatch warning (that was a bug) in "crypto: stm32/cryp - fix bugs and crash in tests" add missing parenthesis in mask/shift operation in stm32_cryp_write_ccm_first_header(), was only visible in case of aad buffer bigger than 65280 bytes. - add a new commit to fix lrw chaining mode v3->v4 - Fix sparse warning - Rebase on cryptodev-2.6/master - rework 0004-patch: with v1 correction, the xts extra tests using stm32-cryp were still broken. Etienne Carriere (2): crypto: stm32/cryp - defer probe for reset controller crypto: stm32/cryp - don't print error on probe deferral Nicolas Toromanoff (7): crypto: stm32/cryp - fix CTR counter carry crypto: stm32/cryp - fix xts and race condition in crypto_engine requests crypto: stm32/cryp - check early input data crypto: stm32/cryp - fix double pm exit crypto: stm32/cryp - fix lrw chaining mode crypto: stm32/cryp - fix bugs and crash in tests crypto: stm32/cryp - reorder hw initialization drivers/crypto/stm32/stm32-cryp.c | 987 ++++++++++++------------------ 1 file changed, 404 insertions(+), 583 deletions(-) base-commit: 330507fbc9d8c3bc4525ea2ae9c3774738bc0c80