linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* io_uring, IORING_OP_RECVMSG and ancillary data
@ 2020-04-25 17:29 Andreas Smas
  2020-04-25 20:23 ` Jens Axboe
  0 siblings, 1 reply; 9+ messages in thread
From: Andreas Smas @ 2020-04-25 17:29 UTC (permalink / raw)
  To: axboe, linux-fsdevel

Hi,

Tried to use io_uring with OP_RECVMSG with ancillary buffers (for my
particular use case I'm using SO_TIMESTAMP for incoming UDP packets).

These submissions fail with EINVAL due to the check in __sys_recvmsg_sock().

The following hack fixes the problem for me and I get valid timestamps
back. Not suggesting this is the real fix as I'm not sure what the
implications of this is.

Any insight into this would be much appreciated.

Thanks,
Andreas

diff --git a/net/socket.c b/net/socket.c
index 2dd739fba866..689f41f4156e 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -2637,10 +2637,6 @@ long __sys_recvmsg_sock(struct socket *sock,
struct msghdr *msg,
                        struct user_msghdr __user *umsg,
                        struct sockaddr __user *uaddr, unsigned int flags)
 {
-       /* disallow ancillary data requests from this path */
-       if (msg->msg_control || msg->msg_controllen)
-               return -EINVAL;
-
        return ____sys_recvmsg(sock, msg, umsg, uaddr, flags, 0);
 }

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

end of thread, other threads:[~2020-04-27 20:13 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-25 17:29 io_uring, IORING_OP_RECVMSG and ancillary data Andreas Smas
2020-04-25 20:23 ` Jens Axboe
2020-04-27 19:20   ` Jann Horn
2020-04-27 19:29     ` Jens Axboe
2020-04-27 19:53       ` Jens Axboe
2020-04-27 20:03         ` Jann Horn
2020-04-27 20:08           ` Jens Axboe
2020-04-27 20:10             ` Christoph Hellwig
2020-04-27 20:13               ` Jens Axboe

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).