]> www.infradead.org Git - users/dwmw2/linux.git/commit
syscalls: fix compat_sys_io_pgetevents_time64 usage
authorArnd Bergmann <arnd@arndb.de>
Thu, 20 Jun 2024 12:16:37 +0000 (14:16 +0200)
committerArnd Bergmann <arnd@arndb.de>
Tue, 25 Jun 2024 13:57:20 +0000 (15:57 +0200)
commitd3882564a77c21eb746ba5364f3fa89b88de3d61
treed926367d8365f33da81825335e2211aac99af50b
parent4b8e88e563b5f666446d002ad0dc1e6e8e7102b0
syscalls: fix compat_sys_io_pgetevents_time64 usage

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 6431e92fc827 ("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: 48166e6ea47d ("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>
arch/arm64/include/asm/unistd32.h
arch/mips/kernel/syscalls/syscall_n32.tbl
arch/mips/kernel/syscalls/syscall_o32.tbl
arch/powerpc/kernel/syscalls/syscall.tbl
arch/s390/kernel/syscalls/syscall.tbl
arch/sparc/kernel/syscalls/syscall.tbl
arch/x86/entry/syscalls/syscall_32.tbl
include/uapi/asm-generic/unistd.h
kernel/sys_ni.c