[PATCH] arm64: errata: Remove AES hwcap for COMPAT tasks on A57 and A72
James Morse
james.morse at arm.com
Thu Jan 27 06:45:21 PST 2022
Hi Ard,
On 27/01/2022 12:39, Ard Biesheuvel wrote:
> On Thu, 27 Jan 2022 at 13:29, James Morse <james.morse at 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.
> For this patch,
>
> Acked-by: Ard Biesheuvel <ardb at kernel.org>
Thanks!
> but I will note that
> - depending on the C library used, OpenSSL may use SIGILL trapping to
> decide whether these instructions are implemented or not,
I'd argue that such software is already broken on big/little system.
If it tries on a CPU that has a feature, than migrates to one that doesn't, all bets are off.
> - the 32-bit kernel should ideally adopt the same approach,
I've had a stab at that, it will take me a little while to test it...
> Fortunately, the only A72 that is known to be widely deployed with
> 32-bit kernels and/or user space is the Raspberry Pi 4, which does not
> implement the crypto extensions.
Ah, I didn't know folk ran 32bit kernels on these.
Thanks,
James
More information about the linux-arm-kernel
mailing list