Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Will Deacon <will@kernel.org>
To: James Morse <james.morse@arm.com>
Cc: linux-arm-kernel@lists.infradead.org,
	Russell King <linux@armlinux.org.uk>,
	Ard Biesheuvel <ardb@kernel.org>,
	Catalin Marinas <catalin.marinas@arm.com>
Subject: Re: [PATCH v2 0/2] ARM/arm64: errata: Remove AES hwcap for 32bit tasks on A57/A72
Date: Wed, 20 Apr 2022 11:15:23 +0100	[thread overview]
Message-ID: <20220420101523.GA7286@willie-the-truck> (raw)
In-Reply-To: <20220413170545.3042558-1-james.morse@arm.com>

On Wed, Apr 13, 2022 at 06:05:43PM +0100, James Morse wrote:
> Hello,
> 
> These patches remove the AES HWCAP on A57 and A72 for aarch32 user-space
> processes due to erratum #1742098 and #1655431. An interrupt between two
> instructions will cause these parts to get the wrong result.
> These extensions are optional, so software should have a fallback
> implementation.
> 
> The 32bit patch is new for v2, as Ard points out the behaviour should
> be the same here.
> 
> Operating on the HWCAP bitmap directly avoids affecting KVM, which
> was the problem with v1. But it does mean HWCAP_PMULL is still visible
> to aarch32 processes. This isn't affected by the erratum, but is detected
> from the same field in the ID register. PMULL is value '2', AES is value '1'.
> User-space would be crazy to let PMULL imply AES, right ...

That seems like a completely sensible thing for userspace to do :/

The Arm ARM states:


AES, bits [7:4]
Indicates support for AES instructions in AArch64 state. Defined values are:
0b0000 No AES instructions implemented.
0b0001 AESE, AESD, AESMC, and AESIMC instructions implemented.
0b0010 As for 0b0001 , plus PMULL/PMULL2 instructions operating on 64-bit data quantities.


So PMULL is defined to include AES.

Will

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

      parent reply	other threads:[~2022-04-20 10:16 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
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 ` Will Deacon [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=20220420101523.GA7286@willie-the-truck \
    --to=will@kernel.org \
    --cc=ardb@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=james.morse@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux@armlinux.org.uk \
    /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