]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: cpufeature: __this_cpu_has_cap() shouldn't stop early
authorJames Morse <james.morse@arm.com>
Mon, 15 Jan 2018 19:38:54 +0000 (19:38 +0000)
committerCatalin Marinas <catalin.marinas@arm.com>
Tue, 16 Jan 2018 14:47:14 +0000 (14:47 +0000)
commite321d5263c5033ab7ead4806a797f1a7937b2e72
tree11eba504617a3ca25386242810ecdafffaa012f3
parent5b6184b3ea411db5f6c72f82639618de9780b6ef
arm64: cpufeature: __this_cpu_has_cap() shouldn't stop early

this_cpu_has_cap() tests caps->desc not caps->matches, so it stops
walking the list when it finds a 'silent' feature, instead of
walking to the end of the list.

Prior to v4.6's 48fa5977c0cef ("arm64: cpufeature: Test 'matches' pointer
to find the end of the list") we always tested desc to find the end of
a capability list. This was changed for dubious things like PAN_NOT_UAO.
v4.7's 037f93b1ef4d3 ("arm64: Allow a capability to be checked on
single CPU") added this_cpu_has_cap() using the old desc style test.

CC: Suzuki K Poulose <suzuki.poulose@arm.com>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/kernel/cpufeature.c