Received: by 2002:a05:7412:b795:b0:e2:908c:2ebd with SMTP id iv21csp169718rdb; Wed, 1 Nov 2023 22:58:56 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH3JaTZpB6JTIHUxVDopKjtGUzy6QVvUF2R54bxccENqBxMkJPl5KgjGx1HNz7LyjIDpeey X-Received: by 2002:a25:ab47:0:b0:da0:571e:fa1c with SMTP id u65-20020a25ab47000000b00da0571efa1cmr18778681ybi.29.1698904736283; Wed, 01 Nov 2023 22:58:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698904736; cv=none; d=google.com; s=arc-20160816; b=QhrCOKkejRd8TToqOvqk6P/DF140F+7nhjtfS9Ni/5XIcJiaeHEoDpsUoQ+7W+mrGA BlZq774s/IgSZN3DWIwGKHvrU+60t9JVcyUE+0FJKAwTX/K/UBlnstpSx8tsDRqqebMD SxY2UvuRf0jYplB8iKip+5YSX8DwgUjGCxSsGhklCQOxiIvUVRFgeqettRKNsaj9vEqo BuzoC2pRVH9D9rmhHbmNmbGzNZ5jipdJXydu53WJERygL2dpZk0ti7kJy7CS/wgj/Zgk 0uEPqJk7nXq1v05deQFwES/78i7RK9FcBceYrHA66cr0uvTfGA6PyxInklTKuHHoAGWm WaPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=h2RL7IVinp2B4oTlDhoEnPGGM0qn99a4oHGQGPJhM2s=; fh=r6l/0fNLL/AXSlcs77R52Y8eFsr4+G/MvscPXgtp5Xs=; b=Sf3+tSjv83RDGDfFexvu48LzTNwCuB1cTOE3k0py4aJ0oKIPbMWYeik5/qsQmv5L+L elz1M9dO/D6xByGpoahjfbUoQHYFHyikSFLYWCJE2WmjApJ09OdRz0EN/4DNT/k/IoDp v0iPVBaHIQ7eE3TFLFWstJfqjqmvZNjBKcFq2wjfUVlqJSuvraUUXxVyTzzUceJLHgZ/ +kl/1EubrD8y6vWMijeSmNKkfBwleptRyvuj64aCb52xu4LTYq3tSpcwpyaY335r3zSb H5bNVl0oOTzezMCsQI4Jg39V/Fhpx3/hPCIQgQyg6zLecn6avkPWQD8Tgj5/7sCAEZb+ 2iXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=FoO7W5dP; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id l71-20020a63914a000000b0057b55b52870si1384647pge.170.2023.11.01.22.58.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Nov 2023 22:58:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=FoO7W5dP; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 355DF81CC858; Wed, 1 Nov 2023 22:58:55 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230172AbjKBF6y (ORCPT + 99 others); Thu, 2 Nov 2023 01:58:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35728 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230478AbjKBF6w (ORCPT ); Thu, 2 Nov 2023 01:58:52 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 901EF133; Wed, 1 Nov 2023 22:58:50 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9C3A4C433C8; Thu, 2 Nov 2023 05:58:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1698904730; bh=oUrhkOmCghkLFx1zd+9/LkzSpQOub+y8mn4lj0eMIsM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=FoO7W5dP6rK5/nNsWQFdXanVXH0kpgIwBmFQhcebu/94h+pw+Df88gFyVNHm2/6kt HCTKBZ+WN1QLpNa+TEpa8ELkFvYXXy5u8EJC6zSVau1NdLGyxgFMlWZpHm3VBMok0p zcN2YsbEjYzTG92e9c7NC85r3m6Yc8MFaDQ0zQBcTWXIgmWnnkXiNYftONEjIVMU0Y 3wSys/hs8+bKMAgixXJuMsVQAoZyHFG37YJs9tYMKQJhhDUaZR3N7mENY90whleBkm Fr7nnqJUTeYlso7zBFSVjz6/0bMj1M6CFYNFugI9M70COlsuq/IGq1/YexkDhNYPqn DcLq41GcY+EEw== Date: Wed, 1 Nov 2023 22:58:48 -0700 From: Eric Biggers To: Jerry Shih Cc: paul.walmsley@sifive.com, palmer@dabbelt.com, aou@eecs.berkeley.edu, herbert@gondor.apana.org.au, davem@davemloft.net, andy.chiu@sifive.com, greentime.hu@sifive.com, conor.dooley@microchip.com, guoren@kernel.org, bjorn@rivosinc.com, heiko@sntech.de, ardb@kernel.org, phoebe.chen@sifive.com, hongrong.hsu@sifive.com, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org Subject: Re: [PATCH 10/12] RISC-V: crypto: add Zvksed accelerated SM4 implementation Message-ID: <20231102055848.GI1498@sol.localdomain> References: <20231025183644.8735-1-jerry.shih@sifive.com> <20231025183644.8735-11-jerry.shih@sifive.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231025183644.8735-11-jerry.shih@sifive.com> X-Spam-Status: No, score=-2.5 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 01 Nov 2023 22:58:55 -0700 (PDT) On Thu, Oct 26, 2023 at 02:36:42AM +0800, Jerry Shih wrote: > +struct crypto_alg riscv64_sm4_zvksed_alg = { > + .cra_name = "sm4", > + .cra_driver_name = "sm4-riscv64-zvkb-zvksed", > + .cra_module = THIS_MODULE, > + .cra_priority = 300, > + .cra_flags = CRYPTO_ALG_TYPE_CIPHER, > + .cra_blocksize = SM4_BLOCK_SIZE, > + .cra_ctxsize = sizeof(struct sm4_ctx), > + .cra_cipher = { > + .cia_min_keysize = SM4_KEY_SIZE, > + .cia_max_keysize = SM4_KEY_SIZE, > + .cia_setkey = riscv64_sm4_setkey_zvksed, > + .cia_encrypt = riscv64_sm4_encrypt_zvksed, > + .cia_decrypt = riscv64_sm4_decrypt_zvksed, > + }, > +}; This should be 'static'. - Eric