Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp5324026rwb; Tue, 1 Aug 2023 00:04:18 -0700 (PDT) X-Google-Smtp-Source: APBJJlECY7pAf4ZUO9UdxCeBDiuU233505BtY5RSHfPemoLPDbqgBvr0Z9CyGnhxwgDL/IJnuYfr X-Received: by 2002:a05:6512:214c:b0:4f9:570c:7b28 with SMTP id s12-20020a056512214c00b004f9570c7b28mr1314546lfr.32.1690873458481; Tue, 01 Aug 2023 00:04:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690873458; cv=none; d=google.com; s=arc-20160816; b=bykeHFQM6f8afvdolTUnIA8FLPpaDPv1fLjya4IJB+IrMc+jcpLBWk93WealI2OJ8U C0HRKsA8dmKU14ydxqrH/EMiYQRt+9G5DquqaqPNptKo6DvYNeXO/FpIBIflDV5c/oXN geKXxfFkQRaD8zzWW750v0ywF5rEfq873wjMjGesGfhvXK01LJESndJOOcmRkaY51oxn OZWV0B+6U5AactgdB6P5otHfC1lzz+BOg8sbIaF91i+tukhQQPfFnAZLrd1fPeBOsOaW rifzdUoO9chotjs9b7ftcoXzCs8kMW8ysj4dz3TPYaRKVNf2/U0Byhcjyc+U28Ia6X6p mkgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=NuthcRUO/JigbKFN/jB9GbFOVdH9ROeL9pXQGW1nptU=; fh=ij43W4eJZ6Cqn9gSX+z60q/9TNnkCYOrJ6jgvqkdHCI=; b=bwr3+x5FUYNHq+lqynfzuf1xRWUDFnV07NxDTde0WtDZV2yD5yIlGWq4GMZqmDw/La qbp2Nnbfnhe06miiahX3RAWnnOBPnUUzZ0azc1HHH8CaytMnMdp+dI2vKBqml3KEl+Wa /2sYq7X7t48ZeEScgs9n/QAoE3R2QzkG+drONl6ERY8VS+OXkTWDCvoOigD7OVbQrwwy sNVhPB2T3wNt+Faf0dbJSridFiBhecVnEhGKerBpio9IYeSJyOZmKt2RHe8V4ICjBVLa zQW77bw7fkyK6wfTKDye+RuskC8yoN0s/2L/s1IRjC+INQoDUy3HnHzJRBgbhAXy8rSA Hc0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=PAWIg9RV; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o11-20020aa7d3cb000000b00522c1367415si3012338edr.658.2023.08.01.00.03.49; Tue, 01 Aug 2023 00:04:18 -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=@kernel.org header.s=k20201202 header.b=PAWIg9RV; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231861AbjHAGnP (ORCPT + 99 others); Tue, 1 Aug 2023 02:43:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53046 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232051AbjHAGnF (ORCPT ); Tue, 1 Aug 2023 02:43:05 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 810C91BFD; Mon, 31 Jul 2023 23:42:38 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9A2876148E; Tue, 1 Aug 2023 06:42:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F1083C433CA; Tue, 1 Aug 2023 06:42:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690872157; bh=jwxHWeb0NL8oAMAbmsvzzIrWFXaXp5aIEx6g1Efrx+c=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=PAWIg9RVP0og5iCcVHfkMs0LUKXZLV3MoT0pMX6u3/zQ28XCLB4f3bvbf3a/SmHza pk7iTYFjZEd4Qmv2fB/Lu5bYy/AqkPq47uquvZYgzvR0xrvNwBwOmJSAHwHJp6pLOU 5kz6MyDlmQ9Hp0NhxnM5TO02FrgB0nIMSBmPnkbgGgkssypqmZYpkyodWvpr0Dl8De 3AbxRDErOa5OhRZOItdNK6cPn+SJySzhJUjc7vX2B+6e+Spmo8PKZlxvx248/YFqkE KRP8S2fUKsv+ws3AZ+7vTkubCu2FwMaPyQSWB8TB2YeYAaa4uYKUSmEc/MBP53QtX8 WO7ksjU9X9qPQ== Received: by mail-lj1-f176.google.com with SMTP id 38308e7fff4ca-2b9338e4695so78900401fa.2; Mon, 31 Jul 2023 23:42:36 -0700 (PDT) X-Gm-Message-State: ABy/qLYwJI8TJi3E3coUfOUHA4QlVTutU99d9F5j17no6D1pZbPeSebC lxJ6Vo62IpqKhleVWVB7GBInw/nPEiElFvDYLVc= X-Received: by 2002:a2e:b0c6:0:b0:2b9:dfd1:3803 with SMTP id g6-20020a2eb0c6000000b002b9dfd13803mr1639482ljl.30.1690872154954; Mon, 31 Jul 2023 23:42:34 -0700 (PDT) MIME-Version: 1.0 References: <20230719-mcrc-upstream-v1-0-dc8798a24c47@ti.com> <87y1ive0yk.fsf@kamlesh.i-did-not-set--mail-host-address--so-tickle-me> In-Reply-To: <87y1ive0yk.fsf@kamlesh.i-did-not-set--mail-host-address--so-tickle-me> From: Ard Biesheuvel Date: Tue, 1 Aug 2023 08:42:23 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [EXTERNAL] Re: [PATCH 0/5] Add support for Texas Instruments MCRC64 engine To: Kamlesh Gurudasani Cc: Herbert Xu , "David S. Miller" , Rob Herring , Krzysztof Kozlowski , Conor Dooley , "Menon, Nishanth" , "Raghavendra, Vignesh" , Tero Kristo , Catalin Marinas , Will Deacon , "linux-crypto@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, 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 On Tue, 1 Aug 2023 at 08:22, Kamlesh Gurudasani wrote: > > Ard Biesheuvel writes: > > > On Sun, 30 Jul 2023 at 20:56, Kamlesh Gurudasani wrote: > >> > >> Add support for MCRC64 engine to calculate 64-bit CRC in Full-CPU mode > >> > >> MCRC64 engine calculates 64-bit cyclic redundancy checks (CRC) > >> according to the ISO 3309 standard. > >> > >> Generator polynomial: x^64 + x^4 + x^3 + x + 1 > >> Polynomial value: 0x000000000000001b > >> > > > > How will this code be used? WIthout a user of the crc64-iso crypto API > > algorithm, there is no point in having a driver that implements it. > > Thanks for the review. > > MCRC64 will be used to check the integrity of memory blocks. > On TI K3 SOCs, users can use MCRC64 to accelerate the integrity check. > Where is the implementation of this logic? Does it use the shash/ahash API? If so, it should be part of this series. > > > > Also, *if* such a user exists, we'd need to have a generic C > > implementation as well - we don't add new algorithms unless they can > > be enabled on all platforms and architectures. > > If it is must, will implement generic C code. > > > > > > >> Tested with > >> > >> and tcrypt, > >> sudo modprobe tcrypt mode=329 sec=1 > >> > >> Signed-off-by: Kamlesh Gurudasani > >> --- > >> Kamlesh Gurudasani (5): > >> crypto: crc64 - add crc64-iso test vectors > >> dt-bindings: crypto: Add binding for TI MCRC64 driver > >> crypto: ti - add driver for MCRC64 engine > >> arm64: dts: ti: k3-am62: Add dt node, cbass_main ranges for MCRC64 > >> arm64: defconfig: enable MCRC module > >> > >> Documentation/devicetree/bindings/crypto/ti,mcrc64.yaml | 42 +++++++ > >> MAINTAINERS | 7 ++ > >> arch/arm64/boot/dts/ti/k3-am62-main.dtsi | 7 ++ > >> arch/arm64/boot/dts/ti/k3-am62.dtsi | 1 + > >> arch/arm64/configs/defconfig | 2 + > >> crypto/tcrypt.c | 5 + > >> crypto/testmgr.c | 7 ++ > >> crypto/testmgr.h | 401 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > >> drivers/crypto/Kconfig | 1 + > >> drivers/crypto/Makefile | 1 + > >> drivers/crypto/ti/Kconfig | 10 ++ > >> drivers/crypto/ti/Makefile | 2 + > >> drivers/crypto/ti/mcrc64.c | 360 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > >> 13 files changed, 846 insertions(+) > >> --- > >> base-commit: d7b3af5a77e8d8da28f435f313e069aea5bcf172 > >> change-id: 20230719-mcrc-upstream-7ae9a75cab37 > >> > >> Best regards, > >> -- > >> Kamlesh Gurudasani > >>