From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E7CBEC433EF for ; Tue, 1 Mar 2022 11:50:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229603AbiCALvB (ORCPT ); Tue, 1 Mar 2022 06:51:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44038 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229508AbiCALvB (ORCPT ); Tue, 1 Mar 2022 06:51:01 -0500 Received: from out30-45.freemail.mail.aliyun.com (out30-45.freemail.mail.aliyun.com [115.124.30.45]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F121A81180; Tue, 1 Mar 2022 03:50:19 -0800 (PST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R121e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04400;MF=tianjia.zhang@linux.alibaba.com;NM=1;PH=DS;RN=17;SR=0;TI=SMTPD_---0V5yl0n-_1646135412; Received: from 30.240.100.72(mailfrom:tianjia.zhang@linux.alibaba.com fp:SMTPD_---0V5yl0n-_1646135412) by smtp.aliyun-inc.com(127.0.0.1); Tue, 01 Mar 2022 19:50:15 +0800 Message-ID: <52be961d-a00d-785d-8fb1-15b1a17bd74e@linux.alibaba.com> Date: Tue, 1 Mar 2022 19:50:12 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Subject: Re: [PATCH 1/3] crypto: sm4 - create SM4 library based on sm4 generic code Content-Language: en-US To: "Jason A. Donenfeld" Cc: Herbert Xu , "David S. Miller" , Catalin Marinas , Will Deacon , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , Gilad Ben-Yossef , Ard Biesheuvel , "Markku-Juhani O . Saarinen" , Jussi Kivilinna , x86@kernel.org, linux-crypto@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <20210610134459.28541-1-tianjia.zhang@linux.alibaba.com> <20210610134459.28541-2-tianjia.zhang@linux.alibaba.com> From: Tianjia Zhang In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Hi Jason, On 3/1/22 6:34 PM, Jason A. Donenfeld wrote: >> lib/crypto/Kconfig | 3 + >> lib/crypto/Makefile | 3 + >> lib/crypto/sm4.c | 184 +++++++++++++++++++++++++++++++++++++++++++ > > If this is only used by the crypto API, it does not belong in > lib/crypto. I understand you want fallback generic code for the SIMD > implementation, but we've generally done that in crypto/ when the use > case is only the crypto API. Can you move this to the right place? This is not only used by the crypto API, but also used for SIMD acceleration under the x86 and arm architectures, mainly for processing the remaining blocks after SIMD acceleration. In general, the performance of SIMD processing a single block is not as good as that of general software implementations. Kind regards, Tianjia From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 62541C433F5 for ; Tue, 1 Mar 2022 11:51:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=rf9znKtKn3ARyb0S/nZtJqo5Awumxm1ipQiC35lLOmc=; b=WnwSKEzCUagxmS z6lORzrFproPCfQm3immlMBLgcjJJrSTKjjESN/FKw1B74AjvGMu3a+jbP0gs0DABMOCDmdRbi9Ps sQ4yujQnnBQV4Mxuv7ACQ9fkzlKk0bDseBtZS67pt9nz9/8Ikcwh8DahMdmrjoQtU4MJhX4MZXLNN BS/O6Q7lcME0oPvLWdPKWIiNLz8tPeBbStWD/SkBAjlF+24wLp1Lv3bmrannxGJasDhC8jo28Hlb+ hdo9qemQlImPgT8ReV9eaIGpv3Rmi1gjS9eKmoBocnqRaQzJj7qfOXwv9qFI7zaVM/MhDkPc2zg3x 7UcRisZBABzpRIXW40+g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nP11P-00GTqL-Ue; Tue, 01 Mar 2022 11:50:28 +0000 Received: from out30-43.freemail.mail.aliyun.com ([115.124.30.43]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nP11L-00GToA-Ov for linux-arm-kernel@lists.infradead.org; Tue, 01 Mar 2022 11:50:25 +0000 X-Alimail-AntiSpam: AC=PASS; BC=-1|-1; BR=01201311R121e4; CH=green; DM=||false|; DS=||; FP=0|-1|-1|-1|0|-1|-1|-1; HT=e01e04400; MF=tianjia.zhang@linux.alibaba.com; NM=1; PH=DS; RN=17; SR=0; TI=SMTPD_---0V5yl0n-_1646135412; Received: from 30.240.100.72(mailfrom:tianjia.zhang@linux.alibaba.com fp:SMTPD_---0V5yl0n-_1646135412) by smtp.aliyun-inc.com(127.0.0.1); Tue, 01 Mar 2022 19:50:15 +0800 Message-ID: <52be961d-a00d-785d-8fb1-15b1a17bd74e@linux.alibaba.com> Date: Tue, 1 Mar 2022 19:50:12 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Subject: Re: [PATCH 1/3] crypto: sm4 - create SM4 library based on sm4 generic code Content-Language: en-US To: "Jason A. Donenfeld" Cc: Herbert Xu , "David S. Miller" , Catalin Marinas , Will Deacon , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , Gilad Ben-Yossef , Ard Biesheuvel , "Markku-Juhani O . Saarinen" , Jussi Kivilinna , x86@kernel.org, linux-crypto@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <20210610134459.28541-1-tianjia.zhang@linux.alibaba.com> <20210610134459.28541-2-tianjia.zhang@linux.alibaba.com> From: Tianjia Zhang In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220301_035024_033234_A0E4AC8F X-CRM114-Status: GOOD ( 12.51 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Jason, On 3/1/22 6:34 PM, Jason A. Donenfeld wrote: >> lib/crypto/Kconfig | 3 + >> lib/crypto/Makefile | 3 + >> lib/crypto/sm4.c | 184 +++++++++++++++++++++++++++++++++++++++++++ > > If this is only used by the crypto API, it does not belong in > lib/crypto. I understand you want fallback generic code for the SIMD > implementation, but we've generally done that in crypto/ when the use > case is only the crypto API. Can you move this to the right place? This is not only used by the crypto API, but also used for SIMD acceleration under the x86 and arm architectures, mainly for processing the remaining blocks after SIMD acceleration. In general, the performance of SIMD processing a single block is not as good as that of general software implementations. Kind regards, Tianjia _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel