All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Morse <james.morse@arm.com>
To: Ard Biesheuvel <ardb@kernel.org>
Cc: Linux ARM <linux-arm-kernel@lists.infradead.org>,
	Russell King <linux@armlinux.org.uk>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>
Subject: Re: [PATCH v2 1/2] arm64: errata: Remove AES hwcap for COMPAT tasks
Date: Thu, 14 Apr 2022 18:45:18 +0100	[thread overview]
Message-ID: <32d748a9-1199-b72d-1dd3-d64ce0392cd0@arm.com> (raw)
In-Reply-To: <CAMj1kXEcF7oPRaPCfwDPCdws2N7dbxvdKYM7yzzTyySAUxF9MA@mail.gmail.com>

Hi Ard,

On 13/04/2022 18:33, Ard Biesheuvel wrote:
> On Wed, 13 Apr 2022 at 19:06, James Morse <james.morse@arm.com> wrote:
>>
>> Cortex-A57 and Cortex-A72 have an erratum where an interrupt that
>> occurs between a pair of AES instructions in aarch32 mode may corrupt
>> the ELR. The task will subsequently produce the wrong AES result.
>>
>> The AES instructions are part of the cryptographic extensions, which are
>> optional. User-space software will detect the support for these
>> instructions from the hwcaps. If the platform doesn't support these
>> instructions a software implementation should be used.
>>
>> Remove the hwcap bits on affected parts to indicate user-space should
>> not use the AES instructions.
>>
>> Signed-off-by: James Morse <james.morse@arm.com>
> 
> Acked-by: Ard Biesheuvel <ardb@kernel.org>

Thanks!

> One nit/question below,


>> diff --git a/arch/arm64/kernel/cpu_errata.c b/arch/arm64/kernel/cpu_errata.c
>> index 4c9b5b4b7a0b..8f85dac4cd79 100644
>> --- a/arch/arm64/kernel/cpu_errata.c
>> +++ b/arch/arm64/kernel/cpu_errata.c
>> @@ -393,6 +393,14 @@ static struct midr_range trbe_write_out_of_range_cpus[] = {
>>  };
>>  #endif /* CONFIG_ARM64_WORKAROUND_TRBE_WRITE_OUT_OF_RANGE */
>>
>> +#ifdef CONFIG_ARM64_ERRATUM_1742098
>> +static struct midr_range broken_aarch32_aes[] = {
>> +       MIDR_ALL_VERSIONS(MIDR_CORTEX_A57),

> Not sure it matters, but are you sure early A57 is affected as well?

That's what I remember reading last time too - but this is what the errata document on
developer.arm.com says. It's something I'm chasing up...


Thanks,

James

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2022-04-14 17:50 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-13 17:05 [PATCH v2 0/2] ARM/arm64: errata: Remove AES hwcap for 32bit tasks on A57/A72 James Morse
2022-04-13 17:05 ` [PATCH v2 1/2] arm64: errata: Remove AES hwcap for COMPAT tasks James Morse
2022-04-13 17:33   ` Ard Biesheuvel
2022-04-14 17:45     ` James Morse [this message]
2022-04-14 10:03   ` Will Deacon
2022-04-14 17:43     ` James Morse
2022-04-20 10:17       ` Will Deacon
2022-07-14 16:05         ` James Morse
2022-04-13 17:05 ` [PATCH v2 2/2] ARM: Remove AES hwcap for parts affected by errata James Morse
2022-04-13 17:34   ` Ard Biesheuvel
2022-04-13 18:15   ` Russell King (Oracle)
2022-04-20 10:15 ` [PATCH v2 0/2] ARM/arm64: errata: Remove AES hwcap for 32bit tasks on A57/A72 Will Deacon

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=32d748a9-1199-b72d-1dd3-d64ce0392cd0@arm.com \
    --to=james.morse@arm.com \
    --cc=ardb@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux@armlinux.org.uk \
    --cc=will@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.