diff options
author | Will Deacon <will@kernel.org> | 2021-07-30 12:24:38 +0100 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2021-08-20 12:33:06 +0200 |
commit | 08cd8f4112dbd33bbfe1112dd6e9f0a228a8e132 (patch) | |
tree | 5ca096bc8efc364b40ef35c55329c2c25a6cc413 /arch/arm64/include/asm/elf.h | |
parent | d82158fa6df4237c9859b27d719c53b4fe09e69e (diff) | |
download | lwn-08cd8f4112dbd33bbfe1112dd6e9f0a228a8e132.tar.gz lwn-08cd8f4112dbd33bbfe1112dd6e9f0a228a8e132.zip |
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
Diffstat (limited to 'arch/arm64/include/asm/elf.h')
-rw-r--r-- | arch/arm64/include/asm/elf.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/arm64/include/asm/elf.h b/arch/arm64/include/asm/elf.h index 8d1c8dcb87fd..97932fbf973d 100644 --- a/arch/arm64/include/asm/elf.h +++ b/arch/arm64/include/asm/elf.h @@ -213,10 +213,8 @@ typedef compat_elf_greg_t compat_elf_gregset_t[COMPAT_ELF_NGREG]; /* AArch32 EABI. */ #define EF_ARM_EABI_MASK 0xff000000 -#define compat_elf_check_arch(x) (system_supports_32bit_el0() && \ - ((x)->e_machine == EM_ARM) && \ - ((x)->e_flags & EF_ARM_EABI_MASK)) - +int compat_elf_check_arch(const struct elf32_hdr *); +#define compat_elf_check_arch compat_elf_check_arch #define compat_start_thread compat_start_thread /* * Unlike the native SET_PERSONALITY macro, the compat version maintains |