]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: Allow mismatched 32-bit EL0 support
authorWill Deacon <will@kernel.org>
Tue, 8 Jun 2021 18:02:55 +0000 (19:02 +0100)
committerWill Deacon <will@kernel.org>
Fri, 11 Jun 2021 12:25:40 +0000 (13:25 +0100)
commit6a9c7b9209708f5eb154969d5396c51c4fb00311
treea95ac214b398b4dd7f46e1f8aca026e84056a233
parent771215c13725a448e86646a5bfcda0a32cba13f6
arm64: Allow mismatched 32-bit EL0 support

When confronted with a mixture of CPUs, some of which support 32-bit
applications and others which don't, we quite sensibly treat the system
as 64-bit only for userspace and prevent execve() of 32-bit binaries.

Unfortunately, some crazy folks have decided to build systems like this
with the intention of running 32-bit applications, so relax our
sanitisation logic to continue to advertise 32-bit support to userspace
on these systems and track the real 32-bit capable cores in a cpumask
instead. For now, the default behaviour remains but will be tied to
a command-line option in a later patch.

Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Link: https://lore.kernel.org/r/20210608180313.11502-3-will@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/include/asm/cpufeature.h
arch/arm64/kernel/cpufeature.c
arch/arm64/tools/cpucaps