WSL2-Linux-Kernel/arch
Masahiro Yamada 903a9ab8a0 ARM: 9324/1: fix get_user() broken with veneer
commit 24d3ba0a7b44c1617c27f5045eecc4f34752ab03 upstream.

The 32-bit ARM kernel stops working if the kernel grows to the point
where veneers for __get_user_* are created.

AAPCS32 [1] states, "Register r12 (IP) may be used by a linker as a
scratch register between a routine and any subroutine it calls. It
can also be used within a routine to hold intermediate values between
subroutine calls."

However, bl instructions buried within the inline asm are unpredictable
for compilers; hence, "ip" must be added to the clobber list.

This becomes critical when veneers for __get_user_* are created because
veneers use the ip register since commit 02e541db05 ("ARM: 8323/1:
force linker to use PIC veneers").

[1]: https://github.com/ARM-software/abi-aa/blob/2023Q1/aapcs32/aapcs32.rst

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Cc: John Stultz <jstultz@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-07-27 10:46:06 +02:00
..
alpha alpha: remove __init annotation from exported page_is_ram() 2023-08-16 18:22:03 +02:00
arc ARC: [plat-hsdk]: Remove misplaced interrupt-cells property 2024-05-02 16:24:44 +02:00
arm ARM: 9324/1: fix get_user() broken with veneer 2024-07-27 10:46:06 +02:00
arm64 arm64: dts: rockchip: Add sound-dai-cells for RK3368 2024-07-05 09:14:52 +02:00
csky csky, hexagon: fix broken sys_sync_file_range 2024-07-05 09:14:48 +02:00
h8300 h8300: Fix build errors from do_exit() to make_task_dead() transition 2023-02-01 08:27:21 +01:00
hexagon hexagon: fix fadvise64_64 calling conventions 2024-07-05 09:14:48 +02:00
ia64 arch: Introduce CONFIG_FUNCTION_ALIGNMENT 2024-04-10 16:18:49 +02:00
m68k m68k: mac: Fix reboot hang on Mac IIci 2024-06-16 13:39:25 +02:00
microblaze microblaze: Remove early printk call from cpuinfo-static.c 2024-06-16 13:39:38 +02:00
mips syscalls: fix compat_sys_io_pgetevents_time64 usage 2024-07-05 09:14:50 +02:00
nds32 exit: Add and use make_task_dead. 2023-02-01 08:27:20 +01:00
nios2 nios2: dts: Fix tse_mac "max-frame-size" property 2023-06-21 15:59:14 +02:00
openrisc openrisc: Fix pagewalk usage in arch_dma_{clear, set}_uncached 2024-04-10 16:19:42 +02:00
parisc parisc: use generic sys_fanotify_mark implementation 2024-07-05 09:14:45 +02:00
powerpc powerpc/xmon: Check cpu id in commands "c#", "dp#" and "dx#" 2024-07-18 13:07:29 +02:00
riscv riscv: kexec: Avoid deadlock in kexec crash path 2024-07-18 13:07:31 +02:00
s390 s390: Mark psw in __load_psw_mask() as __unitialized 2024-07-18 13:07:38 +02:00
sh sh: rework sync_file_range ABI 2024-07-05 09:14:48 +02:00
sparc syscalls: fix compat_sys_io_pgetevents_time64 usage 2024-07-05 09:14:50 +02:00
um um: Fix the -Wmissing-prototypes warning for __switch_mm 2024-06-16 13:39:44 +02:00
x86 x86/bhi: Avoid warning in #DB handler due to BHI mitigation 2024-07-18 13:07:45 +02:00
xtensa xtensa: boot/lib: fix function prototypes 2023-10-06 13:18:14 +02:00
.gitignore
Kconfig cpu: Re-enable CPU mitigations by default for !X86 architectures 2024-05-02 16:24:48 +02:00