-
由 James Morse 提交于
stable inclusion from stable-v5.10.152 commit 51b96ecaedc0a12f6827f189a94f59012dde8208 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I6O293 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=51b96ecaedc0a12f6827f189a94f59012dde8208 -------------------------------- commit 44b3834b upstream. 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. Acked-by: NArd Biesheuvel <ardb@kernel.org> Signed-off-by: NJames Morse <james.morse@arm.com> Link: https://lore.kernel.org/r/20220714161523.279570-3-james.morse@arm.comSigned-off-by: NWill Deacon <will@kernel.org> [florian: removed arch/arm64/tools/cpucaps and fixup cpufeature.c] Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> conflicts: arch/arm64/Kconfig rch/arm64/include/asm/cpucaps.h rch/arm64/kernel/cpu_errata.c rch/arm64/kernel/cpufeature.c Signed-off-by: NLin Yujun <linyujun809@huawei.com> Reviewed-by: NZhang Jianhua <chris.zjh@huawei.com> Reviewed-by: NLiao Chang <liaochang1@huawei.com> Signed-off-by: NJialin Zhang <zhangjialin11@huawei.com>
2e5dfa80