linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Martin Willi <martin@strongswan.org>
To: Ard Biesheuvel <ardb@kernel.org>, linux-crypto@vger.kernel.org
Cc: Herbert Xu <herbert@gondor.apana.org.au>,
	Eric Biggers <ebiggers@kernel.org>
Subject: Re: [PATCH] crypto: x86/chacha-sse3 - use unaligned loads for state array
Date: Wed, 08 Jul 2020 13:56:23 +0200	[thread overview]
Message-ID: <0f96bc45b0394ffa80ff215f4db8092c577a1d91.camel@strongswan.org> (raw)
In-Reply-To: <20200708091118.1389-1-ardb@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 <martin@strongswan.org>

Thanks,
Martin


  reply	other threads:[~2020-07-08 11:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-08  9:11 [PATCH] crypto: x86/chacha-sse3 - use unaligned loads for state array Ard Biesheuvel
2020-07-08 11:56 ` Martin Willi [this message]
2020-07-08 16:19 ` Eric Biggers
2020-07-16 11:54 ` Herbert Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0f96bc45b0394ffa80ff215f4db8092c577a1d91.camel@strongswan.org \
    --to=martin@strongswan.org \
    --cc=ardb@kernel.org \
    --cc=ebiggers@kernel.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).