On 28/12/2023 13:53, Kevin Brodsky wrote:
Hi,
This series is a collection of various cleanups for compat64:
- Patch 1 makes use of the new in_compat64_syscall() helper introduced by Zach in his BPF series to unify the way we check whether we are handling a compat64 syscall.
- Patch 2-4 aim to restore compat_binfmt_elf as close to its original shape as possible, by using most of the existing definitions for compat64 as well as compat32.
- Patch 5 converts remaining uses of #ifdef CONFIG_COMPAT to CONFIG_COMPAT32 when the corresponding code is specific to AArch32.
- Patch 6 fixes the number of ASLR bits in compat64, which should be the same as in native and not the AArch32 value.
Aside from making things a little clearer and removing some unused code in compat64, patch 4 and 5 bring minor functional improvements. See the commit messages for details.
Review branch:
https://git.morello-project.org/kbrodsky-arm/linux/-/commits/morello/compat6...
Cheers, Kevin
Kevin Brodsky (6): treewide: Use in_compat64_syscall() for compat64 checks arm64: Only define COMPAT_ELF_HWCAP* in compat32 arm64/elf: Only define compat_elf_read_implies_exec in compat32 fs/compat_binfmt_elf: Align compat64 with compat32 arm64: Disable remaining 32-bit handling in compat64 arm64: Kconfig: Use native mmap_rnd_bits in compat64
Applied on next, with the additional change suggested by Amit on patch 5.
Kevin
arch/arm64/Kconfig | 2 +- arch/arm64/include/asm/arch_timer.h | 2 +- arch/arm64/include/asm/elf.h | 50 ++++++++++----------- arch/arm64/include/asm/fpsimd.h | 2 +- arch/arm64/include/asm/hwcap.h | 4 +- arch/arm64/include/asm/mmu.h | 2 +- arch/arm64/include/asm/processor.h | 8 ++-- arch/arm64/include/asm/ptrace.h | 2 +- arch/arm64/include/asm/seccomp.h | 2 +- arch/arm64/include/asm/unistd.h | 6 ++- arch/arm64/kernel/cpufeature.c | 14 +++--- arch/arm64/kernel/cpuinfo.c | 8 ++-- arch/arm64/kernel/entry-common.c | 6 +-- arch/arm64/kernel/traps.c | 4 +- arch/arm64/mm/init.c | 2 +- drivers/mmc/core/block.c | 11 ++--- fs/compat_binfmt_elf.c | 68 +++++++++++++---------------- include/linux/elfcore-compat.h | 7 +++ io_uring/io_uring.c | 2 +- io_uring/uring_cmd.c | 2 +- kernel/futex/syscalls.c | 2 +- net/ipv4/tcp.c | 18 +++----- 22 files changed, 109 insertions(+), 115 deletions(-)