From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.5 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 656E0C433E3 for ; Thu, 16 Jul 2020 11:54:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 499DA20739 for ; Thu, 16 Jul 2020 11:54:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728093AbgGPLyL (ORCPT ); Thu, 16 Jul 2020 07:54:11 -0400 Received: from helcar.hmeau.com ([216.24.177.18]:40062 "EHLO fornost.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726383AbgGPLyL (ORCPT ); Thu, 16 Jul 2020 07:54:11 -0400 Received: from gwarestrin.arnor.me.apana.org.au ([192.168.0.7]) by fornost.hmeau.com with smtp (Exim 4.92 #5 (Debian)) id 1jw2Sm-0008KH-M7; Thu, 16 Jul 2020 21:54:09 +1000 Received: by gwarestrin.arnor.me.apana.org.au (sSMTP sendmail emulation); Thu, 16 Jul 2020 21:54:08 +1000 Date: Thu, 16 Jul 2020 21:54:08 +1000 From: Herbert Xu To: Ard Biesheuvel Cc: linux-crypto@vger.kernel.org, Martin Willi , Eric Biggers Subject: Re: [PATCH] crypto: x86/chacha-sse3 - use unaligned loads for state array Message-ID: <20200716115408.GC31166@gondor.apana.org.au> 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> User-Agent: Mutt/1.10.1 (2018-07-13) 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 > --- > arch/x86/crypto/chacha-ssse3-x86_64.S | 16 ++++++++-------- > arch/x86/crypto/chacha_glue.c | 17 ++--------------- > include/crypto/chacha.h | 4 ---- > 3 files changed, 10 insertions(+), 27 deletions(-) Patch applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt