mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-11-01 09:13:37 +00:00
arm64: cpufeature: Mark existing PAuth architected algorithm as QARMA5
In preparation of supporting PAuth QARMA3 architected algorithm mark existing one as QARMA5, so we can distingwish between two. Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com> Acked-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20220224124952.119612-3-vladimir.murzin@arm.com Signed-off-by: Will Deacon <will@kernel.org>
This commit is contained in:
parent
da844beb6d
commit
be3256a086
2 changed files with 14 additions and 10 deletions
|
|
@ -1835,15 +1835,19 @@ static bool has_address_auth_cpucap(const struct arm64_cpu_capabilities *entry,
|
||||||
static bool has_address_auth_metacap(const struct arm64_cpu_capabilities *entry,
|
static bool has_address_auth_metacap(const struct arm64_cpu_capabilities *entry,
|
||||||
int scope)
|
int scope)
|
||||||
{
|
{
|
||||||
return has_address_auth_cpucap(cpu_hwcaps_ptrs[ARM64_HAS_ADDRESS_AUTH_ARCH], scope) ||
|
bool api = has_address_auth_cpucap(cpu_hwcaps_ptrs[ARM64_HAS_ADDRESS_AUTH_IMP_DEF], scope);
|
||||||
has_address_auth_cpucap(cpu_hwcaps_ptrs[ARM64_HAS_ADDRESS_AUTH_IMP_DEF], scope);
|
bool apa = has_address_auth_cpucap(cpu_hwcaps_ptrs[ARM64_HAS_ADDRESS_AUTH_ARCH_QARMA5], scope);
|
||||||
|
|
||||||
|
return apa || api;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool has_generic_auth(const struct arm64_cpu_capabilities *entry,
|
static bool has_generic_auth(const struct arm64_cpu_capabilities *entry,
|
||||||
int __unused)
|
int __unused)
|
||||||
{
|
{
|
||||||
return __system_matches_cap(ARM64_HAS_GENERIC_AUTH_ARCH) ||
|
bool gpi = __system_matches_cap(ARM64_HAS_GENERIC_AUTH_IMP_DEF);
|
||||||
__system_matches_cap(ARM64_HAS_GENERIC_AUTH_IMP_DEF);
|
bool gpa = __system_matches_cap(ARM64_HAS_GENERIC_AUTH_ARCH_QARMA5);
|
||||||
|
|
||||||
|
return gpa || gpi;
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_ARM64_PTR_AUTH */
|
#endif /* CONFIG_ARM64_PTR_AUTH */
|
||||||
|
|
||||||
|
|
@ -2230,8 +2234,8 @@ static const struct arm64_cpu_capabilities arm64_features[] = {
|
||||||
},
|
},
|
||||||
#ifdef CONFIG_ARM64_PTR_AUTH
|
#ifdef CONFIG_ARM64_PTR_AUTH
|
||||||
{
|
{
|
||||||
.desc = "Address authentication (architected algorithm)",
|
.desc = "Address authentication (architected QARMA5 algorithm)",
|
||||||
.capability = ARM64_HAS_ADDRESS_AUTH_ARCH,
|
.capability = ARM64_HAS_ADDRESS_AUTH_ARCH_QARMA5,
|
||||||
.type = ARM64_CPUCAP_BOOT_CPU_FEATURE,
|
.type = ARM64_CPUCAP_BOOT_CPU_FEATURE,
|
||||||
.sys_reg = SYS_ID_AA64ISAR1_EL1,
|
.sys_reg = SYS_ID_AA64ISAR1_EL1,
|
||||||
.sign = FTR_UNSIGNED,
|
.sign = FTR_UNSIGNED,
|
||||||
|
|
@ -2255,8 +2259,8 @@ static const struct arm64_cpu_capabilities arm64_features[] = {
|
||||||
.matches = has_address_auth_metacap,
|
.matches = has_address_auth_metacap,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.desc = "Generic authentication (architected algorithm)",
|
.desc = "Generic authentication (architected QARMA5 algorithm)",
|
||||||
.capability = ARM64_HAS_GENERIC_AUTH_ARCH,
|
.capability = ARM64_HAS_GENERIC_AUTH_ARCH_QARMA5,
|
||||||
.type = ARM64_CPUCAP_SYSTEM_FEATURE,
|
.type = ARM64_CPUCAP_SYSTEM_FEATURE,
|
||||||
.sys_reg = SYS_ID_AA64ISAR1_EL1,
|
.sys_reg = SYS_ID_AA64ISAR1_EL1,
|
||||||
.sign = FTR_UNSIGNED,
|
.sign = FTR_UNSIGNED,
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ BTI
|
||||||
HAS_32BIT_EL0_DO_NOT_USE
|
HAS_32BIT_EL0_DO_NOT_USE
|
||||||
HAS_32BIT_EL1
|
HAS_32BIT_EL1
|
||||||
HAS_ADDRESS_AUTH
|
HAS_ADDRESS_AUTH
|
||||||
HAS_ADDRESS_AUTH_ARCH
|
HAS_ADDRESS_AUTH_ARCH_QARMA5
|
||||||
HAS_ADDRESS_AUTH_IMP_DEF
|
HAS_ADDRESS_AUTH_IMP_DEF
|
||||||
HAS_AMU_EXTN
|
HAS_AMU_EXTN
|
||||||
HAS_ARMv8_4_TTL
|
HAS_ARMv8_4_TTL
|
||||||
|
|
@ -21,7 +21,7 @@ HAS_E0PD
|
||||||
HAS_ECV
|
HAS_ECV
|
||||||
HAS_EPAN
|
HAS_EPAN
|
||||||
HAS_GENERIC_AUTH
|
HAS_GENERIC_AUTH
|
||||||
HAS_GENERIC_AUTH_ARCH
|
HAS_GENERIC_AUTH_ARCH_QARMA5
|
||||||
HAS_GENERIC_AUTH_IMP_DEF
|
HAS_GENERIC_AUTH_IMP_DEF
|
||||||
HAS_IRQ_PRIO_MASKING
|
HAS_IRQ_PRIO_MASKING
|
||||||
HAS_LDAPR
|
HAS_LDAPR
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue