Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp5337256rwb; Tue, 1 Aug 2023 00:20:44 -0700 (PDT) X-Google-Smtp-Source: APBJJlHDc/BCR15kJv2htqY6YVwA0BflOR2IejHRlwsHKX4/7XPSudbxehXVXVZ5evCg5rlumGiL X-Received: by 2002:a17:907:78c8:b0:992:ef60:aadd with SMTP id kv8-20020a17090778c800b00992ef60aaddmr2312383ejc.13.1690874444373; Tue, 01 Aug 2023 00:20:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690874444; cv=none; d=google.com; s=arc-20160816; b=EXvAboJI/M0KmdsTl0OHlkP8GGBdckI6+zEr0ZEb7wyCf2qPuClE8f1m8TPxtSBxiW E7WCoryxk0NveB/mgG9G10n3YoqVs5tr1dpYlLWR4nZPSh4imLyt0ScACz074itNXmr6 kiUOjbPpbH4haAyLfi7fOtNRcsN48Oc+X0d594bggNe/O/USCx7JEzcrspYlEY4zroKA Rb9Q0VmnAyj5nDvnkWi6zHocycLkaMfSQ3dUXLckQpwnZPylJ+e9FWIdi4UUhQpLq4ll 5iVdIT6OOA3tK58ZLeHz/uXHODCmZ7ufoSC+Wz0ofGmNvtK3eBcJp4eQzqItJew9M1Xy bgKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=sBXAjbfHeRj7hzkUpoVdh1Ao5fWm61KOvhJ132iXmrs=; fh=KoO5pdRuUoQCvJ/FkMnq16sJ1um3UV8SjQ8e5XHRvDE=; b=Y9oaADn6ingXdT5G67kKDkFvYy18r517SBtFLtz2OkYD7RYmB6gG6jwCe8hjATTlcU 2I6Odhb3+PQ+da9JlfXpeGsdiQJfUSog7eKiL891kU3ca1N9StM3cohmgS7I5VYnSt7x pJzMMs+vNxEM9dMTAkkO4YGMkTIYp8SPbS4+mSS3EmoIiW0HE2/F98ktkBRTgvh3jxIN 8chSjuDxem6bfY5/yTrFEANpc0oGpBkBxg+D5Vm+6ok3Hlga7CxnLqbqEqyUqs89oPBH vgTP9UyWc0PeTIyEkTEj+T1wSJkCAzu0gUsT+J2aWrQ6mCB83TxccpJaxgV0Yas+eBpz KDgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=oWRxSfWK; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y13-20020a170906524d00b009930c925bd9si7674886ejm.945.2023.08.01.00.20.20; Tue, 01 Aug 2023 00:20:44 -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=@ti.com header.s=ti-com-17Q1 header.b=oWRxSfWK; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229902AbjHAHDN (ORCPT + 99 others); Tue, 1 Aug 2023 03:03:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229926AbjHAHCt (ORCPT ); Tue, 1 Aug 2023 03:02:49 -0400 Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5E1D31BF; Tue, 1 Aug 2023 00:02:35 -0700 (PDT) Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 37172Aoh030373; Tue, 1 Aug 2023 02:02:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1690873330; bh=sBXAjbfHeRj7hzkUpoVdh1Ao5fWm61KOvhJ132iXmrs=; h=From:To:CC:Subject:In-Reply-To:References:Date; b=oWRxSfWKi+PcuXRSeN74eoEOEGrcrMI2R2mxZ6clpRkPs/32nt+T1snbp1Up75cxK eewKwYRGD5D/xrMmznufpAyuRb1LZM+J51fQd+5+GME79L7n/UgM0pTb9+eAHyOlXA dhj1LeZyknkbyPqMgvwoGqB3+6G2+GZKW35KCSyw= Received: from DLEE112.ent.ti.com (dlee112.ent.ti.com [157.170.170.23]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 37172Aw4029151 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 1 Aug 2023 02:02:10 -0500 Received: from DLEE113.ent.ti.com (157.170.170.24) by DLEE112.ent.ti.com (157.170.170.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Tue, 1 Aug 2023 02:02:10 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE113.ent.ti.com (157.170.170.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Tue, 1 Aug 2023 02:02:10 -0500 Received: from localhost (ileaxei01-snat.itg.ti.com [10.180.69.5]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 371729Z7120125; Tue, 1 Aug 2023 02:02:09 -0500 From: Kamlesh Gurudasani To: Ard Biesheuvel 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" Subject: Re: [EXTERNAL] Re: [EXTERNAL] Re: [PATCH 0/5] Add support for Texas Instruments MCRC64 engine In-Reply-To: References: <20230719-mcrc-upstream-v1-0-dc8798a24c47@ti.com> <87y1ive0yk.fsf@kamlesh.i-did-not-set--mail-host-address--so-tickle-me> Date: Tue, 1 Aug 2023 12:32:09 +0530 Message-ID: <87v8dzdz4e.fsf@kamlesh.i-did-not-set--mail-host-address--so-tickle-me> MIME-Version: 1.0 Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 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_PASS,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 Ard Biesheuvel writes: > 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. We have implemented user-space application to utilize crc64-iso using below kernel module algif_hash: User-space interface for hash algorithms https://gist.github.com/ti-kamlesh/73abfcc1a33318bb3b199d36b6209e59 > > >> > >> > 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 >> >>