[PATCH libaio v2 09/10] Disable io_pgetevents_time64 as it is broken on 64-bit kernel 32-bit userland

Guillem Jover <[email protected]>
Newsgroups gmane.linux.kernel.aio.general
Message-ID <[email protected]>
From: Guillem Jover <[email protected]>

At least on x86 64-bit kernels running 32-bit userland, this syscall
misbehaves when passing a sigmask by always returning -EINVAL. This works
on x86 32-bit kernels. The syscall entry point seems wrong and needs to
be fixed in the kernel. For now disable as the code is handling clean
64-bit time_t and the timeout is relative anyway.

Once this is fixed in the kernel, and after enough time has passed we
can decide whether to enable this.

Signed-off-by: Guillem Jover <[email protected]>
---
 src/aio_pgetevents.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/aio_pgetevents.c b/src/aio_pgetevents.c
index e12036e..a976a5c 100644
--- a/src/aio_pgetevents.c
+++ b/src/aio_pgetevents.c
@@ -26,6 +26,15 @@
 #include "aio_time.h"
 #include "aio_ring.h"
 
+/*
+ * FIXME: On 64-bit kernels running 32-bit userland, this syscall misbehaves
+ * when passing a sigmask by always returning -EINVAL. This works on 32-bit
+ * kernels. The syscall entry point seems wrong and needs to be fixed in the
+ * kernel. For now disable as the code is handling clean 64-bit time_t and
+ * the timeout is relative anyway.
+ */
+#undef __NR_io_pgetevents_time64
+
 #ifdef __NR_io_pgetevents
 io_syscall6(int, __io_pgetevents, io_pgetevents, io_context_t, ctx,
 		long, min_nr, long, nr, struct io_event *, events,
-- 
2.45.1


--
To unsubscribe, send a message with 'unsubscribe linux-aio' in
the body to [email protected].  For more info on Linux AIO,
see: http://www.kvack.org/aio/
Don't email: <a href=mailto:"[email protected]">[email protected]</a>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.