Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4395293rdh; Tue, 28 Nov 2023 23:24:51 -0800 (PST) X-Google-Smtp-Source: AGHT+IEhG/H65FJgVIgIMct7c436Ly0awhq9JS+dGahqCsCj/fUp08nzQcSwgVkOX60V7UbCJTFL X-Received: by 2002:a17:90b:3d2:b0:27d:8a04:f964 with SMTP id go18-20020a17090b03d200b0027d8a04f964mr21242611pjb.24.1701242691023; Tue, 28 Nov 2023 23:24:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701242691; cv=none; d=google.com; s=arc-20160816; b=GSnfg0zDvBkcO/fm1g65q0nth8Rabx1VOh/B1WPsHUlwTGTbseEabiQC022LqcnoK1 clb1ofKuAaPpQTdzRgF1IUXtKkvoTk2G3wJVCSz9q7Js8HoQs3Udaljtz2LeuDz3vehX LuRDGLbYCYRoa1aJ+/j7yMpv6tLDdNFVt+olOZT1uxti9WpSruXE01htPDjM7BbxmEmV bblJxECgX3V4LpyCEQNdWGP3I3FlvPnzZMxz9ZnGqpkPmAWp6zDv6mvfO5JjuN+0wxgt BeUGqi1LOJMKHXHz3W1lliXWWFu3qAHktCVuVtYyC7OokvTBfmDIPRywBXkCbaUZuSAP T3xA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:subject:user-agent:mime-version:date:message-id; bh=yw4apekfHBV7qXPBLERhUfuTTu7nhe7evJkihtC2HgY=; fh=pjgD2lpp3U/D22Mo0KR2RRsiShcCmLodakUBnz3EIsc=; b=s00rQrkORI+BMQJnaZOg2LjXu1igV5gQfinQk1+hEfGFSgRA3o0AtonpVpNBWMHJ+s ExTjV12RyZn+5GKasvl8EEblCdmIRxFFazPlZO1gf96sG2L/oaZhBP9JTgs0/RnNFBWz +bMhbmV198x6s3m4bRiA3z596zKAP4PD6ReJe2a9ub6ArvRRm7/ajh/STuwF5Y6HNhVz 4vxZC0B5UuKxs3siAgzRJgDGZyLJF1v4F9X8h86R5keLqEt6ycv9Dnz6H8j4rIarDsCn vC5RgKxW5PFodjNAgSDz4VIQWBTQig0UzmRXbThbudz9Xlc07xAq0rYdV/aO+RlaMuQn w9CQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id ik8-20020a170902ab0800b001cc59201d1esi13368689plb.172.2023.11.28.23.24.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Nov 2023 23:24:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 9409A804C666; Tue, 28 Nov 2023 23:24:48 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229535AbjK2HY0 (ORCPT + 99 others); Wed, 29 Nov 2023 02:24:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47948 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229464AbjK2HYZ (ORCPT ); Wed, 29 Nov 2023 02:24:25 -0500 Received: from mx2.zhaoxin.com (mx2.zhaoxin.com [203.110.167.99]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4EB99C9 for ; Tue, 28 Nov 2023 23:24:30 -0800 (PST) X-ASG-Debug-ID: 1701242666-1eb14e538b24120001-xx1T2L Received: from ZXSHMBX1.zhaoxin.com (ZXSHMBX1.zhaoxin.com [10.28.252.163]) by mx2.zhaoxin.com with ESMTP id twgbnlQnld3dfeFl (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Wed, 29 Nov 2023 15:24:26 +0800 (CST) X-Barracuda-Envelope-From: LeoLiu-oc@zhaoxin.com X-Barracuda-RBL-Trusted-Forwarder: 10.28.252.163 Received: from ZXBJMBX03.zhaoxin.com (10.29.252.7) by ZXSHMBX1.zhaoxin.com (10.28.252.163) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Wed, 29 Nov 2023 15:24:26 +0800 Received: from [192.168.1.204] (125.76.214.122) by ZXBJMBX03.zhaoxin.com (10.29.252.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Wed, 29 Nov 2023 15:24:24 +0800 X-Barracuda-RBL-Trusted-Forwarder: 10.28.252.163 Message-ID: <8c2cca04-140a-4b0c-b478-5bdc437b5413@zhaoxin.com> X-Barracuda-RBL-Trusted-Forwarder: 192.168.1.204 Date: Wed, 29 Nov 2023 15:24:23 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3] crypto: x86/sm2 -add Zhaoxin SM2 algorithm implementation To: Dave Hansen , , , , , , , , , , , , , , , , , X-ASG-Orig-Subj: Re: [PATCH v3] crypto: x86/sm2 -add Zhaoxin SM2 algorithm implementation CC: , , , References: <20231109094744.545887-1-LeoLiu-oc@zhaoxin.com> <20231122064355.638946-1-LeoLiu-oc@zhaoxin.com> From: LeoLiu-oc In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [125.76.214.122] X-ClientProxiedBy: ZXSHCAS1.zhaoxin.com (10.28.252.161) To ZXBJMBX03.zhaoxin.com (10.29.252.7) X-Barracuda-Connect: ZXSHMBX1.zhaoxin.com[10.28.252.163] X-Barracuda-Start-Time: 1701242666 X-Barracuda-Encrypted: ECDHE-RSA-AES128-GCM-SHA256 X-Barracuda-URL: https://10.28.252.36:4443/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at zhaoxin.com X-Barracuda-Scan-Msg-Size: 745 X-Barracuda-BRTS-Status: 1 X-Barracuda-Bayes: INNOCENT GLOBAL 0.0000 1.0000 -2.0210 X-Barracuda-Spam-Score: -2.02 X-Barracuda-Spam-Status: No, SCORE=-2.02 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=9.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.117408 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-Spam-Status: No, score=-0.8 required=5.0 tests=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 groat.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 (groat.vger.email [0.0.0.0]); Tue, 28 Nov 2023 23:24:48 -0800 (PST) 在 2023/11/22 22:26, Dave Hansen 写道: >> +/* Zhaoxin sm2 verify function */ >> +static inline size_t zhaoxin_gmi_sm2_verify(unsigned char *key, unsigned char *hash, >> + unsigned char *sig, unsigned char *scratch) >> +{ >> + size_t result; >> + >> + asm volatile( >> + ".byte 0xf2, 0x0f, 0xa6, 0xc0" >> + :"=c"(result) >> + :"a"(hash), "b"(key), "d"(SM2_CWORD_VERIFY), "S"(scratch), "D"(sig) >> + :"memory"); >> + >> + return result; >> +} > > What version of binutils supports this new instruction? > The instruction has not yet been submitted to binutils. It will only be used in the Zhaoxin-rng driver, and we are evaluating the necessity of submitting it to binutils. Yours sincerely, Leoliu-oc