This is a note to let you know that I've just added the patch titled parisc: io_pgetevents_time64() needs compat syscall in 32-bit compat mode to the 5.18-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: parisc-io_pgetevents_time64-needs-compat-syscall-in-32-bit-compat-mode.patch and it can be found in the queue-5.18 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 6431e92fc827bdd2d28f79150d90415ba9ce0d21 Mon Sep 17 00:00:00 2001 From: Helge Deller <deller@xxxxxx> Date: Mon, 1 Aug 2022 17:36:15 +0200 Subject: parisc: io_pgetevents_time64() needs compat syscall in 32-bit compat mode From: Helge Deller <deller@xxxxxx> 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@xxxxxxxxxxxxxxx> # v5.1+ Signed-off-by: Helge Deller <deller@xxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- arch/parisc/kernel/syscalls/syscall.tbl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/arch/parisc/kernel/syscalls/syscall.tbl +++ b/arch/parisc/kernel/syscalls/syscall.tbl @@ -413,7 +413,7 @@ 412 32 utimensat_time64 sys_utimensat sys_utimensat 413 32 pselect6_time64 sys_pselect6 compat_sys_pselect6_time64 414 32 ppoll_time64 sys_ppoll compat_sys_ppoll_time64 -416 32 io_pgetevents_time64 sys_io_pgetevents sys_io_pgetevents +416 32 io_pgetevents_time64 sys_io_pgetevents compat_sys_io_pgetevents_time64 417 32 recvmmsg_time64 sys_recvmmsg compat_sys_recvmmsg_time64 418 32 mq_timedsend_time64 sys_mq_timedsend sys_mq_timedsend 419 32 mq_timedreceive_time64 sys_mq_timedreceive sys_mq_timedreceive Patches currently in stable-queue which might be from deller@xxxxxx are queue-5.18/fbcon-fix-accelerated-fbdev-scrolling-while-logo-is-still-shown.patch queue-5.18/parisc-fix-device-names-in-proc-iomem.patch queue-5.18/fbcon-fix-boundary-checks-for-fbcon-vc-n1-n2-parameters.patch queue-5.18/parisc-drop-pa_swapper_pg_lock-spinlock.patch queue-5.18/parisc-io_pgetevents_time64-needs-compat-syscall-in-32-bit-compat-mode.patch queue-5.18/parisc-check-the-return-value-of-ioremap-in-lba_driver_probe.patch