linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] aio: Wire up compat_sys_io_pgetevents_time64 for x86
@ 2021-09-21 13:01 Richard Palethorpe
  2021-09-21 13:32 ` Arnd Bergmann
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Richard Palethorpe @ 2021-09-21 13:01 UTC (permalink / raw)
  To: linux-fsdevel
  Cc: Richard Palethorpe, linux-api, linux-aio, y2038, Andy Lutomirski,
	Thomas Gleixner, Ingo Molnar, Borislav Petkov, x86,
	H. Peter Anvin, Arnd Bergmann, Deepa Dinamani, linux-kernel, ltp

The LTP test io_pgetevents02 fails in 32bit compat mode because an
nr_max of -1 appears to be treated as a large positive integer. This
causes pgetevents_time64 to return an event. The test expects the call
to fail and errno to be set to EINVAL.

Using the compat syscall fixes the issue.

Fixes: 7a35397f8c06 ("io_pgetevents: use __kernel_timespec")
Signed-off-by: Richard Palethorpe <rpalethorpe@suse.com>
---
 arch/x86/entry/syscalls/syscall_32.tbl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/entry/syscalls/syscall_32.tbl b/arch/x86/entry/syscalls/syscall_32.tbl
index 960a021d543e..0985d8333368 100644
--- a/arch/x86/entry/syscalls/syscall_32.tbl
+++ b/arch/x86/entry/syscalls/syscall_32.tbl
@@ -420,7 +420,7 @@
 412	i386	utimensat_time64	sys_utimensat
 413	i386	pselect6_time64		sys_pselect6			compat_sys_pselect6_time64
 414	i386	ppoll_time64		sys_ppoll			compat_sys_ppoll_time64
-416	i386	io_pgetevents_time64	sys_io_pgetevents
+416	i386	io_pgetevents_time64	sys_io_pgetevents		compat_sys_io_pgetevents_time64
 417	i386	recvmmsg_time64		sys_recvmmsg			compat_sys_recvmmsg_time64
 418	i386	mq_timedsend_time64	sys_mq_timedsend
 419	i386	mq_timedreceive_time64	sys_mq_timedreceive
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2021-09-23 10:25 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-09-21 13:01 [PATCH] aio: Wire up compat_sys_io_pgetevents_time64 for x86 Richard Palethorpe
2021-09-21 13:32 ` Arnd Bergmann
2021-09-21 14:05   ` Richard Palethorpe
2021-09-21 15:44     ` Richard Palethorpe
2021-09-22  8:45       ` ia32 signed long treated as x64 unsigned int by __ia32_sys* Richard Palethorpe
2021-09-22  9:35         ` Arnd Bergmann
2021-09-23 10:01           ` Richard Palethorpe
2021-09-23 10:25             ` Arnd Bergmann
2021-09-21 13:34 ` [LTP] [PATCH] aio: Wire up compat_sys_io_pgetevents_time64 for x86 Petr Vorel
2021-09-21 13:40 ` Petr Vorel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).