parisc: io_pgetevents_time64() needs compat syscall in 32-bit compat mode
authorHelge Deller <deller@gmx.de>
Mon, 1 Aug 2022 15:36:15 +0000 (17:36 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Aug 2022 12:22:52 +0000 (14:22 +0200)
commit7df75cbd1bece8b00a99868fa4ad9ae6b3a196e4
treeb01935ebcba23a7377d190cf912ad6c013570929
parent9b67131162dc112e10a60322eacdaacf47ad1133
parisc: io_pgetevents_time64() needs compat syscall in 32-bit compat mode

commit 6431e92fc827bdd2d28f79150d90415ba9ce0d21 upstream.

For all syscalls in 32-bit compat mode on 64-bit kernels the upper
32-bits of the 64-bit registers are zeroed out, so a negative 32-bit
signed value will show up as positive 64-bit signed value.

This behaviour breaks the io_pgetevents_time64() syscall which expects
signed 64-bit values for the "min_nr" and "nr" parameters.
Fix this by switching to the compat_sys_io_pgetevents_time64() syscall,
which uses "compat_long_t" types for those parameters.

Cc: <stable@vger.kernel.org> # v5.1+
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/parisc/kernel/syscalls/syscall.tbl