aio: don't expose __aio_sigset in uapi
PATCH 1/1 aio: don't expose __aio_sigset in uapi
glibc uses a different defintion of sigset_t than the kernel does, and the current version would pull in both. To fix this just do not expose the type at all - this somewhat mirrors pselect() where we do not even have a type for the magic sigmask argument, but just use pointer arithmetics.
--- fs/aio.c | 5 +++++ include/linux/syscalls.h | 1 + include/uapi/linux/aio_abi.h | 6 ------ 3 files changed, 6 insertions(+), 6 deletions(-)
fs/aio.c +5 -0
@@ -1896,6 +1896,11 @@ SYSCALL_DEFINE5(io_getevents, aio_context_t, ctx_id,return ret; } +struct __aio_sigset { +const sigset_t __user *sigmask; +size_t sigsetsize; +}; + SYSCALL_DEFINE6(io_pgetevents, aio_context_t, ctx_id, long, min_nr,
include/linux/syscalls.h +1 -0
@@ -11,6 +11,7 @@#ifndef _LINUX_SYSCALLS_H#define _LINUX_SYSCALLS_H +struct __aio_sigset ;struct epoll_event ;struct iattr ;struct inode ;
include/uapi/linux/aio_abi.h +0 -6
@@ -29,7 +29,6 @@#include <linux/types.h> #include <linux/fs.h> -#include <linux/signal.h> #include <asm/byteorder.h> typedef __kernel_ulong_t aio_context_t ;
@@ -110,10 +109,5 @@ struct iocb {#undef IFBIG#undef IFLITTLE -struct __aio_sigset { -const sigset_t __user *sigmask; -size_t sigsetsize; -}; -#endif /* __LINUX__AIO_ABI_H */
Signature · 1 line
2.18.0
Quoted 68 lines · Christoph Hellwig
glibc uses a different defintion of
sigset_tthan the kernel does, and the current version would pull in both. To fix this just do not expose the type at all - this somewhat mirrorspselect()where we do not even have a type for the magic sigmask argument, but just use pointer arithmetics.Fixes 7a074e96 ("aio: implement io_pgetevents")Signed-off-by Christoph Hellwig <[email protected]>Reported-by Adrian Reber <[email protected]>--- fs/aio.c | 5 +++++ include/linux/syscalls.h | 1 + include/uapi/linux/aio_abi.h | 6 ------ 3 files changed, 6 insertions(+), 6 deletions(-)fs/aio.c +5
-0@@ -1896,6 +1896,11 @@ SYSCALL_DEFINE5(io_getevents, aio_context_t, ctx_id,return ret; } +struct __aio_sigset { +const sigset_t __user *sigmask; +size_t sigsetsize; +}; + SYSCALL_DEFINE6(io_pgetevents, aio_context_t, ctx_id, long, min_nr,include/linux/syscalls.h +1
-0@@ -11,6 +11,7 @@#ifndef _LINUX_SYSCALLS_H#define _LINUX_SYSCALLS_H +struct __aio_sigset ;struct epoll_event ;struct iattr ;struct inode ;include/uapi/linux/aio_abi.h +0
-6@@ -29,7 +29,6 @@#include <linux/types.h> #include <linux/fs.h> -#include <linux/signal.h> #include <asm/byteorder.h> typedef __kernel_ulong_t aio_context_t ;@@ -110,10 +109,5 @@ struct iocb {#undef IFBIG#undef IFLITTLE -struct __aio_sigset { -const sigset_t __user *sigmask; -size_t sigsetsize; -}; -#endif /* __LINUX__AIO_ABI_H */ Signature · 1 line
2.18.0
Tested with CRIU, which was broken before, and it compiles again. Thanks!
Adrian
Al, can you send this to Linus for the next 4.18-rc?
Quoted 74 lines · Christoph Hellwig
glibc uses a different defintion of
sigset_tthan the kernel does, and the current version would pull in both. To fix this just do not expose the type at all - this somewhat mirrorspselect()where we do not even have a type for the magic sigmask argument, but just use pointer arithmetics.Fixes 7a074e96 ("aio: implement io_pgetevents")Signed-off-by Christoph Hellwig <[email protected]>Reported-by Adrian Reber <[email protected]>--- fs/aio.c | 5 +++++ include/linux/syscalls.h | 1 + include/uapi/linux/aio_abi.h | 6 ------ 3 files changed, 6 insertions(+), 6 deletions(-)fs/aio.c +5
-0@@ -1896,6 +1896,11 @@ SYSCALL_DEFINE5(io_getevents, aio_context_t, ctx_id,return ret; } +struct __aio_sigset { +const sigset_t __user *sigmask; +size_t sigsetsize; +}; + SYSCALL_DEFINE6(io_pgetevents, aio_context_t, ctx_id, long, min_nr,include/linux/syscalls.h +1
-0@@ -11,6 +11,7 @@#ifndef _LINUX_SYSCALLS_H#define _LINUX_SYSCALLS_H +struct __aio_sigset ;struct epoll_event ;struct iattr ;struct inode ;include/uapi/linux/aio_abi.h +0
-6@@ -29,7 +29,6 @@#include <linux/types.h> #include <linux/fs.h> -#include <linux/signal.h> #include <asm/byteorder.h> typedef __kernel_ulong_t aio_context_t ;@@ -110,10 +109,5 @@ struct iocb {#undef IFBIG#undef IFLITTLE -struct __aio_sigset { -const sigset_t __user *sigmask; -size_t sigsetsize; -}; -#endif /* __LINUX__AIO_ABI_H */ Signature · 7 lines
2.18.0 -- 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>
---end quoted text---
Quoted 1 line · Christoph Hellwig
Al, can you send this to Linus for the next 4.18-rc?
Applied.