From nobody Mon Jun 29 23:57:41 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 27746C433FE for ; Sat, 29 Jan 2022 13:03:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349493AbiA2NDe (ORCPT ); Sat, 29 Jan 2022 08:03:34 -0500 Received: from ip59.38.31.103.in-addr.arpa.unknwn.cloudhost.asia ([103.31.38.59]:49200 "EHLO gnuweeb.org" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1344137AbiA2NDX (ORCPT ); Sat, 29 Jan 2022 08:03:23 -0500 Received: from integral2.. (unknown [36.81.38.25]) by gnuweeb.org (Postfix) with ESMTPSA id 7EE99C32BF; Sat, 29 Jan 2022 13:03:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=gnuweeb.org; s=default; t=1643461400; bh=6AKi7hGS7R6OvLfjzdzvqyxbTBftpQs4lqMu0PZkje0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CjO4sgN63FrHy6bikhKswx/BWUJkVQ1uuL4Gwwlu3eHF25ly2Tmol3gN5AgBVcjVa annwNyJNlwCtHMrjGMdCQOtUrAAHwKVn2+X46VvmUtmlr46I+DwAUjlpTq29UKHKid Y0x+yKBT1+zxtC6Uptj4NgHJrbPT+Pz3pkYmQpFz4mE9BJfsuzRqqZ1YNQ20pvn5Hy LP3Bhcy/F8b05rhjoFT9xtFheC12gVTF+ci2mutumZW8Bt+HQzscE3yZs4hXiG+RZo hUFrOM/krA5MrH/4VxnQmvweDAyC0dYbz91tsY74QaU0JwdgpZWXXE9yA9ry2qLzy2 2OA9dRzAq6kGQ== From: Ammar Faizi To: Jens Axboe Cc: Ammar Faizi , io-uring Mailing List , netdev Mailing List , GNU/Weeb Mailing List , Tea Inside Mailing List , Linux Kernel Mailing List , Pavel Begunkov , "David S. Miller" , Jakub Kicinski , Nugra , Praveen Kumar , Alviro Iskandar Setiawan , Ammar Faizi Subject: [PATCH for-5.18 v1 1/3] io_uring: Rename `io_{send,recv}` to `io_{sendto,recvfrom}` Date: Sat, 29 Jan 2022 19:50:19 +0700 Message-Id: <20220129125021.15223-2-ammarfaizi2@gnuweeb.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220129125021.15223-1-ammarfaizi2@gnuweeb.org> References: <20220129125021.15223-1-ammarfaizi2@gnuweeb.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" This is a preparation to add sendto() and recvfrom() support for io_uring. _____________________________________________________ The following call send(sockfd, buf, len, flags); is equivalent to sendto(sockfd, buf, len, flags, NULL, 0); _____________________________________________________ The following call recv(sockfd, buf, len, flags); is equivalent to recvfrom(sockfd, buf, len, flags, NULL, NULL); _____________________________________________________ Currently, io_uring supports send() and recv() operation. Now, we are going to add sendto() and recvfrom() support. Since the latter is the superset of the former, change the function name to the latter. This renames: - io_send() to io_sendto() - io_recv() to io_recvfrom() Cc: Nugra Cc: Alviro Iskandar Setiawan Signed-off-by: Ammar Faizi --- v1: - Rebase the work (sync with "io_uring-5.17" branch in Jens' tree). - Reword the commit message. - Add Alviro Iskandar Setiawan to CC list (tester). RFC v4: - Rebase the work (sync with "for-next" branch in Jens' tree). RFC v3: - Fix build error when CONFIG_NET is undefined for PATCH 1/3. I tried to fix it in PATCH 3/3, but it should be fixed in PATCH 1/3, otherwise it breaks the build in PATCH 1/3. RFC v2: - Add Nugra to CC list (tester). --- --- fs/io_uring.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/fs/io_uring.c b/fs/io_uring.c index 2e04f718319d..742e252a052a 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -4961,7 +4961,7 @@ static int io_sendmsg(struct io_kiocb *req, unsigned = int issue_flags) return 0; } =20 -static int io_send(struct io_kiocb *req, unsigned int issue_flags) +static int io_sendto(struct io_kiocb *req, unsigned int issue_flags) { struct io_sr_msg *sr =3D &req->sr_msg; struct msghdr msg; @@ -5187,7 +5187,7 @@ static int io_recvmsg(struct io_kiocb *req, unsigned = int issue_flags) return 0; } =20 -static int io_recv(struct io_kiocb *req, unsigned int issue_flags) +static int io_recvfrom(struct io_kiocb *req, unsigned int issue_flags) { struct io_buffer *kbuf; struct io_sr_msg *sr =3D &req->sr_msg; @@ -5395,8 +5395,8 @@ IO_NETOP_PREP_ASYNC(sendmsg); IO_NETOP_PREP_ASYNC(recvmsg); IO_NETOP_PREP_ASYNC(connect); IO_NETOP_PREP(accept); -IO_NETOP_FN(send); -IO_NETOP_FN(recv); +IO_NETOP_FN(sendto); +IO_NETOP_FN(recvfrom); #endif /* CONFIG_NET */ =20 struct io_poll_table { @@ -6771,13 +6771,13 @@ static int io_issue_sqe(struct io_kiocb *req, unsig= ned int issue_flags) ret =3D io_sendmsg(req, issue_flags); break; case IORING_OP_SEND: - ret =3D io_send(req, issue_flags); + ret =3D io_sendto(req, issue_flags); break; case IORING_OP_RECVMSG: ret =3D io_recvmsg(req, issue_flags); break; case IORING_OP_RECV: - ret =3D io_recv(req, issue_flags); + ret =3D io_recvfrom(req, issue_flags); break; case IORING_OP_TIMEOUT: ret =3D io_timeout(req, issue_flags); --=20 2.32.0 From nobody Mon Jun 29 23:57:41 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4E570C433F5 for ; Sat, 29 Jan 2022 13:03:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350194AbiA2NDh (ORCPT ); Sat, 29 Jan 2022 08:03:37 -0500 Received: from ip59.38.31.103.in-addr.arpa.unknwn.cloudhost.asia ([103.31.38.59]:49208 "EHLO gnuweeb.org" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1344688AbiA2NDY (ORCPT ); Sat, 29 Jan 2022 08:03:24 -0500 Received: from integral2.. (unknown [36.81.38.25]) by gnuweeb.org (Postfix) with ESMTPSA id 7BC32C32BD; Sat, 29 Jan 2022 13:03:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=gnuweeb.org; s=default; t=1643461401; bh=/1T2B7uj38XWhZu+Pu1N5081eSZLYd6hVvWWUjEzQ8o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DNyRqeGbxKG+smEQDZjMeUjUQkXjH+77TtSKlncLItJoLgPi2Tx5ovEk5cI3TmM7n 20ai42odw0MGaOKZiAuO+aB7WnBPTVRBjFXMn4lJ5PzPt1/yfoDQiDhuNU6uPJjOlH tcl7jDiV20U6sx9iu1H66idQQyfjEN/CoCLZrJU6gnatAsELHiCHszvXsITM3+VhVO j9WT+6WDdXGfllEfkFov9T7bPe+eXkF5RUINabKS7PwTq5HHeMUIqAcfRguRruSJea qrmxWJHEiICRfIeMmHQQn9vFQ1Yas0SrGt87yLGvJl4SzzqRjivr+KiR7wgOMfulYg 8tTBUJOsOy1SQ== From: Ammar Faizi To: Jens Axboe Cc: Ammar Faizi , io-uring Mailing List , netdev Mailing List , GNU/Weeb Mailing List , Tea Inside Mailing List , Linux Kernel Mailing List , Pavel Begunkov , "David S. Miller" , Jakub Kicinski , Nugra , Praveen Kumar , Alviro Iskandar Setiawan , Ammar Faizi Subject: [PATCH for-5.18 v1 2/3] net: Make `move_addr_to_user()` be a non static function Date: Sat, 29 Jan 2022 19:50:20 +0700 Message-Id: <20220129125021.15223-3-ammarfaizi2@gnuweeb.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220129125021.15223-1-ammarfaizi2@gnuweeb.org> References: <20220129125021.15223-1-ammarfaizi2@gnuweeb.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" To add recvfrom() support for io_uring, we need to call move_addr_to_user() from fs/io_uring.c. This makes move_addr_to_user() be a non static function so we can call it from io_uring. Cc: "David S. Miller" Cc: Jakub Kicinski Cc: netdev@vger.kernel.org Cc: Nugra Cc: Alviro Iskandar Setiawan Signed-off-by: Ammar Faizi --- v1: - Add Alviro Iskandar Setiawan to CC list (tester). RFC v4: * No changes * RFC v3: * No changes * RFC v2: - Added Nugra to CC list (tester). --- --- include/linux/socket.h | 2 ++ net/socket.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/include/linux/socket.h b/include/linux/socket.h index 8ef26d89ef49..0d0bc1ace50c 100644 --- a/include/linux/socket.h +++ b/include/linux/socket.h @@ -371,6 +371,8 @@ struct ucred { #define IPX_TYPE 1 =20 extern int move_addr_to_kernel(void __user *uaddr, int ulen, struct sockad= dr_storage *kaddr); +extern int move_addr_to_user(struct sockaddr_storage *kaddr, int klen, + void __user *uaddr, int __user *ulen); extern int put_cmsg(struct msghdr*, int level, int type, int len, void *da= ta); =20 struct timespec64; diff --git a/net/socket.c b/net/socket.c index 50cf75730fd7..9bc586ab4e93 100644 --- a/net/socket.c +++ b/net/socket.c @@ -268,8 +268,8 @@ int move_addr_to_kernel(void __user *uaddr, int ulen, s= truct sockaddr_storage *k * specified. Zero is returned for a success. */ =20 -static int move_addr_to_user(struct sockaddr_storage *kaddr, int klen, - void __user *uaddr, int __user *ulen) +int move_addr_to_user(struct sockaddr_storage *kaddr, int klen, + void __user *uaddr, int __user *ulen) { int err; int len; --=20 2.32.0 From nobody Mon Jun 29 23:57:41 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2EA1EC433EF for ; Sat, 29 Jan 2022 13:03:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349107AbiA2NDo (ORCPT ); Sat, 29 Jan 2022 08:03:44 -0500 Received: from ip59.38.31.103.in-addr.arpa.unknwn.cloudhost.asia ([103.31.38.59]:49230 "EHLO gnuweeb.org" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1345721AbiA2NDd (ORCPT ); Sat, 29 Jan 2022 08:03:33 -0500 Received: from integral2.. (unknown [36.81.38.25]) by gnuweeb.org (Postfix) with ESMTPSA id 3F340C32C8; Sat, 29 Jan 2022 13:03:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=gnuweeb.org; s=default; t=1643461402; bh=lLuXbaCaWQYUNdk+Oqic6Z0r79tsKycp/zlNABrRk3c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LE/qSBUKDvG5mDZ/yrULH+LR2bI2y5LvolkELJTS2hUhosd+mOsXXkPg+mHOs4v0y ATvr1oF6COfa9dM0n1omXePfPNkeFxHL9uvLV9Uf/cT0zIuV9pkaM5leDkslg7cm0I 9DvcX3shBXy0YLtMbpWxS9oJ/DBSrUBKm7bukbDuxCKGe8Weuye8umUABVEPetJ8HZ z1du6CWa954PNCgoIT9IN1ayuyNfrL8eiO73cMPJBIhXZWEIgPGj/P+1BpypJcuHHX R4hEbTP0TxYE64lnEssgpK/Rl19MiQEFfbn40lX+a06E/lUReZ2f6WWfsDhhYl5S8I 2x6r9T0jSjlaQ== From: Ammar Faizi To: Jens Axboe Cc: Ammar Faizi , io-uring Mailing List , netdev Mailing List , GNU/Weeb Mailing List , Tea Inside Mailing List , Linux Kernel Mailing List , Pavel Begunkov , "David S. Miller" , Jakub Kicinski , Nugra , Praveen Kumar , Alviro Iskandar Setiawan , Ammar Faizi Subject: [PATCH for-5.18 v1 3/3] io_uring: Add `sendto(2)` and `recvfrom(2)` support Date: Sat, 29 Jan 2022 19:50:21 +0700 Message-Id: <20220129125021.15223-4-ammarfaizi2@gnuweeb.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220129125021.15223-1-ammarfaizi2@gnuweeb.org> References: <20220129125021.15223-1-ammarfaizi2@gnuweeb.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" This adds sendto(2) and recvfrom(2) support for io_uring. New opcodes: IORING_OP_SENDTO IORING_OP_RECVFROM Cc: Nugra Cc: Praveen Kumar Cc: Alviro Iskandar Setiawan Link: https://github.com/axboe/liburing/issues/397 Signed-off-by: Ammar Faizi --- v1: - Add BUILD_BUG_SQE_ELEM(48, __u64, addr3); for compile time assertion. - Add Alviro Iskandar Setiawan to CC list (tester). RFC v4: - Rebase the work (sync with "for-next" branch in Jens' tree). - Remove Tested-by tag from Nugra as this patch changes. - (Address Praveen's comment) Zero `sendto_addr_len` and `recvfrom_addr_len` on prep when the `req->opcode` is not `IORING_OP_{SENDTO,RECVFROM}`. RFC v3: - Fix build error when CONFIG_NET is undefined should be done in the first patch, not this patch. - Add Tested-by tag from Nugra. RFC v2: - In `io_recvfrom()`, mark the error check of `move_addr_to_user()` call as unlikely. - Fix build error when CONFIG_NET is undefined. - Added Nugra to CC list (tester). --- --- fs/io_uring.c | 83 +++++++++++++++++++++++++++++++++-- include/uapi/linux/io_uring.h | 5 ++- 2 files changed, 83 insertions(+), 5 deletions(-) diff --git a/fs/io_uring.c b/fs/io_uring.c index 742e252a052a..0c322e89de84 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -574,7 +574,15 @@ struct io_sr_msg { union { struct compat_msghdr __user *umsg_compat; struct user_msghdr __user *umsg; - void __user *buf; + + struct { + void __user *buf; + struct sockaddr __user *addr; + union { + int sendto_addr_len; + int __user *recvfrom_addr_len; + }; + }; }; int msg_flags; int bgid; @@ -1105,6 +1113,19 @@ static const struct io_op_def io_op_defs[] =3D { [IORING_OP_MKDIRAT] =3D {}, [IORING_OP_SYMLINKAT] =3D {}, [IORING_OP_LINKAT] =3D {}, + [IORING_OP_SENDTO] =3D { + .needs_file =3D 1, + .unbound_nonreg_file =3D 1, + .pollout =3D 1, + .audit_skip =3D 1, + }, + [IORING_OP_RECVFROM] =3D { + .needs_file =3D 1, + .unbound_nonreg_file =3D 1, + .pollin =3D 1, + .buffer_select =3D 1, + .audit_skip =3D 1, + }, }; =20 /* requests with any of those set should undergo io_disarm_next() */ @@ -4904,12 +4925,25 @@ static int io_sendmsg_prep(struct io_kiocb *req, co= nst struct io_uring_sqe *sqe) if (unlikely(req->ctx->flags & IORING_SETUP_IOPOLL)) return -EINVAL; =20 + /* + * For IORING_OP_SEND{,TO}, the assignment to @sr->umsg + * is equivalent to an assignment to @sr->buf. + */ sr->umsg =3D u64_to_user_ptr(READ_ONCE(sqe->addr)); + sr->len =3D READ_ONCE(sqe->len); sr->msg_flags =3D READ_ONCE(sqe->msg_flags) | MSG_NOSIGNAL; if (sr->msg_flags & MSG_DONTWAIT) req->flags |=3D REQ_F_NOWAIT; =20 + if (req->opcode =3D=3D IORING_OP_SENDTO) { + sr->addr =3D u64_to_user_ptr(READ_ONCE(sqe->addr2)); + sr->sendto_addr_len =3D READ_ONCE(sqe->addr3); + } else { + sr->addr =3D (struct sockaddr __user *) NULL; + sr->sendto_addr_len =3D 0; + } + #ifdef CONFIG_COMPAT if (req->ctx->compat) sr->msg_flags |=3D MSG_CMSG_COMPAT; @@ -4963,6 +4997,7 @@ static int io_sendmsg(struct io_kiocb *req, unsigned = int issue_flags) =20 static int io_sendto(struct io_kiocb *req, unsigned int issue_flags) { + struct sockaddr_storage address; struct io_sr_msg *sr =3D &req->sr_msg; struct msghdr msg; struct iovec iov; @@ -4979,10 +5014,20 @@ static int io_sendto(struct io_kiocb *req, unsigned= int issue_flags) if (unlikely(ret)) return ret; =20 - msg.msg_name =3D NULL; + msg.msg_control =3D NULL; msg.msg_controllen =3D 0; - msg.msg_namelen =3D 0; + if (sr->addr) { + ret =3D move_addr_to_kernel(sr->addr, sr->sendto_addr_len, + &address); + if (unlikely(ret < 0)) + goto fail; + msg.msg_name =3D (struct sockaddr *) &address; + msg.msg_namelen =3D sr->sendto_addr_len; + } else { + msg.msg_name =3D NULL; + msg.msg_namelen =3D 0; + } =20 flags =3D req->sr_msg.msg_flags; if (issue_flags & IO_URING_F_NONBLOCK) @@ -4997,6 +5042,7 @@ static int io_sendto(struct io_kiocb *req, unsigned i= nt issue_flags) return -EAGAIN; if (ret =3D=3D -ERESTARTSYS) ret =3D -EINTR; +fail: req_set_fail(req); } __io_req_complete(req, issue_flags, ret, 0); @@ -5115,13 +5161,26 @@ static int io_recvmsg_prep(struct io_kiocb *req, co= nst struct io_uring_sqe *sqe) if (unlikely(req->ctx->flags & IORING_SETUP_IOPOLL)) return -EINVAL; =20 + /* + * For IORING_OP_RECV{,FROM}, the assignment to @sr->umsg + * is equivalent to an assignment to @sr->buf. + */ sr->umsg =3D u64_to_user_ptr(READ_ONCE(sqe->addr)); + sr->len =3D READ_ONCE(sqe->len); sr->bgid =3D READ_ONCE(sqe->buf_group); sr->msg_flags =3D READ_ONCE(sqe->msg_flags) | MSG_NOSIGNAL; if (sr->msg_flags & MSG_DONTWAIT) req->flags |=3D REQ_F_NOWAIT; =20 + if (req->opcode =3D=3D IORING_OP_RECVFROM) { + sr->addr =3D u64_to_user_ptr(READ_ONCE(sqe->addr2)); + sr->recvfrom_addr_len =3D u64_to_user_ptr(READ_ONCE(sqe->addr3)); + } else { + sr->addr =3D (struct sockaddr __user *) NULL; + sr->recvfrom_addr_len =3D (int __user *) NULL; + } + #ifdef CONFIG_COMPAT if (req->ctx->compat) sr->msg_flags |=3D MSG_CMSG_COMPAT; @@ -5197,6 +5256,7 @@ static int io_recvfrom(struct io_kiocb *req, unsigned= int issue_flags) struct iovec iov; unsigned flags; int ret, min_ret =3D 0; + struct sockaddr_storage address; bool force_nonblock =3D issue_flags & IO_URING_F_NONBLOCK; =20 sock =3D sock_from_file(req->file); @@ -5214,9 +5274,10 @@ static int io_recvfrom(struct io_kiocb *req, unsigne= d int issue_flags) if (unlikely(ret)) goto out_free; =20 - msg.msg_name =3D NULL; + msg.msg_name =3D sr->addr ? (struct sockaddr *) &address : NULL; msg.msg_control =3D NULL; msg.msg_controllen =3D 0; + /* We assume all kernel code knows the size of sockaddr_storage */ msg.msg_namelen =3D 0; msg.msg_iocb =3D NULL; msg.msg_flags =3D 0; @@ -5228,6 +5289,15 @@ static int io_recvfrom(struct io_kiocb *req, unsigne= d int issue_flags) min_ret =3D iov_iter_count(&msg.msg_iter); =20 ret =3D sock_recvmsg(sock, &msg, flags); + if (ret >=3D 0 && sr->addr !=3D NULL) { + int tmp; + + tmp =3D move_addr_to_user(&address, msg.msg_namelen, sr->addr, + sr->recvfrom_addr_len); + if (unlikely(tmp < 0)) + ret =3D tmp; + } + out_free: if (ret < min_ret) { if (ret =3D=3D -EAGAIN && force_nonblock) @@ -6513,9 +6583,11 @@ static int io_req_prep(struct io_kiocb *req, const s= truct io_uring_sqe *sqe) case IORING_OP_SYNC_FILE_RANGE: return io_sfr_prep(req, sqe); case IORING_OP_SENDMSG: + case IORING_OP_SENDTO: case IORING_OP_SEND: return io_sendmsg_prep(req, sqe); case IORING_OP_RECVMSG: + case IORING_OP_RECVFROM: case IORING_OP_RECV: return io_recvmsg_prep(req, sqe); case IORING_OP_CONNECT: @@ -6770,12 +6842,14 @@ static int io_issue_sqe(struct io_kiocb *req, unsig= ned int issue_flags) case IORING_OP_SENDMSG: ret =3D io_sendmsg(req, issue_flags); break; + case IORING_OP_SENDTO: case IORING_OP_SEND: ret =3D io_sendto(req, issue_flags); break; case IORING_OP_RECVMSG: ret =3D io_recvmsg(req, issue_flags); break; + case IORING_OP_RECVFROM: case IORING_OP_RECV: ret =3D io_recvfrom(req, issue_flags); break; @@ -11218,6 +11292,7 @@ static int __init io_uring_init(void) BUILD_BUG_SQE_ELEM(42, __u16, personality); BUILD_BUG_SQE_ELEM(44, __s32, splice_fd_in); BUILD_BUG_SQE_ELEM(44, __u32, file_index); + BUILD_BUG_SQE_ELEM(48, __u64, addr3); =20 BUILD_BUG_ON(sizeof(struct io_uring_files_update) !=3D sizeof(struct io_uring_rsrc_update)); diff --git a/include/uapi/linux/io_uring.h b/include/uapi/linux/io_uring.h index 787f491f0d2a..a58cde19b4d0 100644 --- a/include/uapi/linux/io_uring.h +++ b/include/uapi/linux/io_uring.h @@ -60,7 +60,8 @@ struct io_uring_sqe { __s32 splice_fd_in; __u32 file_index; }; - __u64 __pad2[2]; + __u64 addr3; + __u64 __pad2[1]; }; =20 enum { @@ -143,6 +144,8 @@ enum { IORING_OP_MKDIRAT, IORING_OP_SYMLINKAT, IORING_OP_LINKAT, + IORING_OP_SENDTO, + IORING_OP_RECVFROM, =20 /* this goes last, obviously */ IORING_OP_LAST, --=20 2.32.0