arm64: exec: Adjust affinity for compat tasks with mismatched 32-bit EL0
authorWill Deacon <will@kernel.org>
Fri, 30 Jul 2021 11:24:38 +0000 (12:24 +0100)
committerPeter Zijlstra <peterz@infradead.org>
Fri, 20 Aug 2021 10:33:06 +0000 (12:33 +0200)
commit08cd8f4112dbd33bbfe1112dd6e9f0a228a8e132
tree5ca096bc8efc364b40ef35c55329c2c25a6cc413
parentd82158fa6df4237c9859b27d719c53b4fe09e69e
arm64: exec: Adjust affinity for compat tasks with mismatched 32-bit EL0

When exec'ing a 32-bit task on a system with mismatched support for
32-bit EL0, try to ensure that it starts life on a CPU that can actually
run it.

Similarly, when exec'ing a 64-bit task on such a system, try to restore
the old affinity mask if it was previously restricted.

Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Daniel Bristot de Oliveira <bristot@redhat.com>
Reviewed-by: Quentin Perret <qperret@google.com>
Link: https://lore.kernel.org/r/20210730112443.23245-12-will@kernel.org
arch/arm64/include/asm/elf.h
arch/arm64/kernel/process.c