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 E275FC433F5 for ; Mon, 14 Mar 2022 02:32:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235926AbiCNCdo (ORCPT ); Sun, 13 Mar 2022 22:33:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44450 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233265AbiCNCdn (ORCPT ); Sun, 13 Mar 2022 22:33:43 -0400 Received: from out30-131.freemail.mail.aliyun.com (out30-131.freemail.mail.aliyun.com [115.124.30.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0FB46117D; Sun, 13 Mar 2022 19:32:32 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R111e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04423;MF=tianjia.zhang@linux.alibaba.com;NM=1;PH=DS;RN=18;SR=0;TI=SMTPD_---0V72sF0B_1647225146; Received: from 30.240.100.21(mailfrom:tianjia.zhang@linux.alibaba.com fp:SMTPD_---0V72sF0B_1647225146) by smtp.aliyun-inc.com(127.0.0.1); Mon, 14 Mar 2022 10:32:28 +0800 Message-ID: Date: Mon, 14 Mar 2022 10:32:25 +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" , Eric Biggers 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 ML , Linux Crypto Mailing List , linux-arm-kernel , LKML 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/12/22 7:03 AM, Jason A. Donenfeld wrote: > Hi Tianjia, > > On Wed, Mar 2, 2022 at 3:23 PM Eric Biggers wrote: >> >> On Wed, Mar 02, 2022 at 01:26:13AM +0100, Jason A. Donenfeld wrote: >>> On Wed, Mar 2, 2022 at 1:24 AM Herbert Xu wrote: >>>> >>>> On Tue, Mar 01, 2022 at 11:34:28AM +0100, 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. >>>> >>>> Nope there is no such rule. lib/crypto is fine if you're adding >>>> code that is shared between crypto and arch/*/crypto. >>> >>> The sprawling madness continues then... Noted. >> >> I think it would make more sense for this code to be in crypto/, for the reason >> that Jason gave. > > Were you planning on submitting a patch for this? > > Thanks, > Jason I agree with Herbert that this is not necessary and the community is currently not in agreement on this point, and I'd be happy to do the work if there's a more reasonable reason. Thanks so much for your suggestion. Best 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 BB705C433F5 for ; Mon, 14 Mar 2022 02:35:21 +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=k97c15WMwcLCiQ+E1H4RoAq74gs6D5TK/+Qong70Elo=; b=x5/+0NBpRXFE8x grO+wxzsvTab1qjWg7aE8mpZXCNVWV+f0vVwiS1Nuy05IsghvkCxv9eWRAMRRhtktACAdCI4aKnzl zo/fH9rJEheCRwkQNErrKhM94J4WUEUKP+yIIKyaHhl8PdmUoHem567p6vrLcgTOWVoU9u+LaRTO+ qaTXyua9RtCJaHV1zZL18e7EdTiVA3pdBy+QpQbOLlAPKSefVgooiqbjt19HyD2jhXj+ks9K6hb7O ZUqrosCWr3FwxojDcyDMWxQcfmUZo3WHKuBKgfu6U0Iq+Mq1VlGWnbExLaiyXfQeGFSDTaGWtDRwL o9KqocJlKtMSfbxLlnZA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nTaVl-003daH-SB; Mon, 14 Mar 2022 02:32:41 +0000 Received: from out30-57.freemail.mail.aliyun.com ([115.124.30.57]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nTaVh-003dZG-8y for linux-arm-kernel@lists.infradead.org; Mon, 14 Mar 2022 02:32:39 +0000 X-Alimail-AntiSpam: AC=PASS; BC=-1|-1; BR=01201311R111e4; CH=green; DM=||false|; DS=||; FP=0|-1|-1|-1|0|-1|-1|-1; HT=e01e04423; MF=tianjia.zhang@linux.alibaba.com; NM=1; PH=DS; RN=18; SR=0; TI=SMTPD_---0V72sF0B_1647225146; Received: from 30.240.100.21(mailfrom:tianjia.zhang@linux.alibaba.com fp:SMTPD_---0V72sF0B_1647225146) by smtp.aliyun-inc.com(127.0.0.1); Mon, 14 Mar 2022 10:32:28 +0800 Message-ID: Date: Mon, 14 Mar 2022 10:32:25 +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" , Eric Biggers 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 ML , Linux Crypto Mailing List , linux-arm-kernel , LKML 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-20220313_193237_558193_94B11160 X-CRM114-Status: GOOD ( 18.80 ) 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/12/22 7:03 AM, Jason A. Donenfeld wrote: > Hi Tianjia, > > On Wed, Mar 2, 2022 at 3:23 PM Eric Biggers wrote: >> >> On Wed, Mar 02, 2022 at 01:26:13AM +0100, Jason A. Donenfeld wrote: >>> On Wed, Mar 2, 2022 at 1:24 AM Herbert Xu wrote: >>>> >>>> On Tue, Mar 01, 2022 at 11:34:28AM +0100, 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. >>>> >>>> Nope there is no such rule. lib/crypto is fine if you're adding >>>> code that is shared between crypto and arch/*/crypto. >>> >>> The sprawling madness continues then... Noted. >> >> I think it would make more sense for this code to be in crypto/, for the reason >> that Jason gave. > > Were you planning on submitting a patch for this? > > Thanks, > Jason I agree with Herbert that this is not necessary and the community is currently not in agreement on this point, and I'd be happy to do the work if there's a more reasonable reason. Thanks so much for your suggestion. Best regards, Tianjia _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel