Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp3798078imm; Tue, 11 Sep 2018 02:10:25 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdb/CULYYGIUZNMSN07H+rScrvP16v31YTqaJ3EzGWCr2KAtdx7+w5JDjGsfg7wxI3OZd5xp X-Received: by 2002:a62:e218:: with SMTP id a24-v6mr27922891pfi.75.1536657025026; Tue, 11 Sep 2018 02:10:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536657024; cv=none; d=google.com; s=arc-20160816; b=ciZ4tXBXZCZMhElG6zc2Vs9/dGyj33FO9ODGUAGPdPicwxTOtC/vHJo5apgyMAZznG IdJXqVbJtJ4KzsvNrr9K5a8/U58utahFVx3bY8+7wY+k0ROA7kP8qkhKAZO2A+FbpVty mTPbeIXPYLpQq6Vm7kcLAoLrALGMJqmtU1Errb5FBC1Umtq+GUqG8V+C5g3F9tQ3KnG0 A0MU1nD7Zucetz0/P/twN8jaVKkUL3fLAWEoHx7uKKoVCRdlGVYa2rKE91mD9urixWk/ Nw/QvE/AZcSzZxArVMdmNrtW//j2D+97Z79mMamzK1v1dPm/8wU2xxuYqE8KaA8mCzBv zh1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=BU8B6/28FrcBDUbZbZhjIh6gIzWf6QOEDR0KHVOcFnw=; b=EDzmKemZ2EKSUex0Fdr4l5rDq22NRWJOTZ1ON5LRsL0TFT8zuS+KZIDLcPJanCRAxG gdbwHPcjfEfrgkUiZChM08L9AzAA1Ddtivr4K4nqg/hnFcpuWfPWcIMZQsFnVa4I9lst UReMWHkwhoWweIQxdzciVPefzsS9XkjLcSvsGgWp5wELrd7TgNgRGousS8QETJBTg3JL WwXANDuC3hzei/gBNuOaEjO2N1uoumzuyzyoc1BWrqI6molq3f7igGdXClPCcxp8DYG7 05trTkRXkq0dDLi8PRCeFVao5U6uMAChX5IdUbvFrE34nP2EsQ6tS0yjn97D6uC8XQbQ Uzkg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i1-v6si20110872pgm.671.2018.09.11.02.10.01; Tue, 11 Sep 2018 02:10:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726850AbeIKOHw (ORCPT + 99 others); Tue, 11 Sep 2018 10:07:52 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:41300 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726554AbeIKOHw (ORCPT ); Tue, 11 Sep 2018 10:07:52 -0400 Received: from p4fea45ac.dip0.t-ipconnect.de ([79.234.69.172] helo=nanos) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1fzefe-0001im-98; Tue, 11 Sep 2018 11:09:18 +0200 Date: Tue, 11 Sep 2018 11:09:17 +0200 (CEST) From: Thomas Gleixner To: Samuel Neves cc: "Jason A. Donenfeld" , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, davem@davemloft.net, Greg Kroah-Hartman , Andy Lutomirski , Jean-Philippe Aumasson , Andy Polyakov , Ingo Molnar , the arch/x86 maintainers , Linux Crypto Mailing List Subject: Re: [PATCH net-next v3 05/17] zinc: ChaCha20 x86_64 implementation In-Reply-To: Message-ID: References: <20180911010838.8818-1-Jason@zx2c4.com> <20180911010838.8818-6-Jason@zx2c4.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 11 Sep 2018, Samuel Neves wrote: > On Tue, Sep 11, 2018 at 9:22 AM, Thomas Gleixner wrote: > > On Mon, 10 Sep 2018, Jason A. Donenfeld wrote: > >> lib/zinc/Makefile | 4 + > >> lib/zinc/chacha20/chacha20-x86_64-glue.h | 102 + > >> lib/zinc/chacha20/chacha20-x86_64.S | 2632 ++++++++++++++++++++++ > > > > Just a stupid question. What's the rationale of putting that into lib/zinc > > instead of having it in arch/x86/crypto? > > > > This is covered on the 02/17 commit message, whose relevant paragraph follows: Well, being only cc'ed on only half of the patches does not really help. > > It also organizes the implementations in a simple, straight-forward, > > and direct manner, making it enjoyable and intuitive to work on. > > Rather than moving optimized assembly implementations into arch/, it > > keeps them all together in lib/zinc/, making it simple and obvious to > > compare and contrast what's happening. This is, notably, exactly what > > the lib/raid6/ tree does, and that seems to work out rather well. It's > > also the pattern of most successful crypto libraries. The architecture- > > specific glue-code is made a part of each translation unit, rather than > > being in a separate one, so that generic and architecture-optimized code > > are combined at compile-time, and incompatibility branches compiled out by > > the optimizer. Fair enough.