]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: Fix mismatched cache line size detection
authorSuzuki K Poulose <suzuki.poulose@arm.com>
Wed, 4 Jul 2018 22:07:45 +0000 (23:07 +0100)
committerWill Deacon <will.deacon@arm.com>
Thu, 5 Jul 2018 09:19:57 +0000 (10:19 +0100)
commit1995e6ae6f6d3ecb99fb1160b4e8aca2dfedce18
tree571998bbc3b29a895ff3a233e8453e5240635737
parent03aa6daed1b6e285e0cd5f35de358cb0d566d07e
arm64: Fix mismatched cache line size detection

If there is a mismatch in the I/D min line size, we must
always use the system wide safe value both in applications
and in the kernel, while performing cache operations. However,
we have been checking more bits than just the min line sizes,
which triggers false negatives. We may need to trap the user
accesses in such cases, but not necessarily patch the kernel.

This patch fixes the check to do the right thing as advertised.
A new capability will be added to check mismatches in other
fields and ensure we trap the CTR accesses.

Fixes: 6d1afa52f57d ("arm64: cpufeature: Fix CTR_EL0 field definitions")
Cc: <stable@vger.kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Reported-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/include/asm/cache.h
arch/arm64/kernel/cpu_errata.c
arch/arm64/kernel/cpufeature.c