Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp814813rwp; Thu, 13 Jul 2023 01:09:09 -0700 (PDT) X-Google-Smtp-Source: APBJJlFbZrB9WKj/ARGGAMUhke6/fBS5htsXRUfPZuFc31Z0HSvg8DfwXdTfiN6X85G1rpnbF8f4 X-Received: by 2002:a2e:95d4:0:b0:2b6:ee99:fffc with SMTP id y20-20020a2e95d4000000b002b6ee99fffcmr726896ljh.36.1689235749267; Thu, 13 Jul 2023 01:09:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689235749; cv=none; d=google.com; s=arc-20160816; b=OgtuPjSPx16VB0pY+JISgCXqfi8WrGl1JQccFhESoxfUtChCR9bcO1ndp3XnRtqfYt Xzo395hBzV1oeGAId1h0OoBsKgC3gIvn0q+RB4NINo2wfiixbEUtI4eCEG0D6tYehwec ceYNvjuIa7LeF8rN0NWQobfHpT3tKJb7fW24IeNQfwy/TQwbnzIpOZYEtKiawdoiH/J6 sYaY3XggJ/+YmxPhLBeA/ADHJKe5HK9Zbq4/bcSjmvWD/DJEPRfjcG3IWrbzpKu9HD2g YwBBD6ZewnpVVtLI1yKjtP+1t6F7Nh5k90ORUsSNetebcgfkL6+r9wAIGmaOf9VtPATG +Nvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:cc:from :references:to:subject:user-agent:mime-version:date:message-id :dkim-signature; bh=G/5P+GBYTXDjapoJpeo3kbVedPpgVPQ0maCG9CHv5+Q=; fh=//I/MHvcVnBFXVs19DpIAairjILHdywo27dZ3+cx68g=; b=q+LunSlabVYxm8puG8DTW4ZqX9ebd4ou4f1R0q3vGO5c6pjIkWDXs8Sytol8FbYkw5 OZ3ZnHyYpQ7g+KAuPoZU9PODBh46Jt8KTsmRXfDqhiHPtsmZel8loGIqdSGK38N3jm6/ dauBNtSG3sIJoYuLg0uglEEx1N2bc9eEdrGhu4UgXioaRlXMop/LO0pTTkZqHi1UmjWr PsvEC4dT7OphpabTPohuffS1XgY7VDVmZpcwgQDO8C9vNRUNwiNCgy10DDy3GuMM7Guh RH4yHVNnaXKJ2uvFcarMPmHFOUVOxKdywGpAbbAWxd/3HWKNp6ilME0Y1361K+UMVpPV SOLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=HWz26JpN; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foss.st.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z13-20020a170906944d00b0098d2261cddfsi6647562ejx.1049.2023.07.13.01.08.37; Thu, 13 Jul 2023 01:09:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=HWz26JpN; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foss.st.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233312AbjGMIDd (ORCPT + 99 others); Thu, 13 Jul 2023 04:03:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39874 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233379AbjGMICh (ORCPT ); Thu, 13 Jul 2023 04:02:37 -0400 Received: from mx07-00178001.pphosted.com (mx08-00178001.pphosted.com [91.207.212.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 375D1420C; Thu, 13 Jul 2023 01:00:56 -0700 (PDT) Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 36D7NZTv002471; Thu, 13 Jul 2023 09:59:52 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h=message-id : date : mime-version : subject : to : references : from : cc : in-reply-to : content-type : content-transfer-encoding; s=selector1; bh=G/5P+GBYTXDjapoJpeo3kbVedPpgVPQ0maCG9CHv5+Q=; b=HWz26JpNsdDJbJQoAb+xal5sc8dUbPMpZmAR/YzfV2icOKFol1B4tnKWHatZblUVB8+h uRuScfuCSr4bG0QgV3S8E/DnOY9EC5a3kZl9B91ZbRRPhrk9MDijmBHIhXdm+9DLYEJB 1/0sCeQUmsVZsiBc9azZcemNaAs3fbScUqJFlmPRoecUmqWfvwdd6EE7BeKV2VI5G9mv BOijjoSqYCpU8NnL3CJZJEq2Xmt1SEaizoKqgTd7jd+I7+A4/0q8WpryHJEtR54Id8rB v5qU7/jAUzEqZ6LWd17pu4xzRqA/3HIqxlOX0GqHXApIwd2EveX4xIwj5Wipm7Z7vlNb Xw== 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 3rtcud08ue-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 13 Jul 2023 09:59:52 +0200 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id AB4FC100058; Thu, 13 Jul 2023 09:59:49 +0200 (CEST) Received: from Webmail-eu.st.com (shfdag1node3.st.com [10.75.129.71]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id A3B922138CC; Thu, 13 Jul 2023 09:59:49 +0200 (CEST) Received: from [10.201.22.9] (10.201.22.9) by SHFDAG1NODE3.st.com (10.75.129.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Thu, 13 Jul 2023 09:59:49 +0200 Message-ID: <050aa1fb-34ab-b9e0-7772-af53ec32d312@foss.st.com> Date: Thu, 13 Jul 2023 09:59:48 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.0 Subject: Re: [PATCH 2/7] crypto: stm32 - add new algorithms support To: Linus Walleij References: <20230706073719.1156288-1-thomas.bourgoin@foss.st.com> <20230706073719.1156288-3-thomas.bourgoin@foss.st.com> From: Thomas BOURGOIN CC: Herbert Xu , "David S . Miller" , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Maxime Coquelin , Alexandre Torgue , Lionel Debieve , , , , , In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.201.22.9] X-ClientProxiedBy: SHFCAS1NODE1.st.com (10.75.129.72) To SHFDAG1NODE3.st.com (10.75.129.71) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-07-13_04,2023-07-11_01,2023-05-22_02 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,NICE_REPLY_A,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 Hi Linus, On 7/13/23 00:56, Linus Walleij wrote: > Yes this fixes the bug and the tests pass fine ???? Great news > I wonder why SHA1 was affected? Same codepath? Yes the number of CSR to save is the same for SHA256 and SHA1. You can look at the 'Context swapping' chapter (47.3.3) in the reference manual for UX500. There is a note at the end telling that you do not have to save all 54 register if you do HASH operation, only 38 are necessary : > If the context swap does not involve HMAC operations, registers cs_rk0 to cs_rk7 and > cs_rh0 to cs_rh7 can be ignored Best regards, Thomas