WSL2-Linux-Kernel/arch/x86/entry
Arnd Bergmann 16c0403b7d syscalls: fix compat_sys_io_pgetevents_time64 usage
commit d3882564a77c21eb746ba5364f3fa89b88de3d61 upstream.

Using sys_io_pgetevents() as the entry point for compat mode tasks
works almost correctly, but misses the sign extension for the min_nr
and nr arguments.

This was addressed on parisc by switching to
compat_sys_io_pgetevents_time64() in commit 6431e92fc8 ("parisc:
io_pgetevents_time64() needs compat syscall in 32-bit compat mode"),
as well as by using more sophisticated system call wrappers on x86 and
s390. However, arm64, mips, powerpc, sparc and riscv still have the
same bug.

Change all of them over to use compat_sys_io_pgetevents_time64()
like parisc already does. This was clearly the intention when the
function was originally added, but it got hooked up incorrectly in
the tables.

Cc: stable@vger.kernel.org
Fixes: 48166e6ea4 ("y2038: add 64-bit time_t syscalls to all 32-bit architectures")
Acked-by: Heiko Carstens <hca@linux.ibm.com> # s390
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-07-05 09:14:50 +02:00
..
syscalls syscalls: fix compat_sys_io_pgetevents_time64 usage 2024-07-05 09:14:50 +02:00
vdso x86/mm: Fix VDSO and VVAR placement on 5-level paging machines 2023-08-16 18:21:59 +02:00
vsyscall x86/mm: Remove broken vsyscall emulation code from the page fault code 2024-06-16 13:39:15 +02:00
Makefile x86/entry: Build thunk_$(BITS) only if CONFIG_PREEMPTION=y 2022-08-17 14:24:15 +02:00
calling.h x86/retbleed: Add fine grained Kconfig knobs 2022-07-23 12:54:10 +02:00
common.c x86/syscall: Don't force use of indirect calls for system calls 2024-04-10 16:19:43 +02:00
entry.S x86/bugs: Add asm helpers for executing VERW 2024-04-10 16:18:47 +02:00
entry_32.S x86/entry_32: Add VERW just before userspace transition 2024-04-10 16:18:48 +02:00
entry_64.S x86/bhi: Add support for clearing branch history at syscall entry 2024-04-10 16:19:43 +02:00
entry_64_compat.S x86/bhi: Add support for clearing branch history at syscall entry 2024-04-10 16:19:43 +02:00
syscall_32.c x86/syscall: Don't force use of indirect calls for system calls 2024-04-10 16:19:43 +02:00
syscall_64.c x86/syscall: Don't force use of indirect calls for system calls 2024-04-10 16:19:43 +02:00
syscall_x32.c x86/syscall: Don't force use of indirect calls for system calls 2024-04-10 16:19:43 +02:00
thunk_32.S x86/entry: Build thunk_$(BITS) only if CONFIG_PREEMPTION=y 2022-08-17 14:24:15 +02:00
thunk_64.S x86/entry: Build thunk_$(BITS) only if CONFIG_PREEMPTION=y 2022-08-17 14:24:15 +02:00