arm64: cpufeature: Set the FP/SIMD compat HWCAP bits properly
authorSuzuki K Poulose <suzuki.poulose@arm.com>
Fri, 14 Feb 2020 16:57:33 +0000 (16:57 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 Feb 2020 18:51:54 +0000 (19:51 +0100)
commitb7230b62fc07902de0108d763b325f29eae3ead4
treed1535bd88935acf4197b0f05d2c7730d2a01db17
parent9c8cd851a5e7b87d169bc6aac0cb1a3e7c78358a
arm64: cpufeature: Set the FP/SIMD compat HWCAP bits properly

commit 7559950aef1ab8792c50797c6c5c7c5150a02460 upstream

We set the compat_elf_hwcap bits unconditionally on arm64 to
include the VFP and NEON support. However, the FP/SIMD unit
is optional on Arm v8 and thus could be missing. We already
handle this properly in the kernel, but still advertise to
the COMPAT applications that the VFP is available. Fix this
to make sure we only advertise when we really have them.

Cc: stable@vger.kernel.org # v4.19
Cc: Will Deacon <will@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/arm64/kernel/cpufeature.c