Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp2794016pxp; Mon, 14 Mar 2022 05:13:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyLaWvX8JZy5EYiYKwmOyqG08PQVZu/GN42o0TXqxTBLymjzcLELxxCPgEsiaFFX7ZWdXAL X-Received: by 2002:a17:907:d01:b0:6d7:9f7f:ef8a with SMTP id gn1-20020a1709070d0100b006d79f7fef8amr18874646ejc.656.1647260018308; Mon, 14 Mar 2022 05:13:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647260018; cv=none; d=google.com; s=arc-20160816; b=taSZ1mYm1HLF1nIgzPdQun0gti0q4wnhcxKOnyb7x91mOFyDkHJO6KJaBT7yhgPE8W fophp4pJd8escSK4Y2UOmIX1gEwUA2vXtB8et1URPo1mUU9Ur2JyJlCbsH2Btag5f8T+ sF0RF5wtVuwcml9TBdqpNu+BNr0M5v6zJUT6vFGxhm/gm9+zGyFbwIpoZDtUNs4is7Me 1Go+JK0VzhEGzTq7Hxs1/au2x9ZW9c+QAB/i+ISMOEsKOs9btkWrqpV0ACvlFsIcxqeD GFnD3w5LpcpeiN2w/ytaH94TCZDwCCg/2g9tIPzUbaKa414U+PsYgqd3W5Qqf/xUpLte xx9g== 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:content-language:subject:user-agent:mime-version :date:message-id; bh=BF3I8Ov+ZIoNewHpjqoCww+A6PfdG4qlCMJyayNtuUY=; b=sG7dP6izKb6IgCNqqV5ihCDMvSkVS1l5prQL1/wkNL2oxs7hfYKni6xSXmej3khMG5 GUe7iZbgXd6GwA848ULbOBA1vmTLiFwR26I1YDWnKoIZeAX0g9/rB4LDnqEkIlIe3/6b 9uH+qDjcxfFdUcPqfdVzKIpvNxlgawUJz7dgFx34gDOGvhHs6DnYyEBXMa/9Ka29BHcd MgZbNQUvQcK5/yRSkFSqyxcBd6g5YtXbV5Bvj6jZ4Su3Zx47TpEA+JKWpOsu1ZMuDzA6 D7EFplirZ+zuXgSZWZF4JY2SeaCD5LVCG7PVogV/DeZvDmEM4JZ7ii64ZSpoLKyPyvyl kDYA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y9-20020a50f1c9000000b00415a0f61476si9636794edl.389.2022.03.14.05.13.06; Mon, 14 Mar 2022 05:13:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235926AbiCNCdo (ORCPT + 99 others); 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 X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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