From patchwork Thu Nov 18 15:07:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Toromanoff X-Patchwork-Id: 12693057 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7C7D4C433FE for ; Thu, 18 Nov 2021 15:10:41 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id E3FC26112D for ; Thu, 18 Nov 2021 15:10:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org E3FC26112D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=foss.st.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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=i5/FMWUSCQ8J+oCfPnj6Xyp1lyYcY6zWQ6zr3eZ9KqU=; b=kf6CBD5Es9v1Dz y27WhT4RyuTyritd1Vbrvv0tiqClz6pHuRizcShGVXyfoZZ/o0W5J2rfF2rZ8wR1stFksfbD2zNQn nwN/WiZh9KFrCL9xX0UMOM4cVH5tAYfMC1WkCUre4J39If0xVdugCQ1QX0N57AoldWBd2hzpt4WPe PPcp+LFtQumIdk/KEpKCFLg96eAgYjBemnzkR0hXB65SJCjdxvgrQflAnZxsng4pBC/Wt8NllliHV YTVOjlsnWDOg02N9ksZ2b0kSuC0Sr1yBXQtSEh29SRhn4emkX8ClZOnr6bAZeETcHsz+vB0t0z8P7 SRmDmHdXHIakyzzGlMlQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mnj2F-008Bm1-9v; Thu, 18 Nov 2021 15:09:11 +0000 Received: from mx07-00178001.pphosted.com ([185.132.182.106]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mnj20-008Bhh-KA for linux-arm-kernel@lists.infradead.org; Thu, 18 Nov 2021 15:08:58 +0000 Received: from pps.filterd (m0241204.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 1AIEaFrA003091; Thu, 18 Nov 2021 16:08:33 +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=fLHwZGxFdvc8NUUE5rvqoHjjl+hj0c4xGzAD1tetaYc=; b=pPzvk7HIcxM5fe9KlY0R1mEbg056qMdMqYSpGtN8+rBP5yZKmaJcG4VrqijSpKXb5GEU 6iMTNMSQB2ZKPaNJK7WLJiAWEiroW+G2DpcqUKZhinT5r59XcaVi7A3ROvKphlUGl645 /zdKbfiCZ6WH6vaFn9WzaqyM0OLQB3nB3xIvOGoDMKIdbpClebLfHhMimzA2C+tI2r7c XZVh5Osv4pQR2Wrj/POaCgKIhL9+Eplkk4UGro9oVYCs8EgE8NJHBxNKkw1GtKs9QgvJ kxXCf0vlUjeVyQK1lMpWeCa8GZNgd5Pb1zOGKr/0b8eZUoFTe1DFZcfv8uT26hR23XLi 7w== 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 3cdm1n28kb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 18 Nov 2021 16:08:33 +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 8C6F710002A; Thu, 18 Nov 2021 16:08:30 +0100 (CET) Received: from Webmail-eu.st.com (sfhdag2node2.st.com [10.75.127.5]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 55AAC231535; Thu, 18 Nov 2021 16:08:30 +0100 (CET) Received: from localhost (10.75.127.48) by SFHDAG2NODE2.st.com (10.75.127.5) with Microsoft SMTP Server (TLS) id 15.0.1497.26; Thu, 18 Nov 2021 16:08:30 +0100 From: Nicolas Toromanoff To: Herbert Xu , "David S . Miller" , Maxime Coquelin , Alexandre Torgue CC: Marek Vasut , Nicolas Toromanoff , Ard Biesheuvel , , , , Subject: [PATCH v3 0/9] STM32 CRYP driver: many fixes Date: Thu, 18 Nov 2021 16:07:47 +0100 Message-ID: <20211118150756.6593-1-nicolas.toromanoff@foss.st.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-Originating-IP: [10.75.127.48] X-ClientProxiedBy: SFHDAG2NODE1.st.com (10.75.127.4) 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-18_12,2021-11-17_01,2020-04-07_01 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211118_070857_220991_2CAF539C X-CRM114-Status: GOOD ( 13.92 ) 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 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 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 | 985 ++++++++++++------------------ 1 file changed, 404 insertions(+), 581 deletions(-) base-commit: beaaaa37c664e9afdf2913aee19185d8e3793b50