Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp1961076rdb; Sun, 19 Nov 2023 18:56:09 -0800 (PST) X-Google-Smtp-Source: AGHT+IEUNGoDMJtXMUVqCZJBLTLtNTY0zQ6wL9aCdpmJjgct+AzhoXO3DSu9iZzirsZaJhOaaFLS X-Received: by 2002:a05:6871:4e85:b0:1e9:bd5c:ae40 with SMTP id uk5-20020a0568714e8500b001e9bd5cae40mr7245097oab.38.1700448969364; Sun, 19 Nov 2023 18:56:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700448969; cv=none; d=google.com; s=arc-20160816; b=kxj+p6oKnnbAYSbRehyqmqRo716qIBWnRH7Fw9y4+yGIUFBSLHcQ7w5iIPifPkGVgz paCkGZ/7ffI+N962Ki49tHcp120siL1Uz/HkPPw2A5OTkVmopYWjHdwY7UAJTV3RdjzZ xBrBamfl9fXEpozRV3LkHLGH8nZG0kpQeTFC6qDKZZKP8G+5EuokMfU+uymIeYcETLk1 B2+f/on0w4qR3Fst+MiWVcRFjNYGWhiIWJmE2YsHyRnDRxEddX/2q6So4A/9tKX1Hi6i cO1iKGyDxwnwItHQLrzsUJzd0aE/JaiIlJBDfPgi+x9eBhpFzNmf9cRfvNLKnK8RwUP5 T3wQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:dkim-signature; bh=CQLpISrSuWQBWBAvuQbodwZBDAWI6iXmTyJBLfM/8EA=; fh=zpHLWyeRR7dOHHeejsRbDoIpNWos9Mc4VkbV5zLYyvU=; b=opoXKvV5eQ5OU4IH5P0dyCsaAwVZNlJQBNxU+qo+ePYvAsqX5VSGL79uHz+hftWequ CDiXVa4sDPdkeIpvkF1GVtaW+UxN4UiIi+CQK3dz3JqXZ5GrB0+1f3RTCRw3IgJD3i+E E/ATxCR0noKZq1azpmyyX93vIDjw4E0ElaJlyyjLLZB2oEAxMtGmJj6iVcXJZoIrLO4+ 1cu9U2A4gZ6T8Koawxaa3z+GYuYG+NaM/qY+ZJBfeMSAblU1L8JxR02hHqw6iJEnvIPD JrClEN+dzwQ7UjR3QC5lO9uscFPCvmuZVYw65eckCCYXNsYIcz1n8/G2eJgd7JblprWr mEmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=Va+2qlGg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=sifive.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id x3-20020a636303000000b005be0028c5easi7197914pgb.401.2023.11.19.18.56.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Nov 2023 18:56:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=Va+2qlGg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=sifive.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 40C16805EACC; Sun, 19 Nov 2023 18:55:58 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231769AbjKTCzv (ORCPT + 99 others); Sun, 19 Nov 2023 21:55:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50150 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231714AbjKTCzt (ORCPT ); Sun, 19 Nov 2023 21:55:49 -0500 Received: from mail-pf1-x42e.google.com (mail-pf1-x42e.google.com [IPv6:2607:f8b0:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 84FEE19A for ; Sun, 19 Nov 2023 18:55:46 -0800 (PST) Received: by mail-pf1-x42e.google.com with SMTP id d2e1a72fcca58-6c320a821c4so3241549b3a.2 for ; Sun, 19 Nov 2023 18:55:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; t=1700448946; x=1701053746; darn=vger.kernel.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=CQLpISrSuWQBWBAvuQbodwZBDAWI6iXmTyJBLfM/8EA=; b=Va+2qlGgfHeXJry07RcSqdKxGcHU6vSJ0KARWOExaC+NF96HGf3zGrhH8m6EaRyiI0 MSIH1GeFEhVxTcjU1sYI8gnjE0kAeYwNPFvu5D9Mc/+7RKa/SDc+ku/dGqgVgzdRAroJ I5EduSEpISjBCYIhJoH0ttgi8A0RXhoUeLlOmR4A8w+9wkN5WDAR0EFXuG+oF6tyQDz1 6r5sunZnoXyehyYCOx7VPpNw/iKSyTcY0HhqthJLdnmXtnzdtVlU7Ir22RgQoarwvv7Z LwGjs3cSWoYKA7drcl6w9rbEEHIYAHYmVrNzhuX5T8urXzifF7AMcEkz0s9tGAEzCXjo nxcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700448946; x=1701053746; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CQLpISrSuWQBWBAvuQbodwZBDAWI6iXmTyJBLfM/8EA=; b=uUDm7CKua+QQtK0QBbXlAuDwGZv5iSGmDFaGTx+3Ndsq2evBGcfyYRmaDXlr+geSok YQ56eH9YiVBrIcCDCSGGTyYQonLfdX74EY3N3X8unniUve7IPLL7SAH4174/OdCNfNlm bdW19bbT+qCyltuqnnM1PwCURszOF2E93g1PiEjIzICTtQpsx9JF8OvW/PulOH6mFkap sd0R7fTawCQBTT+eeqXtRRF3Y0ifnQpceRGGOkqJngBo8ty273qMPQf0GUEaAcsvIiHl k8GmcTlI8/KyyJCVizZ+sb672u7wtR5jPqXFs4I3IyscIshrtN6eoWjExCM0J/ezHh89 17QA== X-Gm-Message-State: AOJu0YwhkXoNJOZFLpd5nySDO+qTnp0AJY/TC3BWFrUQVVbLeGbOmlPE HAGhx/ir5OXasdX/4Qi5UPFDOQ== X-Received: by 2002:a05:6a20:2d1e:b0:187:a119:909d with SMTP id g30-20020a056a202d1e00b00187a119909dmr4195928pzl.13.1700448945925; Sun, 19 Nov 2023 18:55:45 -0800 (PST) Received: from ?IPv6:2402:7500:5d5:bc21:3420:fefa:20d4:2a2f? ([2402:7500:5d5:bc21:3420:fefa:20d4:2a2f]) by smtp.gmail.com with ESMTPSA id y12-20020a170902ed4c00b001cc256ce1besm4928265plb.138.2023.11.19.18.55.42 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 19 Nov 2023 18:55:45 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.7\)) Subject: Re: [PATCH 10/12] RISC-V: crypto: add Zvksed accelerated SM4 implementation From: Jerry Shih In-Reply-To: <20231102055848.GI1498@sol.localdomain> Date: Mon, 20 Nov 2023 10:55:41 +0800 Cc: Paul Walmsley , palmer@dabbelt.com, Albert Ou , 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 Content-Transfer-Encoding: 7bit Message-Id: <078F58E9-7CCF-4A59-BD29-8E87F9EE434B@sifive.com> References: <20231025183644.8735-1-jerry.shih@sifive.com> <20231025183644.8735-11-jerry.shih@sifive.com> <20231102055848.GI1498@sol.localdomain> To: Eric Biggers X-Mailer: Apple Mail (2.3445.9.7) X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Sun, 19 Nov 2023 18:55:58 -0800 (PST) On Nov 2, 2023, at 13:58, Eric Biggers wrote: > 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 Thx. Fixed. -Jerry