* [PATCH] aio: don't expose __aio_sigset in uapi
@ 2018-07-11 13:48 Christoph Hellwig
2018-07-11 14:22 ` Adrian Reber
2018-07-17 15:10 ` Christoph Hellwig
0 siblings, 2 replies; 4+ messages in thread
From: Christoph Hellwig @ 2018-07-11 13:48 UTC (permalink / raw)
To: viro; +Cc: linux-aio, linux-fsdevel, adrian, smueller, avagin
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.
Fixes: 7a074e96 ("aio: implement io_pgetevents")
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reported-by: Adrian Reber <adrian@lisas.de>
---
fs/aio.c | 5 +++++
include/linux/syscalls.h | 1 +
include/uapi/linux/aio_abi.h | 6 ------
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/fs/aio.c b/fs/aio.c
index 210df9da1283..27454594e37a 100644
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -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,
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
index a368a68cb667..5c1a0933768e 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -11,6 +11,7 @@
#ifndef _LINUX_SYSCALLS_H
#define _LINUX_SYSCALLS_H
+struct __aio_sigset;
struct epoll_event;
struct iattr;
struct inode;
diff --git a/include/uapi/linux/aio_abi.h b/include/uapi/linux/aio_abi.h
index 3c5038b587ba..d4593a6062ef 100644
--- a/include/uapi/linux/aio_abi.h
+++ b/include/uapi/linux/aio_abi.h
@@ -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 */
--
2.18.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] aio: don't expose __aio_sigset in uapi
2018-07-11 13:48 [PATCH] aio: don't expose __aio_sigset in uapi Christoph Hellwig
@ 2018-07-11 14:22 ` Adrian Reber
2018-07-17 15:10 ` Christoph Hellwig
1 sibling, 0 replies; 4+ messages in thread
From: Adrian Reber @ 2018-07-11 14:22 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: viro, linux-aio, linux-fsdevel, smueller, avagin
On Wed, Jul 11, 2018 at 03:48:46PM +0200, Christoph Hellwig wrote:
> 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.
>
> Fixes: 7a074e96 ("aio: implement io_pgetevents")
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> Reported-by: Adrian Reber <adrian@lisas.de>
> ---
> fs/aio.c | 5 +++++
> include/linux/syscalls.h | 1 +
> include/uapi/linux/aio_abi.h | 6 ------
> 3 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/fs/aio.c b/fs/aio.c
> index 210df9da1283..27454594e37a 100644
> --- a/fs/aio.c
> +++ b/fs/aio.c
> @@ -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,
> diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
> index a368a68cb667..5c1a0933768e 100644
> --- a/include/linux/syscalls.h
> +++ b/include/linux/syscalls.h
> @@ -11,6 +11,7 @@
> #ifndef _LINUX_SYSCALLS_H
> #define _LINUX_SYSCALLS_H
>
> +struct __aio_sigset;
> struct epoll_event;
> struct iattr;
> struct inode;
> diff --git a/include/uapi/linux/aio_abi.h b/include/uapi/linux/aio_abi.h
> index 3c5038b587ba..d4593a6062ef 100644
> --- a/include/uapi/linux/aio_abi.h
> +++ b/include/uapi/linux/aio_abi.h
> @@ -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 */
>
> --
> 2.18.0
Tested with CRIU, which was broken before, and it compiles again. Thanks!
Adrian
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] aio: don't expose __aio_sigset in uapi
2018-07-11 13:48 [PATCH] aio: don't expose __aio_sigset in uapi Christoph Hellwig
2018-07-11 14:22 ` Adrian Reber
@ 2018-07-17 15:10 ` Christoph Hellwig
2018-07-18 3:26 ` Al Viro
1 sibling, 1 reply; 4+ messages in thread
From: Christoph Hellwig @ 2018-07-17 15:10 UTC (permalink / raw)
To: viro; +Cc: linux-aio, linux-fsdevel, adrian, smueller, avagin
Al, can you send this to Linus for the next 4.18-rc?
On Wed, Jul 11, 2018 at 03:48:46PM +0200, Christoph Hellwig wrote:
> 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.
>
> Fixes: 7a074e96 ("aio: implement io_pgetevents")
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> Reported-by: Adrian Reber <adrian@lisas.de>
> ---
> fs/aio.c | 5 +++++
> include/linux/syscalls.h | 1 +
> include/uapi/linux/aio_abi.h | 6 ------
> 3 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/fs/aio.c b/fs/aio.c
> index 210df9da1283..27454594e37a 100644
> --- a/fs/aio.c
> +++ b/fs/aio.c
> @@ -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,
> diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
> index a368a68cb667..5c1a0933768e 100644
> --- a/include/linux/syscalls.h
> +++ b/include/linux/syscalls.h
> @@ -11,6 +11,7 @@
> #ifndef _LINUX_SYSCALLS_H
> #define _LINUX_SYSCALLS_H
>
> +struct __aio_sigset;
> struct epoll_event;
> struct iattr;
> struct inode;
> diff --git a/include/uapi/linux/aio_abi.h b/include/uapi/linux/aio_abi.h
> index 3c5038b587ba..d4593a6062ef 100644
> --- a/include/uapi/linux/aio_abi.h
> +++ b/include/uapi/linux/aio_abi.h
> @@ -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 */
>
> --
> 2.18.0
>
> --
> To unsubscribe, send a message with 'unsubscribe linux-aio' in
> the body to majordomo@kvack.org. For more info on Linux AIO,
> see: http://www.kvack.org/aio/
> Don't email: <a href=mailto:"aart@kvack.org">aart@kvack.org</a>
---end quoted text---
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] aio: don't expose __aio_sigset in uapi
2018-07-17 15:10 ` Christoph Hellwig
@ 2018-07-18 3:26 ` Al Viro
0 siblings, 0 replies; 4+ messages in thread
From: Al Viro @ 2018-07-18 3:26 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: linux-aio, linux-fsdevel, adrian, smueller, avagin
On Tue, Jul 17, 2018 at 05:10:17PM +0200, Christoph Hellwig wrote:
> Al, can you send this to Linus for the next 4.18-rc?
Applied.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-07-18 4:02 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-11 13:48 [PATCH] aio: don't expose __aio_sigset in uapi Christoph Hellwig
2018-07-11 14:22 ` Adrian Reber
2018-07-17 15:10 ` Christoph Hellwig
2018-07-18 3:26 ` Al Viro
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).