Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp810957pxp; Fri, 11 Mar 2022 15:47:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJyZ5G2X2gf/IzR0YonOBqtJ31B3Nv5SvlitR0enNnzffmrl+aKN0p0xp2BR0qetCr+B7+p9 X-Received: by 2002:a17:903:1210:b0:14f:973e:188d with SMTP id l16-20020a170903121000b0014f973e188dmr12880735plh.61.1647042467784; Fri, 11 Mar 2022 15:47:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1647042467; cv=none; d=google.com; s=arc-20160816; b=Zrt7xNIeA5Wfn44jjxyfj09WSFp70P0L3wwPso/VZGbjYyFNhV+2zR1fyUDn+DvRyQ e9uwmD/lOOUSSsQ44Ni3PdBsKD9UO6Hv/X9CCiP5ttCMOjwvWTUzzrh206thflLXVLWb Y5P/+CH+yZWbEmbVhdVzhQpOkBWuNkDL1IO5JmBtlgZ23UFX6aDCqyvvkq74VUuYlIi3 X7iFFAALaPPpKxson43BfmvQVKGNdUt3kuDozzmJq75lLvlV+/19KNx0bPol65846P30 DlwKCKPa7BwG4njXkQ9VAN9+U9iwReW+DBGW72aVqR/ADJHs8Q0LnVXM8+92oXsvioFT tBUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=iU768NbCOwlNRZFo6HjCf6YcGMUw9fVxw/WXICDda/c=; b=Dvmb4B8BgrCbG3iyR05HUkU3e0mIg7DefDCycBokyGMDm9/Gw1FOhlCBZeh+zFGIAZ //YYVEh5BCLC744dRntu1gSmlL7UXVHvm1VQuR4Y3DKvJdIfH+lcMMfu0elQiibYvDNn Rz8pU3dt4tcWiqec+OSCnZ7vKZVZdMSVJ6VY0YazKr5vdg+05KXvb1lK97dVtEn8LU3l dS+EnJWuQyOOIFZDULjfP1XG5jk8jaG3nyYt+uUoge6iXid0Kkhl+ZwbRVB4Xvx+36nH 8m2IgP8CqbELHNmS+exus6IK0iRh6kkawkUYVwwTx+8+IZGs49eIycXCD7ClP5ezHGwb FGHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zx2c4.com header.s=20210105 header.b=WkaW5kUN; spf=softfail (google.com: domain of transitioning linux-crypto-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zx2c4.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id z70-20020a633349000000b0037ff8e1187fsi8701920pgz.873.2022.03.11.15.47.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Mar 2022 15:47:47 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-crypto-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@zx2c4.com header.s=20210105 header.b=WkaW5kUN; spf=softfail (google.com: domain of transitioning linux-crypto-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zx2c4.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 76BC71DA49; Fri, 11 Mar 2022 15:04:31 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230152AbiCKXFc (ORCPT + 99 others); Fri, 11 Mar 2022 18:05:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32852 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230151AbiCKXF0 (ORCPT ); Fri, 11 Mar 2022 18:05:26 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D31787B11E; Fri, 11 Mar 2022 15:04:01 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 6F83362026; Fri, 11 Mar 2022 23:04:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6A6B4C340EC; Fri, 11 Mar 2022 23:04:00 +0000 (UTC) Authentication-Results: smtp.kernel.org; dkim=pass (1024-bit key) header.d=zx2c4.com header.i=@zx2c4.com header.b="WkaW5kUN" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zx2c4.com; s=20210105; t=1647039837; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=iU768NbCOwlNRZFo6HjCf6YcGMUw9fVxw/WXICDda/c=; b=WkaW5kUNsUQoQ5lkd8lZRDDh+IUHOmYx/Er47DStC4efvN/eGUF1RwWhzFD4R4ch51tFjI +RtLGigGZja9J8m0esqaWpYZQiKs1/f3jtUSWcQ5Ae0RVJ4wyJxIOxJEqT/ohDZTZKo1HW TgRTIT/ohJG2IwCnwlzEksIYPmU0HFI= Received: by mail.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id 38c3577c (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Fri, 11 Mar 2022 23:03:57 +0000 (UTC) Received: by mail-yb1-f172.google.com with SMTP id z30so19854368ybi.2; Fri, 11 Mar 2022 15:03:56 -0800 (PST) X-Gm-Message-State: AOAM533ldRo4bGvhINnP/C6aC9LDWpkAUlzNduiHRbHK+3EOM6WO+Cs4 4ga5KjANZs13tMpK5GIQlzm3GkXNlVj73ynlwUE= X-Received: by 2002:a05:6902:544:b0:628:df6d:a492 with SMTP id z4-20020a056902054400b00628df6da492mr10303321ybs.398.1647039833577; Fri, 11 Mar 2022 15:03:53 -0800 (PST) MIME-Version: 1.0 References: <20210610134459.28541-1-tianjia.zhang@linux.alibaba.com> <20210610134459.28541-2-tianjia.zhang@linux.alibaba.com> In-Reply-To: From: "Jason A. Donenfeld" Date: Fri, 11 Mar 2022 16:03:42 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/3] crypto: sm4 - create SM4 library based on sm4 generic code To: Eric Biggers Cc: Herbert Xu , Tianjia Zhang , "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 Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 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