All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ard Biesheuvel <ardb@kernel.org>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Linux Crypto Mailing List <linux-crypto@vger.kernel.org>,
	Eric Biggers <ebiggers@kernel.org>
Subject: Re: [PATCH] crypto: crypto_xor - use helpers for unaligned accesses
Date: Wed, 23 Feb 2022 07:44:56 +0100	[thread overview]
Message-ID: <CAMj1kXGKtLagHZsZV2KMGNqp3Cn8V6c8CJvLhrFJ63ND33XNqQ@mail.gmail.com> (raw)
In-Reply-To: <YhWg246ql3Xa0MRR@gondor.apana.org.au>

On Wed, 23 Feb 2022 at 03:50, Herbert Xu <herbert@gondor.apana.org.au> wrote:
>
> 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?
>

My patch is flawed - I'll fix it and send a v2.

      reply	other threads:[~2022-02-23  6:45 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
2022-02-23  6:44   ` Ard Biesheuvel [this message]

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=CAMj1kXGKtLagHZsZV2KMGNqp3Cn8V6c8CJvLhrFJ63ND33XNqQ@mail.gmail.com \
    --to=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 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.