* [RFC 0/3] io_uring: add support for IORING_OP_MSGSND/IORING_OP_MSGRCV
@ 2022-06-13 19:26 Usama Arif
2022-06-13 19:26 ` [RFC 1/3] ipc/msg: split do_msgsnd into functions Usama Arif
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Usama Arif @ 2022-06-13 19:26 UTC (permalink / raw)
To: io-uring, axboe, linux-kernel; +Cc: fam.zheng, Usama Arif
The first patch just refractors the do_msg function so that its different
parts can be used in io_uring.
The last 2 patches add the support for the async msgsnd/msgrcv.
For msgsnd the pointer to the loaded msgbuf is saved in
io_setup_async_msg_msg for the case when the call is punted to async
context.
For msgrcv, the pointer to user-defined buffer is already stored in the
prep function.
The correspoding prep helpers and a simple testcase for these in liburing
are present at https://github.com/uarif1/liburing/commit/17f6685ca398265b54a07ce4246ee344b5390aad.
These patches are currently missing compat support.
If the patches and approach look acceptable to start review,
I can send the next series with compat support included and also add the
man pages in the above liburing patch.
Thanks!
Usama Arif (3):
ipc/msg: split do_msgsnd into functions
io_uring: add support for IORING_OP_MSGSND
io_uring: add support for IORING_OP_MSGRCV
fs/io_uring.c | 152 ++++++++++++++++++++++++++++++++++
include/linux/msg.h | 11 +++
include/uapi/linux/io_uring.h | 2 +
ipc/msg.c | 52 +++++++++---
4 files changed, 205 insertions(+), 12 deletions(-)
--
2.25.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [RFC 1/3] ipc/msg: split do_msgsnd into functions
2022-06-13 19:26 [RFC 0/3] io_uring: add support for IORING_OP_MSGSND/IORING_OP_MSGRCV Usama Arif
@ 2022-06-13 19:26 ` Usama Arif
2022-06-13 19:26 ` [RFC 2/3] io_uring: add support for IORING_OP_MSGSND Usama Arif
2022-06-13 19:26 ` [RFC 3/3] io_uring: add support for IORING_OP_MSGRCV Usama Arif
2 siblings, 0 replies; 7+ messages in thread
From: Usama Arif @ 2022-06-13 19:26 UTC (permalink / raw)
To: io-uring, axboe, linux-kernel; +Cc: fam.zheng, Usama Arif
do_msgsnd is split into check_and_load_msgsnd and __do_msgsnd.
This does not introduce any change in the functions' operation.
Its only needed for async msgsnd in io_uring which will be added
in a later patch.
Functions used for msgsnd and msgrcv are also declared in the
header file for use in io_uring patches later.
Signed-off-by: Usama Arif <usama.arif@bytedance.com>
---
include/linux/msg.h | 11 ++++++++++
ipc/msg.c | 52 ++++++++++++++++++++++++++++++++++-----------
2 files changed, 51 insertions(+), 12 deletions(-)
diff --git a/include/linux/msg.h b/include/linux/msg.h
index 9a972a296b95..36e3116fed86 100644
--- a/include/linux/msg.h
+++ b/include/linux/msg.h
@@ -15,4 +15,15 @@ struct msg_msg {
/* the actual message follows immediately */
};
+long check_and_load_msgsnd(int msqid, long mtype, void __user *mtext,
+ struct msg_msg **msg, size_t msgsz);
+
+void free_msg(struct msg_msg *msg);
+
+long __do_msgsnd(int msqid, long mtype, struct msg_msg **msg,
+ size_t msgsz, int msgflg);
+
+long ksys_msgrcv(int msqid, struct msgbuf __user *msgp, size_t msgsz,
+ long msgtyp, int msgflg);
+
#endif /* _LINUX_MSG_H */
diff --git a/ipc/msg.c b/ipc/msg.c
index a0d05775af2c..0682204a684e 100644
--- a/ipc/msg.c
+++ b/ipc/msg.c
@@ -839,14 +839,11 @@ static inline int pipelined_send(struct msg_queue *msq, struct msg_msg *msg,
return 0;
}
-static long do_msgsnd(int msqid, long mtype, void __user *mtext,
- size_t msgsz, int msgflg)
+long check_and_load_msgsnd(int msqid, long mtype, void __user *mtext,
+ struct msg_msg **msg, size_t msgsz)
{
- struct msg_queue *msq;
- struct msg_msg *msg;
- int err;
struct ipc_namespace *ns;
- DEFINE_WAKE_Q(wake_q);
+ struct msg_msg *tmp;
ns = current->nsproxy->ipc_ns;
@@ -855,12 +852,45 @@ static long do_msgsnd(int msqid, long mtype, void __user *mtext,
if (mtype < 1)
return -EINVAL;
- msg = load_msg(mtext, msgsz);
+ tmp = load_msg(mtext, msgsz);
if (IS_ERR(msg))
return PTR_ERR(msg);
- msg->m_type = mtype;
- msg->m_ts = msgsz;
+ tmp->m_type = mtype;
+ tmp->m_ts = msgsz;
+
+ *msg = tmp;
+ return 0;
+}
+
+static long do_msgsnd(int msqid, long mtype, void __user *mtext,
+ size_t msgsz, int msgflg)
+{
+ struct msg_msg *msg;
+ int err;
+
+ err = check_and_load_msgsnd(msqid, mtype, mtext, &msg, msgsz);
+ if (err)
+ return err;
+
+ err = __do_msgsnd(msqid, mtype, &msg, msgsz, msgflg);
+ if (msg != NULL)
+ free_msg(msg);
+
+ return err;
+}
+
+long __do_msgsnd(int msqid, long mtype, struct msg_msg **_msg,
+ size_t msgsz, int msgflg)
+{
+ struct msg_queue *msq;
+ struct msg_msg *msg;
+ int err;
+ struct ipc_namespace *ns;
+ DEFINE_WAKE_Q(wake_q);
+
+ msg = *_msg;
+ ns = current->nsproxy->ipc_ns;
rcu_read_lock();
msq = msq_obtain_object_check(ns, msqid);
@@ -940,15 +970,13 @@ static long do_msgsnd(int msqid, long mtype, void __user *mtext,
}
err = 0;
- msg = NULL;
+ *_msg = NULL;
out_unlock0:
ipc_unlock_object(&msq->q_perm);
wake_up_q(&wake_q);
out_unlock1:
rcu_read_unlock();
- if (msg != NULL)
- free_msg(msg);
return err;
}
--
2.25.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [RFC 2/3] io_uring: add support for IORING_OP_MSGSND
2022-06-13 19:26 [RFC 0/3] io_uring: add support for IORING_OP_MSGSND/IORING_OP_MSGRCV Usama Arif
2022-06-13 19:26 ` [RFC 1/3] ipc/msg: split do_msgsnd into functions Usama Arif
@ 2022-06-13 19:26 ` Usama Arif
2022-06-14 6:18 ` kernel test robot
2022-06-14 6:28 ` kernel test robot
2022-06-13 19:26 ` [RFC 3/3] io_uring: add support for IORING_OP_MSGRCV Usama Arif
2 siblings, 2 replies; 7+ messages in thread
From: Usama Arif @ 2022-06-13 19:26 UTC (permalink / raw)
To: io-uring, axboe, linux-kernel; +Cc: fam.zheng, Usama Arif
This adds support for async msgsnd through io_uring.
The message is stored in msg pointer in io_msgsnd and is saved
in io_setup_async_msgq if we need to punt to async context.
Signed-off-by: Usama Arif <usama.arif@bytedance.com>
---
fs/io_uring.c | 107 ++++++++++++++++++++++++++++++++++
include/uapi/linux/io_uring.h | 1 +
2 files changed, 108 insertions(+)
diff --git a/fs/io_uring.c b/fs/io_uring.c
index 3aab4182fd89..5949fcadb380 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -81,6 +81,7 @@
#include <linux/audit.h>
#include <linux/security.h>
#include <linux/xattr.h>
+#include <linux/msg.h>
#define CREATE_TRACE_POINTS
#include <trace/events/io_uring.h>
@@ -669,6 +670,15 @@ struct io_sr_msg {
unsigned int flags;
};
+struct io_msg_sr {
+ struct file *file;
+ int msq_id;
+ struct msgbuf __user *msg_p;
+ size_t msg_sz;
+ long msg_type;
+ int msg_flags;
+};
+
struct io_open {
struct file *file;
int dfd;
@@ -803,6 +813,10 @@ struct io_async_msghdr {
struct sockaddr_storage addr;
};
+struct io_async_msg_msg {
+ struct msg_msg *msg;
+};
+
struct io_rw_state {
struct iov_iter iter;
struct iov_iter_state iter_state;
@@ -996,6 +1010,7 @@ struct io_kiocb {
struct io_socket sock;
struct io_nop nop;
struct io_uring_cmd uring_cmd;
+ struct io_msg_sr msg_sr;
};
u8 opcode;
@@ -1199,6 +1214,9 @@ static const struct io_op_def io_op_defs[] = {
.needs_async_setup = 1,
.async_size = sizeof(struct io_async_msghdr),
},
+ [IORING_OP_MSGSND] = {
+ .async_size = sizeof(struct io_async_msg_msg),
+ },
[IORING_OP_TIMEOUT] = {
.audit_skip = 1,
.async_size = sizeof(struct io_timeout_data),
@@ -1404,6 +1422,8 @@ const char *io_uring_get_opcode(u8 opcode)
return "SENDMSG";
case IORING_OP_RECVMSG:
return "RECVMSG";
+ case IORING_OP_MSGSND:
+ return "MSGSND";
case IORING_OP_TIMEOUT:
return "TIMEOUT";
case IORING_OP_TIMEOUT_REMOVE:
@@ -6180,6 +6200,81 @@ static int io_sendmsg_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)
return 0;
}
+static int io_setup_async_msg_msg(struct io_kiocb *req, struct msg_msg *msg)
+{
+ struct io_async_msg_msg *async_msg_msg = req->async_data;
+
+ if (async_msg_msg)
+ return -EAGAIN;
+ if (io_alloc_async_data(req))
+ return -ENOMEM;
+ async_msg_msg = req->async_data;
+
+ req->flags |= REQ_F_NEED_CLEANUP;
+ async_msg_msg->msg = msg;
+
+ return -EAGAIN;
+}
+
+static int io_msgsnd_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)
+{
+ struct io_msg_sr *msg_sr = &req->msg_sr;
+ struct msgbuf __user *msg_p;
+ long mtype;
+
+ if (unlikely(sqe->addr2 || sqe->file_index))
+ return -EINVAL;
+
+ msg_sr->msq_id = READ_ONCE(sqe->fd);
+ msg_p = u64_to_user_ptr(READ_ONCE(sqe->addr));
+ msg_sr->msg_p = msg_p;
+ if (get_user(mtype, &msg_p->mtype))
+ return -EFAULT;
+ msg_sr->msg_type = mtype;
+ msg_sr->msg_sz = READ_ONCE(sqe->len);
+ msg_sr->msg_flags = READ_ONCE(sqe->msg_flags);
+ if (msg_sr->msg_flags & IPC_NOWAIT)
+ req->flags |= REQ_F_NOWAIT;
+
+ return 0;
+}
+
+static int io_msgsnd(struct io_kiocb *req, unsigned int issue_flags)
+{
+ struct io_async_msg_msg *async_msg_msg;
+ struct io_msg_sr *msg_sr = &req->msg_sr;
+ int ret;
+ int flags;
+ struct msg_msg *msg;
+ bool force_nonblock = issue_flags & IO_URING_F_NONBLOCK;
+
+ if (req_has_async_data(req)) {
+ async_msg_msg = req->async_data;
+ msg = async_msg_msg->msg;
+ } else {
+ ret = check_and_load_msgsnd(msg_sr->msq_id, msg_sr->msg_type,
+ msg_sr->msg_p->mtext,
+ &msg, msg_sr->msg_sz);
+ if (ret)
+ return ret;
+ }
+
+ if (force_nonblock)
+ flags = msg_sr->msg_flags | IPC_NOWAIT;
+
+ ret = __do_msgsnd(msg_sr->msq_id, msg_sr->msg_type, &msg,
+ msg_sr->msg_sz, flags);
+
+ if (ret == -EAGAIN && (issue_flags & IO_URING_F_NONBLOCK))
+ return io_setup_async_msg_msg(req, msg);
+
+ if (msg != NULL)
+ free_msg(msg);
+ req->flags &= ~REQ_F_NEED_CLEANUP;
+
+ io_req_complete(req, ret);
+ return ret;
+}
static int io_sendmsg(struct io_kiocb *req, unsigned int issue_flags)
{
struct io_async_msghdr iomsg, *kmsg;
@@ -8192,6 +8287,8 @@ static int io_req_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)
return io_socket_prep(req, sqe);
case IORING_OP_URING_CMD:
return io_uring_cmd_prep(req, sqe);
+ case IORING_OP_MSGSND:
+ return io_msgsnd_prep(req, sqe);
}
printk_once(KERN_WARNING "io_uring: unhandled opcode %d\n",
@@ -8316,6 +8413,13 @@ static void io_clean_op(struct io_kiocb *req)
kfree(io->free_iov);
break;
}
+ case IORING_OP_MSGSND: {
+ struct io_async_msg_msg *io = req->async_data;
+
+ if (io->msg != NULL)
+ free_msg(io->msg);
+ break;
+ }
case IORING_OP_OPENAT:
case IORING_OP_OPENAT2:
if (req->open.filename)
@@ -8529,6 +8633,9 @@ static int io_issue_sqe(struct io_kiocb *req, unsigned int issue_flags)
case IORING_OP_URING_CMD:
ret = io_uring_cmd(req, issue_flags);
break;
+ case IORING_OP_MSGSND:
+ ret = io_msgsnd(req, issue_flags);
+ break;
default:
ret = -EINVAL;
break;
diff --git a/include/uapi/linux/io_uring.h b/include/uapi/linux/io_uring.h
index 776e0278f9dd..fa29bd96207d 100644
--- a/include/uapi/linux/io_uring.h
+++ b/include/uapi/linux/io_uring.h
@@ -190,6 +190,7 @@ enum io_uring_op {
IORING_OP_GETXATTR,
IORING_OP_SOCKET,
IORING_OP_URING_CMD,
+ IORING_OP_MSGSND,
/* this goes last, obviously */
IORING_OP_LAST,
--
2.25.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [RFC 3/3] io_uring: add support for IORING_OP_MSGRCV
2022-06-13 19:26 [RFC 0/3] io_uring: add support for IORING_OP_MSGSND/IORING_OP_MSGRCV Usama Arif
2022-06-13 19:26 ` [RFC 1/3] ipc/msg: split do_msgsnd into functions Usama Arif
2022-06-13 19:26 ` [RFC 2/3] io_uring: add support for IORING_OP_MSGSND Usama Arif
@ 2022-06-13 19:26 ` Usama Arif
2022-06-14 8:10 ` kernel test robot
2 siblings, 1 reply; 7+ messages in thread
From: Usama Arif @ 2022-06-13 19:26 UTC (permalink / raw)
To: io-uring, axboe, linux-kernel; +Cc: fam.zheng, Usama Arif
This adds support for async msgrcv through io_uring.
All the information needed after punt to async context
is already stored in the io_msgrcv_prep call.
Signed-off-by: Usama Arif <usama.arif@bytedance.com>
---
fs/io_uring.c | 45 +++++++++++++++++++++++++++++++++++
include/uapi/linux/io_uring.h | 1 +
2 files changed, 46 insertions(+)
diff --git a/fs/io_uring.c b/fs/io_uring.c
index 5949fcadb380..124914d8ee50 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -1217,6 +1217,8 @@ static const struct io_op_def io_op_defs[] = {
[IORING_OP_MSGSND] = {
.async_size = sizeof(struct io_async_msg_msg),
},
+ [IORING_OP_MSGRCV] = {
+ },
[IORING_OP_TIMEOUT] = {
.audit_skip = 1,
.async_size = sizeof(struct io_timeout_data),
@@ -1424,6 +1426,8 @@ const char *io_uring_get_opcode(u8 opcode)
return "RECVMSG";
case IORING_OP_MSGSND:
return "MSGSND";
+ case IORING_OP_MSGRCV:
+ return "MSGRCV";
case IORING_OP_TIMEOUT:
return "TIMEOUT";
case IORING_OP_TIMEOUT_REMOVE:
@@ -6275,6 +6279,42 @@ static int io_msgsnd(struct io_kiocb *req, unsigned int issue_flags)
io_req_complete(req, ret);
return ret;
}
+
+static int io_msgrcv_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)
+{
+ struct io_msg_sr *msg_sr = &req->msg_sr;
+
+ if (unlikely(sqe->file_index))
+ return -EINVAL;
+
+ msg_sr->msq_id = READ_ONCE(sqe->fd);
+ msg_sr->msg_p = u64_to_user_ptr(READ_ONCE(sqe->addr));
+ msg_sr->msg_type = READ_ONCE(sqe->off);
+ msg_sr->msg_sz = READ_ONCE(sqe->len);
+ msg_sr->msg_flags = READ_ONCE(sqe->msg_flags);
+ return 0;
+}
+
+static int io_msgrcv(struct io_kiocb *req, unsigned int issue_flags)
+{
+ struct io_msg_sr *msg_sr = &req->msg_sr;
+ int ret;
+ int flags;
+ bool force_nonblock = issue_flags & IO_URING_F_NONBLOCK;
+
+ if (force_nonblock)
+ flags = msg_sr->msg_flags | IPC_NOWAIT;
+
+ ret = ksys_msgrcv(msg_sr->msq_id, msg_sr->msg_p, msg_sr->msg_sz,
+ msg_sr->msg_type, flags);
+
+ if (ret == -ENOMSG)
+ return -EAGAIN;
+
+ io_req_complete(req, ret);
+ return 0;
+}
+
static int io_sendmsg(struct io_kiocb *req, unsigned int issue_flags)
{
struct io_async_msghdr iomsg, *kmsg;
@@ -8289,6 +8329,8 @@ static int io_req_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)
return io_uring_cmd_prep(req, sqe);
case IORING_OP_MSGSND:
return io_msgsnd_prep(req, sqe);
+ case IORING_OP_MSGRCV:
+ return io_msgrcv_prep(req, sqe);
}
printk_once(KERN_WARNING "io_uring: unhandled opcode %d\n",
@@ -8636,6 +8678,9 @@ static int io_issue_sqe(struct io_kiocb *req, unsigned int issue_flags)
case IORING_OP_MSGSND:
ret = io_msgsnd(req, issue_flags);
break;
+ case IORING_OP_MSGRCV:
+ ret = io_msgrcv(req, issue_flags);
+ break;
default:
ret = -EINVAL;
break;
diff --git a/include/uapi/linux/io_uring.h b/include/uapi/linux/io_uring.h
index fa29bd96207d..b5dcaac30d9d 100644
--- a/include/uapi/linux/io_uring.h
+++ b/include/uapi/linux/io_uring.h
@@ -191,6 +191,7 @@ enum io_uring_op {
IORING_OP_SOCKET,
IORING_OP_URING_CMD,
IORING_OP_MSGSND,
+ IORING_OP_MSGRCV,
/* this goes last, obviously */
IORING_OP_LAST,
--
2.25.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [RFC 2/3] io_uring: add support for IORING_OP_MSGSND
2022-06-13 19:26 ` [RFC 2/3] io_uring: add support for IORING_OP_MSGSND Usama Arif
@ 2022-06-14 6:18 ` kernel test robot
2022-06-14 6:28 ` kernel test robot
1 sibling, 0 replies; 7+ messages in thread
From: kernel test robot @ 2022-06-14 6:18 UTC (permalink / raw)
To: Usama Arif; +Cc: llvm, kbuild-all
Hi Usama,
[FYI, it's a private test report for your RFC patch.]
[auto build test ERROR on linus/master]
[also build test ERROR on v5.19-rc2 next-20220610]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/intel-lab-lkp/linux/commits/Usama-Arif/io_uring-add-support-for-IORING_OP_MSGSND-IORING_OP_MSGRCV/20220614-043915
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git b13baccc3850ca8b8cccbf8ed9912dbaa0fdf7f3
config: hexagon-randconfig-r041-20220613 (https://download.01.org/0day-ci/archive/20220614/202206141405.lCMvrlaK-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project c97436f8b6e2718286e8496faf53a2c800e281cf)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/55ef2bd7a864162103bc17258d5426bb0847dc9d
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Usama-Arif/io_uring-add-support-for-IORING_OP_MSGSND-IORING_OP_MSGRCV/20220614-043915
git checkout 55ef2bd7a864162103bc17258d5426bb0847dc9d
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>
All error/warnings (new ones prefixed by >>):
>> ld.lld: error: undefined symbol: check_and_load_msgsnd
>>> referenced by io_uring.c
>>> io_uring.o:(io_issue_sqe) in archive fs/built-in.a
>>> referenced by io_uring.c
>>> io_uring.o:(io_issue_sqe) in archive fs/built-in.a
--
>> ld.lld: error: undefined symbol: __do_msgsnd
>>> referenced by io_uring.c
>>> io_uring.o:(io_issue_sqe) in archive fs/built-in.a
>>> referenced by io_uring.c
>>> io_uring.o:(io_issue_sqe) in archive fs/built-in.a
--
>> ld.lld: error: undefined symbol: free_msg
>>> referenced by io_uring.c
>>> io_uring.o:(io_issue_sqe) in archive fs/built-in.a
>>> referenced by io_uring.c
>>> io_uring.o:(io_issue_sqe) in archive fs/built-in.a
>>> referenced by io_uring.c
>>> io_uring.o:(io_clean_op) in archive fs/built-in.a
>>> referenced 1 more times
--
>> fs/io_uring.c:6262:6: warning: variable 'flags' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
if (force_nonblock)
^~~~~~~~~~~~~~
fs/io_uring.c:6266:22: note: uninitialized use occurs here
msg_sr->msg_sz, flags);
^~~~~
fs/io_uring.c:6262:2: note: remove the 'if' if its condition is always true
if (force_nonblock)
^~~~~~~~~~~~~~~~~~~
fs/io_uring.c:6247:11: note: initialize the variable 'flags' to silence this warning
int flags;
^
= 0
fs/io_uring.c:8737:28: warning: unused function 'io_file_from_index' [-Wunused-function]
static inline struct file *io_file_from_index(struct io_ring_ctx *ctx,
^
2 warnings generated.
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [RFC 2/3] io_uring: add support for IORING_OP_MSGSND
2022-06-13 19:26 ` [RFC 2/3] io_uring: add support for IORING_OP_MSGSND Usama Arif
2022-06-14 6:18 ` kernel test robot
@ 2022-06-14 6:28 ` kernel test robot
1 sibling, 0 replies; 7+ messages in thread
From: kernel test robot @ 2022-06-14 6:28 UTC (permalink / raw)
To: Usama Arif; +Cc: llvm, kbuild-all
Hi Usama,
[FYI, it's a private test report for your RFC patch.]
[auto build test ERROR on linus/master]
[also build test ERROR on v5.19-rc2 next-20220610]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/intel-lab-lkp/linux/commits/Usama-Arif/io_uring-add-support-for-IORING_OP_MSGSND-IORING_OP_MSGRCV/20220614-043915
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git b13baccc3850ca8b8cccbf8ed9912dbaa0fdf7f3
config: hexagon-randconfig-r045-20220613 (https://download.01.org/0day-ci/archive/20220614/202206141441.Zawylny2-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project c97436f8b6e2718286e8496faf53a2c800e281cf)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/55ef2bd7a864162103bc17258d5426bb0847dc9d
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Usama-Arif/io_uring-add-support-for-IORING_OP_MSGSND-IORING_OP_MSGRCV/20220614-043915
git checkout 55ef2bd7a864162103bc17258d5426bb0847dc9d
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> fs/io_uring.c:8291:10: error: call to undeclared function 'io_msgsnd_prep'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
return io_msgsnd_prep(req, sqe);
^
>> fs/io_uring.c:8637:9: error: call to undeclared function 'io_msgsnd'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
ret = io_msgsnd(req, issue_flags);
^
2 errors generated.
vim +/io_msgsnd_prep +8291 fs/io_uring.c
8199
8200 static int io_req_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)
8201 {
8202 switch (req->opcode) {
8203 case IORING_OP_NOP:
8204 return io_nop_prep(req, sqe);
8205 case IORING_OP_READV:
8206 case IORING_OP_READ_FIXED:
8207 case IORING_OP_READ:
8208 case IORING_OP_WRITEV:
8209 case IORING_OP_WRITE_FIXED:
8210 case IORING_OP_WRITE:
8211 return io_prep_rw(req, sqe);
8212 case IORING_OP_POLL_ADD:
8213 return io_poll_add_prep(req, sqe);
8214 case IORING_OP_POLL_REMOVE:
8215 return io_poll_remove_prep(req, sqe);
8216 case IORING_OP_FSYNC:
8217 return io_fsync_prep(req, sqe);
8218 case IORING_OP_SYNC_FILE_RANGE:
8219 return io_sfr_prep(req, sqe);
8220 case IORING_OP_SENDMSG:
8221 case IORING_OP_SEND:
8222 return io_sendmsg_prep(req, sqe);
8223 case IORING_OP_RECVMSG:
8224 case IORING_OP_RECV:
8225 return io_recvmsg_prep(req, sqe);
8226 case IORING_OP_CONNECT:
8227 return io_connect_prep(req, sqe);
8228 case IORING_OP_TIMEOUT:
8229 return io_timeout_prep(req, sqe);
8230 case IORING_OP_TIMEOUT_REMOVE:
8231 return io_timeout_remove_prep(req, sqe);
8232 case IORING_OP_ASYNC_CANCEL:
8233 return io_async_cancel_prep(req, sqe);
8234 case IORING_OP_LINK_TIMEOUT:
8235 return io_link_timeout_prep(req, sqe);
8236 case IORING_OP_ACCEPT:
8237 return io_accept_prep(req, sqe);
8238 case IORING_OP_FALLOCATE:
8239 return io_fallocate_prep(req, sqe);
8240 case IORING_OP_OPENAT:
8241 return io_openat_prep(req, sqe);
8242 case IORING_OP_CLOSE:
8243 return io_close_prep(req, sqe);
8244 case IORING_OP_FILES_UPDATE:
8245 return io_files_update_prep(req, sqe);
8246 case IORING_OP_STATX:
8247 return io_statx_prep(req, sqe);
8248 case IORING_OP_FADVISE:
8249 return io_fadvise_prep(req, sqe);
8250 case IORING_OP_MADVISE:
8251 return io_madvise_prep(req, sqe);
8252 case IORING_OP_OPENAT2:
8253 return io_openat2_prep(req, sqe);
8254 case IORING_OP_EPOLL_CTL:
8255 return io_epoll_ctl_prep(req, sqe);
8256 case IORING_OP_SPLICE:
8257 return io_splice_prep(req, sqe);
8258 case IORING_OP_PROVIDE_BUFFERS:
8259 return io_provide_buffers_prep(req, sqe);
8260 case IORING_OP_REMOVE_BUFFERS:
8261 return io_remove_buffers_prep(req, sqe);
8262 case IORING_OP_TEE:
8263 return io_tee_prep(req, sqe);
8264 case IORING_OP_SHUTDOWN:
8265 return io_shutdown_prep(req, sqe);
8266 case IORING_OP_RENAMEAT:
8267 return io_renameat_prep(req, sqe);
8268 case IORING_OP_UNLINKAT:
8269 return io_unlinkat_prep(req, sqe);
8270 case IORING_OP_MKDIRAT:
8271 return io_mkdirat_prep(req, sqe);
8272 case IORING_OP_SYMLINKAT:
8273 return io_symlinkat_prep(req, sqe);
8274 case IORING_OP_LINKAT:
8275 return io_linkat_prep(req, sqe);
8276 case IORING_OP_MSG_RING:
8277 return io_msg_ring_prep(req, sqe);
8278 case IORING_OP_FSETXATTR:
8279 return io_fsetxattr_prep(req, sqe);
8280 case IORING_OP_SETXATTR:
8281 return io_setxattr_prep(req, sqe);
8282 case IORING_OP_FGETXATTR:
8283 return io_fgetxattr_prep(req, sqe);
8284 case IORING_OP_GETXATTR:
8285 return io_getxattr_prep(req, sqe);
8286 case IORING_OP_SOCKET:
8287 return io_socket_prep(req, sqe);
8288 case IORING_OP_URING_CMD:
8289 return io_uring_cmd_prep(req, sqe);
8290 case IORING_OP_MSGSND:
> 8291 return io_msgsnd_prep(req, sqe);
8292 }
8293
8294 printk_once(KERN_WARNING "io_uring: unhandled opcode %d\n",
8295 req->opcode);
8296 return -EINVAL;
8297 }
8298
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [RFC 3/3] io_uring: add support for IORING_OP_MSGRCV
2022-06-13 19:26 ` [RFC 3/3] io_uring: add support for IORING_OP_MSGRCV Usama Arif
@ 2022-06-14 8:10 ` kernel test robot
0 siblings, 0 replies; 7+ messages in thread
From: kernel test robot @ 2022-06-14 8:10 UTC (permalink / raw)
To: Usama Arif; +Cc: llvm, kbuild-all
Hi Usama,
[FYI, it's a private test report for your RFC patch.]
[auto build test ERROR on linus/master]
[also build test ERROR on v5.19-rc2]
[cannot apply to next-20220614]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/intel-lab-lkp/linux/commits/Usama-Arif/io_uring-add-support-for-IORING_OP_MSGSND-IORING_OP_MSGRCV/20220614-043915
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git b13baccc3850ca8b8cccbf8ed9912dbaa0fdf7f3
config: hexagon-randconfig-r045-20220613 (https://download.01.org/0day-ci/archive/20220614/202206141643.zjDF6qdK-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project c97436f8b6e2718286e8496faf53a2c800e281cf)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/68c2ccd5226487853561a6eae75c70429721d46a
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Usama-Arif/io_uring-add-support-for-IORING_OP_MSGSND-IORING_OP_MSGRCV/20220614-043915
git checkout 68c2ccd5226487853561a6eae75c70429721d46a
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
fs/io_uring.c:8331:10: error: call to undeclared function 'io_msgsnd_prep'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
return io_msgsnd_prep(req, sqe);
^
>> fs/io_uring.c:8333:10: error: call to undeclared function 'io_msgrcv_prep'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
return io_msgrcv_prep(req, sqe);
^
fs/io_uring.c:8679:9: error: call to undeclared function 'io_msgsnd'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
ret = io_msgsnd(req, issue_flags);
^
>> fs/io_uring.c:8682:9: error: call to undeclared function 'io_msgrcv'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
ret = io_msgrcv(req, issue_flags);
^
4 errors generated.
vim +/io_msgrcv_prep +8333 fs/io_uring.c
8239
8240 static int io_req_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)
8241 {
8242 switch (req->opcode) {
8243 case IORING_OP_NOP:
8244 return io_nop_prep(req, sqe);
8245 case IORING_OP_READV:
8246 case IORING_OP_READ_FIXED:
8247 case IORING_OP_READ:
8248 case IORING_OP_WRITEV:
8249 case IORING_OP_WRITE_FIXED:
8250 case IORING_OP_WRITE:
8251 return io_prep_rw(req, sqe);
8252 case IORING_OP_POLL_ADD:
8253 return io_poll_add_prep(req, sqe);
8254 case IORING_OP_POLL_REMOVE:
8255 return io_poll_remove_prep(req, sqe);
8256 case IORING_OP_FSYNC:
8257 return io_fsync_prep(req, sqe);
8258 case IORING_OP_SYNC_FILE_RANGE:
8259 return io_sfr_prep(req, sqe);
8260 case IORING_OP_SENDMSG:
8261 case IORING_OP_SEND:
8262 return io_sendmsg_prep(req, sqe);
8263 case IORING_OP_RECVMSG:
8264 case IORING_OP_RECV:
8265 return io_recvmsg_prep(req, sqe);
8266 case IORING_OP_CONNECT:
8267 return io_connect_prep(req, sqe);
8268 case IORING_OP_TIMEOUT:
8269 return io_timeout_prep(req, sqe);
8270 case IORING_OP_TIMEOUT_REMOVE:
8271 return io_timeout_remove_prep(req, sqe);
8272 case IORING_OP_ASYNC_CANCEL:
8273 return io_async_cancel_prep(req, sqe);
8274 case IORING_OP_LINK_TIMEOUT:
8275 return io_link_timeout_prep(req, sqe);
8276 case IORING_OP_ACCEPT:
8277 return io_accept_prep(req, sqe);
8278 case IORING_OP_FALLOCATE:
8279 return io_fallocate_prep(req, sqe);
8280 case IORING_OP_OPENAT:
8281 return io_openat_prep(req, sqe);
8282 case IORING_OP_CLOSE:
8283 return io_close_prep(req, sqe);
8284 case IORING_OP_FILES_UPDATE:
8285 return io_files_update_prep(req, sqe);
8286 case IORING_OP_STATX:
8287 return io_statx_prep(req, sqe);
8288 case IORING_OP_FADVISE:
8289 return io_fadvise_prep(req, sqe);
8290 case IORING_OP_MADVISE:
8291 return io_madvise_prep(req, sqe);
8292 case IORING_OP_OPENAT2:
8293 return io_openat2_prep(req, sqe);
8294 case IORING_OP_EPOLL_CTL:
8295 return io_epoll_ctl_prep(req, sqe);
8296 case IORING_OP_SPLICE:
8297 return io_splice_prep(req, sqe);
8298 case IORING_OP_PROVIDE_BUFFERS:
8299 return io_provide_buffers_prep(req, sqe);
8300 case IORING_OP_REMOVE_BUFFERS:
8301 return io_remove_buffers_prep(req, sqe);
8302 case IORING_OP_TEE:
8303 return io_tee_prep(req, sqe);
8304 case IORING_OP_SHUTDOWN:
8305 return io_shutdown_prep(req, sqe);
8306 case IORING_OP_RENAMEAT:
8307 return io_renameat_prep(req, sqe);
8308 case IORING_OP_UNLINKAT:
8309 return io_unlinkat_prep(req, sqe);
8310 case IORING_OP_MKDIRAT:
8311 return io_mkdirat_prep(req, sqe);
8312 case IORING_OP_SYMLINKAT:
8313 return io_symlinkat_prep(req, sqe);
8314 case IORING_OP_LINKAT:
8315 return io_linkat_prep(req, sqe);
8316 case IORING_OP_MSG_RING:
8317 return io_msg_ring_prep(req, sqe);
8318 case IORING_OP_FSETXATTR:
8319 return io_fsetxattr_prep(req, sqe);
8320 case IORING_OP_SETXATTR:
8321 return io_setxattr_prep(req, sqe);
8322 case IORING_OP_FGETXATTR:
8323 return io_fgetxattr_prep(req, sqe);
8324 case IORING_OP_GETXATTR:
8325 return io_getxattr_prep(req, sqe);
8326 case IORING_OP_SOCKET:
8327 return io_socket_prep(req, sqe);
8328 case IORING_OP_URING_CMD:
8329 return io_uring_cmd_prep(req, sqe);
8330 case IORING_OP_MSGSND:
8331 return io_msgsnd_prep(req, sqe);
8332 case IORING_OP_MSGRCV:
> 8333 return io_msgrcv_prep(req, sqe);
8334 }
8335
8336 printk_once(KERN_WARNING "io_uring: unhandled opcode %d\n",
8337 req->opcode);
8338 return -EINVAL;
8339 }
8340
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-06-14 8:11 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-13 19:26 [RFC 0/3] io_uring: add support for IORING_OP_MSGSND/IORING_OP_MSGRCV Usama Arif
2022-06-13 19:26 ` [RFC 1/3] ipc/msg: split do_msgsnd into functions Usama Arif
2022-06-13 19:26 ` [RFC 2/3] io_uring: add support for IORING_OP_MSGSND Usama Arif
2022-06-14 6:18 ` kernel test robot
2022-06-14 6:28 ` kernel test robot
2022-06-13 19:26 ` [RFC 3/3] io_uring: add support for IORING_OP_MSGRCV Usama Arif
2022-06-14 8:10 ` kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.