Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp490382ybt; Wed, 8 Jul 2020 05:00:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwRrnfUpZw3xHDQxvuHXYfrExbE2yjgoEqYwAcyxWi8hvWPyVKIMOnNH0g2YPgztnr7jtI5 X-Received: by 2002:a17:906:a84d:: with SMTP id dx13mr44331262ejb.246.1594209602441; Wed, 08 Jul 2020 05:00:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594209602; cv=none; d=google.com; s=arc-20160816; b=Nj3RnCt3WTdc+tvUxyxrMX+bvt1ujRA5Pezg+JSd+qJ7yx2QTGCSHC7irH+HFZui2y FKqcNifzjVrwNF5akBHuZiEeurdKcqYcbfij3Xw3Epu9TbZJakzRaZERNSLSX3RD1DnB gbgk901o2IN/HAc0FiOAzQYdhnIFGU6HEmwxla/12bEUgGaLokHGXOobrr0h3SKuwhCJ 4mQd/lUaOtyt3NXoEjFH8faMPpfZSgz0hqqnsrfG0xEvXwtvJe+6kpcz8vw1S66fg8At FCetwUC8uTiUw//B617qCj9Zo4C4yV9pcs8feawOspT2+rJLA5vQzRGSON62Cgi5b1k/ 02hQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=P4h6NmFC3okCfVU9io9UUama4o4n6uBLbF2pNrGQ54k=; b=Kp3TusAzVPoDGBZ+lA7C/hWlwIh28wk3Zq1CZlSwt59eKUxDWGSbMHZtk0DnvQxq2/ 6OVxsTdKckjkntru3v4DtmURbG94K1zVl54BUXiJnvbBOH4AJFJToScrzKmQqt6+cNpI ps8+UZm6erKMeiihdhtBJWk/G03NUtI/hkXKq1EEXAehCvRUPEcZ/xw55mJo1rrtiUhU TpIqr7p/4t0qYSQbj877P3dEi/Y99Nez0L9kiIwB+IRkLcn0stDitlpcxtvOklKXDVAp aoD8PouP6XLI1sT/OxHc3rOIWd/wmHca8CBh5JZCvu7prLxBHRceViNqNSZ9vBGcEX5r aNcQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x18si17158497ejd.495.2020.07.08.04.59.32; Wed, 08 Jul 2020 05:00:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728965AbgGHL4Z (ORCPT + 99 others); Wed, 8 Jul 2020 07:56:25 -0400 Received: from sitav-80046.hsr.ch ([152.96.80.46]:60122 "EHLO mail.strongswan.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728592AbgGHL4Z (ORCPT ); Wed, 8 Jul 2020 07:56:25 -0400 Received: from obook (unknown [185.12.128.224]) by mail.strongswan.org (Postfix) with ESMTPSA id 4FC2F40463; Wed, 8 Jul 2020 13:56:23 +0200 (CEST) Message-ID: <0f96bc45b0394ffa80ff215f4db8092c577a1d91.camel@strongswan.org> Subject: Re: [PATCH] crypto: x86/chacha-sse3 - use unaligned loads for state array From: Martin Willi To: Ard Biesheuvel , linux-crypto@vger.kernel.org Cc: Herbert Xu , Eric Biggers Date: Wed, 08 Jul 2020 13:56:23 +0200 In-Reply-To: <20200708091118.1389-1-ardb@kernel.org> References: <20200708091118.1389-1-ardb@kernel.org> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.3-0ubuntu1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org > Due to the fact that the x86 port does not support allocating objects > on the stack with an alignment that exceeds 8 bytes, we have a rather > ugly hack in the x86 code for ChaCha to ensure that the state array > is aligned to 16 bytes, allowing the SSE3 implementation of the > algorithm to use aligned loads. > > Given that the performance benefit of using of aligned loads appears > to be limited (~0.25% for 1k blocks using tcrypt on a Corei7-8650U), > and the fact that this hack has leaked into generic ChaCha code, > let's just remove it. Reviewed-by: Martin Willi Thanks, Martin