Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp428107rwp; Wed, 12 Jul 2023 16:03:25 -0700 (PDT) X-Google-Smtp-Source: APBJJlEbU5uXRwYZMfcUz5YRXMJE4AyWp7zwua1Rmn7YzNwajGY0Gsr2wtXgbok+EO5IEAC3xzTh X-Received: by 2002:a17:906:2253:b0:994:1eb4:689b with SMTP id 19-20020a170906225300b009941eb4689bmr5546030ejr.74.1689203005555; Wed, 12 Jul 2023 16:03:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689203005; cv=none; d=google.com; s=arc-20160816; b=aFwqqnzEPc/ftmA91OVjnPijqIAPya92qiRAB57afawFpzSJdAAlOtfwUKuZx0T+vQ vQ/ZDWH2DEf/d4TZF2nq9imIar70IuBIQ30kiipLSj2fUJy+8yZO5nnrbbBL8f8K3ogm o28e7/vTckZb5CXLPXaHc20QfOWUBJxUjacV3Iw8MhZ3YiztAHc75Vsh1uuAjdEb5Ufs Gm78NySCpn57+JlJisSnQHn2uMRA/YtaMMX8PqxlBGjjnKVr+faX4STSvr5M0mkWJDCx dA8+bXOS/LIBGu88uBI8jgvN3Hw/eB+X3loaawXng1DeClKIf30KYbnMz7FTQWJTLGf+ fpIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=VB9ypz/KY/xV4cSqtZ+tUlnGhLGfTgqW2/3T6mN7ebg=; fh=fI7zpSDDIuSo1hXiBd2PppSiZXzzsyiweVEAt+NV34g=; b=mupE8FDR/mGhF2u5GOeKsWgT1wF9o8GtuS5FNpzSMb6FOtyiitwal4J5QXVgFdYNP1 Ow2fwxzl3ip+BH4v2DvhDIroYS/olIlfbrh7Ewu5aGG2DTp896U5aRmZ74WrQDk1Flx9 xdHs69fIkU/41xZ/331GH3z2tblkrUDmBS+oiK1qlvM8o+ofBsHlaewimo+iBizNdwfr 3ZHKvLQgiqKx9ytzWqGue4xFrlkGXxXiXXLW7+ZR26owp+nRtLEILDP+SmZRTskwHCWc Fez0uSHTNRnff4Bd/Gj06ebHgp8wPpOnC7vHMzG2kxP4ANxM0BLKikNIo8J7mlkOM3Ef pAsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zqXzgzWK; 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=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gl21-20020a170906e0d500b00982c4ef1c5fsi5550642ejb.499.2023.07.12.16.02.53; Wed, 12 Jul 2023 16:03:25 -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=@linaro.org header.s=google header.b=zqXzgzWK; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231144AbjGLW4y (ORCPT + 99 others); Wed, 12 Jul 2023 18:56:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47542 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229530AbjGLW4x (ORCPT ); Wed, 12 Jul 2023 18:56:53 -0400 Received: from mail-yb1-xb29.google.com (mail-yb1-xb29.google.com [IPv6:2607:f8b0:4864:20::b29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3F47D11D for ; Wed, 12 Jul 2023 15:56:52 -0700 (PDT) Received: by mail-yb1-xb29.google.com with SMTP id 3f1490d57ef6-c2cf4e61bc6so8571895276.3 for ; Wed, 12 Jul 2023 15:56:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1689202611; x=1691794611; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=VB9ypz/KY/xV4cSqtZ+tUlnGhLGfTgqW2/3T6mN7ebg=; b=zqXzgzWKFV6nFUVPIAAPE0mvcmohHovWT46vSnWqga+md0s0CjPw+S/slrQmtYD/+I Fu0NJj/cGiDczTnmqqNEItLDzKpArQ+WRuNWc3U3XMwXODsKJkLrAVbsPysme2TvZlIQ 1nYVNxGO7F7Ylo2QbTcDyees8UGOWMay7cQq9+ubv3fb6bXR1CbmePyVVhhqIA0AS9RT tL8OHX1Mp9QLdxnzRYNhfIXauDWWOUboIKDr0iOGH5r+D74mbNsha1Himxc8/xYDV/BD jTjCUY8Qz1/Nl5IiMjzjvKt8+BjcT526DZvxuID7aGVOFHbTflMIReO9ZOI+Evkv/6ik qlNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689202611; x=1691794611; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VB9ypz/KY/xV4cSqtZ+tUlnGhLGfTgqW2/3T6mN7ebg=; b=JN9+LPsb4Ynk2gw7ltdcF7quza8jJlkgiZqxWm86gzQM7LFPkef4zohyGteFbg7lB5 6NObP+M4lvMDk7pjMCmPbFYHWA3Yf5pplRi+OIlHVBjqAVfUevcwR9A3NdgQbiiWUxlD JkUwkDv91tztAgRkn2XQah8JuKz6j7iNOjITMZlV1hKsmhw9QqQBQdJw72PboRd66mmt G02Sf/SWb2rWD9JcregNnlT4vScnLTmo5+43+NHlBGSEkLHOnCQkPozI6GpMFzJkO0xa C5SLGEjMosyv1ul296NMhcpA3lNWKkbGGlJm9H6H3HB+zNc6NAIXKZD12Vt5BQWg3kdS BSvg== X-Gm-Message-State: ABy/qLbvj+E0BB4+1wkHDgdFoufFmfYq2v1yxo0Mxu7EFHYuWSDQrsMG 5EiHFH9KyWWFYPHnY1TiXsG3YBl0DNSeXSlBrbHHPw== X-Received: by 2002:a81:9281:0:b0:57a:897e:abce with SMTP id j123-20020a819281000000b0057a897eabcemr24404ywg.7.1689202611241; Wed, 12 Jul 2023 15:56:51 -0700 (PDT) MIME-Version: 1.0 References: <20230706073719.1156288-1-thomas.bourgoin@foss.st.com> <20230706073719.1156288-3-thomas.bourgoin@foss.st.com> In-Reply-To: From: Linus Walleij Date: Thu, 13 Jul 2023 00:56:39 +0200 Message-ID: Subject: Re: [PATCH 2/7] crypto: stm32 - add new algorithms support To: Thomas BOURGOIN Cc: Herbert Xu , "David S . Miller" , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Maxime Coquelin , Alexandre Torgue , Lionel Debieve , linux-crypto@vger.kernel.org, devicetree@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 On Wed, Jul 12, 2023 at 9:58=E2=80=AFAM Thomas BOURGOIN wrote: > Did you run your test only with the patch adding the support for > STM32MP13 or did you try the whole patch set ? Both, actually. > The error is on the test vector number 4, which is an HASH of 64 bytes > which is exactly the size of a blcok for SHA1. > > Did you try to run the test for SHA256 ? (I guess you will see the same > error on test vector 4) Yes... I posted a log with both SHA256 and SHA1. > I found a typo in the number of CSR to save/restore for the SHA1 and > SHA256 algorithm. It should be 38 instead of 22. > Tell me if it fixes the regression. Yes this fixes the bug and the tests pass fine :) I wonder why SHA1 was affected? Same codepath? > It could be possible to divide the patch in 2 (one patch rework > preparing MP13 and one patch with the new algorithm) but for the > upstream I do not know if it is relevant to have 2 patches instead of one= . The major point of splitting patches to "one technical step" is to be able to do fine-grained git bisect to find bugs such as this one :D But admittedly the defintion of "techical step" is a bit fuzzy. Yours, Linus Walleij