Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4409699rdh; Wed, 29 Nov 2023 00:04:59 -0800 (PST) X-Google-Smtp-Source: AGHT+IF9fenN02MsPSEtjTAiZTVHzMbcIwCS+h5eyx/IXBiJiKB8WLDxcN0fiZQ9iuyGw+JvtEay X-Received: by 2002:a05:6808:14c6:b0:3b2:f500:c1e5 with SMTP id f6-20020a05680814c600b003b2f500c1e5mr25045408oiw.29.1701245099676; Wed, 29 Nov 2023 00:04:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701245099; cv=none; d=google.com; s=arc-20160816; b=pbQJrkYkTPBYDO5i0SHU9R+D6OgoAtAPS+xQDyYDlLwxyRGgtPSjpFvYC5z8krNt23 IOA9dnJ9vYqKkiBmBmNMB5IEbOAHvCfefAB4h440QRoVPtFSQvSMDEW5yOGx5epHFUHh PS2FPsmSXY6YuK5NBkhyWO+XvWKvnSYTtcqOFt0mtNiOKvpkX9p+MyIHNxuUjE7emThd iWpCCQGRUPpyrV5VBx4hmaje+aw1JhtEl87IEaymH0SM5FxrZwe/gRwv6am4JoiZKPjO Ua03ooYfyTVpdqDaiYbnuEu2o1YwDzrkjGgtfJQticPCMMWKbF0I5+Vs3/Z61H7+z4Jd xEqQ== 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:references :cc:to:from:subject:user-agent:mime-version:date:message-id; bh=zKjOu1TPLQiq/cCjTShfpk5ebCP05Q6SRq9Yuus8Ed4=; fh=pjgD2lpp3U/D22Mo0KR2RRsiShcCmLodakUBnz3EIsc=; b=Bw2dST9tqlsD9cizuReGa9EmpCjIHVoDeytD2ylGygzSUFqA0UByVb2PPey0LlAchH j4UZOxixNT6N1qzJKNKWEB84WIYcLascW8+DRJSZ2TOIO1rqPudYY6fcUP39kfJG7FOo FLybq+WjoxJxb0f5Kz4dr4E/ys0RGJK2wxp6S9xRb1ywUAFvRkm22SIGuzrhOCeogI2r bjEDIf27LLYZvZ1bPXWRZpzRttwbyUQ/q/mTsKfL6AG5UO+AfedZpks1yKeVXmppayOH RI3F8AeHvIHVyD2WBoY7Asx6u2ZXtr9kWBV8heDNsXsXftEFmb1Y+U/xtO3xlPIreqda IYYA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id p4-20020a634204000000b005b34179728esi13549710pga.237.2023.11.29.00.04.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 00:04:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (Postfix) with ESMTP id 48F06807407F; Wed, 29 Nov 2023 00:04:57 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230265AbjK2IEl (ORCPT + 99 others); Wed, 29 Nov 2023 03:04:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36080 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230158AbjK2IEf (ORCPT ); Wed, 29 Nov 2023 03:04:35 -0500 Received: from mx2.zhaoxin.com (mx2.zhaoxin.com [203.110.167.99]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BB2E21BE3 for ; Wed, 29 Nov 2023 00:04:38 -0800 (PST) X-ASG-Debug-ID: 1701245075-1eb14e538b241f0001-xx1T2L Received: from ZXSHMBX3.zhaoxin.com (ZXSHMBX3.zhaoxin.com [10.28.252.165]) by mx2.zhaoxin.com with ESMTP id pbUlX32vwyUxf8ir (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Wed, 29 Nov 2023 16:04:35 +0800 (CST) X-Barracuda-Envelope-From: LeoLiu-oc@zhaoxin.com X-Barracuda-RBL-Trusted-Forwarder: 10.28.252.165 Received: from ZXBJMBX03.zhaoxin.com (10.29.252.7) by ZXSHMBX3.zhaoxin.com (10.28.252.165) 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 16:04:35 +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 16:04:33 +0800 X-Barracuda-RBL-Trusted-Forwarder: 10.28.252.165 Message-ID: X-Barracuda-RBL-Trusted-Forwarder: 192.168.1.204 Date: Wed, 29 Nov 2023 16:04:32 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3] crypto: x86/sm2 -add Zhaoxin SM2 algorithm implementation From: LeoLiu-oc X-ASG-Orig-Subj: Re: [PATCH v3] crypto: x86/sm2 -add Zhaoxin SM2 algorithm implementation To: Dave Hansen , , , , , , , , , , , , , , , , , CC: , , , References: <20231109094744.545887-1-LeoLiu-oc@zhaoxin.com> <20231122064355.638946-1-LeoLiu-oc@zhaoxin.com> <8c2cca04-140a-4b0c-b478-5bdc437b5413@zhaoxin.com> In-Reply-To: <8c2cca04-140a-4b0c-b478-5bdc437b5413@zhaoxin.com> 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: ZXSHMBX3.zhaoxin.com[10.28.252.165] X-Barracuda-Start-Time: 1701245075 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: 1034 X-Barracuda-BRTS-Status: 0 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.117411 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 fry.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 (fry.vger.email [0.0.0.0]); Wed, 29 Nov 2023 00:04:57 -0800 (PST) 在 2023/11/29 15:24, LeoLiu-oc 写道: > > > 在 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 sm2 driver, and we are evaluating the necessity of > submitting it to binutils. > > Yours sincerely, > Leoliu-oc Sorry, Correct a clerical error. "Zhaoxin-rng" --> "Zhaoxin sm2". Yours sincerely, Leoliu-oc