]> git.baikalelectronics.ru Git - kernel.git/commit
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)
committerHelge Deller <deller@gmx.de>
Mon, 1 Aug 2022 16:43:24 +0000 (18:43 +0200)
commit7666464a52e6bcd8897a77f35539d28680733e02
tree63e01900815184251b074af9884ef8fa384336f8
parent55c0b95c3c158c3d33ea1b7bc2c65487cd9b63a5
parisc: io_pgetevents_time64() needs compat syscall in 32-bit compat mode

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>
arch/parisc/kernel/syscalls/syscall.tbl