All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Rutland <mark.rutland@arm.com>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Alex Matveev <alxmtvv@gmail.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"linux-crypto@vger.kernel.org" <linux-crypto@vger.kernel.org>,
	Sami Tolvanen <samitolvanen@google.com>,
	Andi Kleen <ak@linux.intel.com>,
	Greg Hackmann <ghackmann@google.com>,
	Kees Cook <keescook@chromium.org>,
	Michal Marek <michal.lkml@markovi.net>,
	Nick Desaulniers <ndesaulniers@google.com>,
	Yury Norov <ynorov@caviumnetworks.com>,
	Matthias Kaehlcke <mka@chromium.org>,
	Will Deacon <will.deacon@arm.com>,
	Herbert Xu <herbert@gondor.apana.org.au>
Subject: Re: [PATCH] crypto/arm64: aes-ce-cipher - move assembler code to .S file
Date: Wed, 22 Nov 2017 12:04:58 +0000	[thread overview]
Message-ID: <20171122120457.cf47mwmg4pudzoy4@lakrids.cambridge.arm.com> (raw)
In-Reply-To: <CAKv+Gu8Tde_yu-3MWFEgdaWDWtf1SssUAMc1s396zL=J-j+buA@mail.gmail.com>

On Wed, Nov 22, 2017 at 10:12:17AM +0000, Ard Biesheuvel wrote:
> On 22 November 2017 at 10:05, Alex Matveev <alxmtvv@gmail.com> wrote:
> > This is better than my simple fix, thank you.
> >
> > Out of curiosity, why doesn't NEON code use barrier() to prevent
> > reordering?
> 
> Because barrier() affects ordering of memory accesses, not register accesses.

My understanding was that barrier() also hazards with any volatile asm
(and that in general, volatile asm block couldn't be re-ordered w.r.t.
one another). I'm sure we rely on this, even if it's not true. :/

So making the asm statements volatile might work too.

Thanks,
Mark.

WARNING: multiple messages have this Message-ID (diff)
From: mark.rutland@arm.com (Mark Rutland)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] crypto/arm64: aes-ce-cipher - move assembler code to .S file
Date: Wed, 22 Nov 2017 12:04:58 +0000	[thread overview]
Message-ID: <20171122120457.cf47mwmg4pudzoy4@lakrids.cambridge.arm.com> (raw)
In-Reply-To: <CAKv+Gu8Tde_yu-3MWFEgdaWDWtf1SssUAMc1s396zL=J-j+buA@mail.gmail.com>

On Wed, Nov 22, 2017 at 10:12:17AM +0000, Ard Biesheuvel wrote:
> On 22 November 2017 at 10:05, Alex Matveev <alxmtvv@gmail.com> wrote:
> > This is better than my simple fix, thank you.
> >
> > Out of curiosity, why doesn't NEON code use barrier() to prevent
> > reordering?
> 
> Because barrier() affects ordering of memory accesses, not register accesses.

My understanding was that barrier() also hazards with any volatile asm
(and that in general, volatile asm block couldn't be re-ordered w.r.t.
one another). I'm sure we rely on this, even if it's not true. :/

So making the asm statements volatile might work too.

Thanks,
Mark.

  reply	other threads:[~2017-11-22 12:05 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-21 13:40 [PATCH] crypto/arm64: aes-ce-cipher - move assembler code to .S file Ard Biesheuvel
2017-11-21 13:40 ` Ard Biesheuvel
2017-11-21 17:32 ` Nick Desaulniers
2017-11-21 17:32   ` Nick Desaulniers
2017-11-22 10:05 ` Alex Matveev
2017-11-22 10:05   ` Alex Matveev
2017-11-22 10:12   ` Ard Biesheuvel
2017-11-22 10:12     ` Ard Biesheuvel
2017-11-22 12:04     ` Mark Rutland [this message]
2017-11-22 12:04       ` Mark Rutland
2017-11-22 12:17       ` Mark Rutland
2017-11-22 12:17         ` Mark Rutland
2017-11-29  6:38 ` Herbert Xu
2017-11-29  6:38   ` 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=20171122120457.cf47mwmg4pudzoy4@lakrids.cambridge.arm.com \
    --to=mark.rutland@arm.com \
    --cc=ak@linux.intel.com \
    --cc=alxmtvv@gmail.com \
    --cc=ard.biesheuvel@linaro.org \
    --cc=ghackmann@google.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=keescook@chromium.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=michal.lkml@markovi.net \
    --cc=mka@chromium.org \
    --cc=ndesaulniers@google.com \
    --cc=samitolvanen@google.com \
    --cc=will.deacon@arm.com \
    --cc=ynorov@caviumnetworks.com \
    /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.