All of lore.kernel.org
 help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: Ard Biesheuvel <ardb@kernel.org>
Cc: linux-crypto@vger.kernel.org, ebiggers@kernel.org
Subject: Re: [PATCH] crypto: crypto_xor - use helpers for unaligned accesses
Date: Wed, 23 Feb 2022 14:50:03 +1200	[thread overview]
Message-ID: <YhWg246ql3Xa0MRR@gondor.apana.org.au> (raw)
In-Reply-To: <20220215105717.184572-1-ardb@kernel.org>

On Tue, Feb 15, 2022 at 11:57:17AM +0100, Ard Biesheuvel wrote:
> Dereferencing a misaligned pointer is undefined behavior in C, and may
> result in codegen on architectures such as ARM that trigger alignments
> traps and expensive fixups in software.
> 
> Instead, use the get_aligned()/put_aligned() accessors, which are cheap
> or even completely free when CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y.
> 
> In the converse case, the prior alignment checks ensure that the casts
> are safe, and so no unaligned accessors are necessary.
> 
> Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
> ---
>  crypto/algapi.c         | 24 +++++++++++++++++++++---
>  include/crypto/algapi.h | 11 +++++++++--
>  2 files changed, 30 insertions(+), 5 deletions(-)

Ard, could you please take a look at the two kbuild reports and
see if there is an issue that needs to be resolved?

Thanks,
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

  parent reply	other threads:[~2022-02-23  2:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-15 10:57 [PATCH] crypto: crypto_xor - use helpers for unaligned accesses Ard Biesheuvel
2022-02-15 13:47 ` kernel test robot
2022-02-15 13:47   ` kernel test robot
2022-02-15 17:01 ` kernel test robot
2022-02-15 17:01   ` kernel test robot
2022-02-23  2:50 ` Herbert Xu [this message]
2022-02-23  6:44   ` Ard Biesheuvel

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=YhWg246ql3Xa0MRR@gondor.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=ardb@kernel.org \
    --cc=ebiggers@kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.