Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp693482ybt; Wed, 8 Jul 2020 09:21:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwoqGMCnCeMDHmGpXAKyEZb/8os81PAxauNg/vaXoVZo4HRJghk7g2QBxtKWexwHhOVVBvB X-Received: by 2002:a50:fd84:: with SMTP id o4mr48168060edt.117.1594225281573; Wed, 08 Jul 2020 09:21:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594225281; cv=none; d=google.com; s=arc-20160816; b=V8hdFjoNa3JHca5g0QOSHaELyNsHRmFKHnDYFi9F2JuEon3UuaA0oDxlvEL1WEbQJR L9rE3nVTf5YliaB+9r/URItr8BMaO39UBvlDLxu5AzN239UWrU3mwvglZ5jzz1jdDgeh PJ8Dst1HNk7Phf9kCT86sT3E1FkM71YaGaLlr5BBceyL0UAGaVYCZkl8g68qYB/2SK0r 8/e8azuvzoxIt184ti1FEcU+UGr5TgznSqCrzXc/K7oXP9JWN2Wq14GtfqDZ0uyzSEOT KZY7XIDzk2QsfLm5WXPD2YlHongBIbz9aXM7R9nhlIwVLDwoNDnLCBZlfKTPh30LTJQ6 IVFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=xc3ohp3n5xdg9CLec04PbfHwMtD7CzH78grfYAKVO0o=; b=QPDGLCiIGossNZ3gXrEHHz3AeSU7bUAdFxdCYfKx6XiU1GQzRGXyzLZen6aNKmzeWu DdrTcYxHWpBF86DIb6kYsVnUIAJfKR8JbbBFmI261PufMJVCLAUfKj7h7VbTjZOlE6Lu eCXVg6qw1cmw865jB7QYWu5lahKcjqXkT5ce9upNHjrGy4FK25T/zcwQKMGVQRt7i+ll YTYJIXxC2BcqPjltJ4qIzETf0+W/1/rLw1V/QNMvFjEwtudaLFibi2MzMudgr4mTg2/i 7taqhlL8V9kV+eo+FY4KkBe0PqquT6VUiNChiZNrie88zl5DmLn54XaJsea/R6AtRMVo h3sw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=gqcYK4YP; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u17si223334ejj.13.2020.07.08.09.20.44; Wed, 08 Jul 2020 09:21:21 -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; dkim=pass header.i=@kernel.org header.s=default header.b=gqcYK4YP; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730327AbgGHQTI (ORCPT + 99 others); Wed, 8 Jul 2020 12:19:08 -0400 Received: from mail.kernel.org ([198.145.29.99]:45410 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728148AbgGHQTH (ORCPT ); Wed, 8 Jul 2020 12:19:07 -0400 Received: from sol.localdomain (c-107-3-166-239.hsd1.ca.comcast.net [107.3.166.239]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 67C6620786; Wed, 8 Jul 2020 16:19:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1594225147; bh=ILofiPLbQqaWS+EUL/qahZP/Sgv6I/5/9ddjVJu3z74=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=gqcYK4YPaZVgpxOdesnQg6qr68/5KFc1IC8si4P4Zm+fcuJF/Nt5u0PBTlqgSBP6I pC8pjT4rCULlt3eifdd/QVpw5GadZqR7WyjgqhkZbNBUww4i3pxCWeG7cpQh1BYnej uwTjlaIXP64aq/2S5dtk1KDys5uMJVkOy3uhKiXk= Date: Wed, 8 Jul 2020 09:19:06 -0700 From: Eric Biggers To: Ard Biesheuvel Cc: linux-crypto@vger.kernel.org, Martin Willi , Herbert Xu Subject: Re: [PATCH] crypto: x86/chacha-sse3 - use unaligned loads for state array Message-ID: <20200708161906.GA4557@sol.localdomain> References: <20200708091118.1389-1-ardb@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200708091118.1389-1-ardb@kernel.org> Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Wed, Jul 08, 2020 at 12:11:18PM +0300, Ard Biesheuvel wrote: > 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. > > Cc: Martin Willi > Cc: Herbert Xu > Cc: Eric Biggers > Signed-off-by: Ard Biesheuvel Reviewed-by: Eric Biggers