From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [RFC 11/12] io_uring: sendzc with fixed buffers
Date: Wed, 01 Dec 2021 17:18:58 +0800 [thread overview]
Message-ID: <202112011718.UpQScm5i-lkp@intel.com> (raw)
In-Reply-To: <962f2f1c524d25356cdda188070d8653ee28f012.1638282789.git.asml.silence@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 10608 bytes --]
Hi Pavel,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on next-20211130]
[cannot apply to net/master horms-ipvs/master net-next/master linus/master v5.16-rc3 v5.16-rc2 v5.16-rc1]
[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/0day-ci/linux/commits/Pavel-Begunkov/io_uring-zerocopy-send/20211130-232227
base: 34f255a1e91ab44ff8926cf8294ff9144e62e861
config: i386-randconfig-s001-20211129 (https://download.01.org/0day-ci/archive/20211201/202112011718.UpQScm5i-lkp(a)intel.com/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://github.com/0day-ci/linux/commit/6144f7bc14ecc2532d2b7dc221b644bce73f3464
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Pavel-Begunkov/io_uring-zerocopy-send/20211130-232227
git checkout 6144f7bc14ecc2532d2b7dc221b644bce73f3464
# save the config file to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=i386 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
sparse warnings: (new ones prefixed by >>)
fs/io_uring.c: note: in included file (through include/trace/trace_events.h, include/trace/define_trace.h, include/trace/events/io_uring.h):
include/trace/events/io_uring.h:509:1: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] op_flags @@ got restricted __kernel_rwf_t const [usertype] rw_flags @@
include/trace/events/io_uring.h:509:1: sparse: expected unsigned int [usertype] op_flags
include/trace/events/io_uring.h:509:1: sparse: got restricted __kernel_rwf_t const [usertype] rw_flags
fs/io_uring.c: note: in included file (through include/trace/perf.h, include/trace/define_trace.h, include/trace/events/io_uring.h):
include/trace/events/io_uring.h:509:1: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] op_flags @@ got restricted __kernel_rwf_t const [usertype] rw_flags @@
include/trace/events/io_uring.h:509:1: sparse: expected unsigned int [usertype] op_flags
include/trace/events/io_uring.h:509:1: sparse: got restricted __kernel_rwf_t const [usertype] rw_flags
fs/io_uring.c:3286:24: sparse: sparse: incorrect type in return expression (different address spaces) @@ expected void [noderef] __user * @@ got struct io_buffer *[assigned] kbuf @@
fs/io_uring.c:3286:24: sparse: expected void [noderef] __user *
fs/io_uring.c:3286:24: sparse: got struct io_buffer *[assigned] kbuf
fs/io_uring.c:4831:14: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct file *file @@ got struct file [noderef] __rcu * @@
fs/io_uring.c:4831:14: sparse: expected struct file *file
fs/io_uring.c:4831:14: sparse: got struct file [noderef] __rcu *
>> fs/io_uring.c:5108:42: sparse: sparse: cast removes address space '__user' of expression
fs/io_uring.c:5584:72: sparse: sparse: incorrect type in argument 4 (different base types) @@ expected int mask @@ got restricted __poll_t [usertype] mask @@
fs/io_uring.c:5584:72: sparse: expected int mask
fs/io_uring.c:5584:72: sparse: got restricted __poll_t [usertype] mask
fs/io_uring.c:5588:21: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] result @@ got restricted __poll_t [usertype] mask @@
fs/io_uring.c:5588:21: sparse: expected unsigned int [usertype] result
fs/io_uring.c:5588:21: sparse: got restricted __poll_t [usertype] mask
fs/io_uring.c:5613:29: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] result @@ got restricted __poll_t @@
fs/io_uring.c:5613:29: sparse: expected unsigned int [usertype] result
fs/io_uring.c:5613:29: sparse: got restricted __poll_t
fs/io_uring.c:5698:51: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected restricted __poll_t [usertype] mask @@ got unsigned int [usertype] result @@
fs/io_uring.c:5698:51: sparse: expected restricted __poll_t [usertype] mask
fs/io_uring.c:5698:51: sparse: got unsigned int [usertype] result
fs/io_uring.c:5859:41: sparse: sparse: incorrect type in argument 4 (different base types) @@ expected int mask @@ got restricted __poll_t [usertype] @@
fs/io_uring.c:5859:41: sparse: expected int mask
fs/io_uring.c:5859:41: sparse: got restricted __poll_t [usertype]
fs/io_uring.c:5931:30: sparse: sparse: restricted __poll_t degrades to integer
fs/io_uring.c:5931:53: sparse: sparse: incorrect type in initializer (different base types) @@ expected restricted __poll_t [usertype] mask @@ got unsigned int @@
fs/io_uring.c:5931:53: sparse: expected restricted __poll_t [usertype] mask
fs/io_uring.c:5931:53: sparse: got unsigned int
fs/io_uring.c:5939:22: sparse: sparse: invalid assignment: |=
fs/io_uring.c:5939:22: sparse: left side has type restricted __poll_t
fs/io_uring.c:5939:22: sparse: right side has type int
fs/io_uring.c:5944:30: sparse: sparse: invalid assignment: &=
fs/io_uring.c:5944:30: sparse: left side has type restricted __poll_t
fs/io_uring.c:5944:30: sparse: right side has type int
fs/io_uring.c:5946:22: sparse: sparse: invalid assignment: |=
fs/io_uring.c:5946:22: sparse: left side has type restricted __poll_t
fs/io_uring.c:5946:22: sparse: right side has type int
fs/io_uring.c:5965:33: sparse: sparse: incorrect type in argument 5 (different base types) @@ expected int mask @@ got restricted __poll_t [usertype] mask @@
fs/io_uring.c:5965:33: sparse: expected int mask
fs/io_uring.c:5965:33: sparse: got restricted __poll_t [usertype] mask
fs/io_uring.c:5965:50: sparse: sparse: incorrect type in argument 6 (different base types) @@ expected int events @@ got restricted __poll_t [usertype] events @@
fs/io_uring.c:5965:50: sparse: expected int events
fs/io_uring.c:5965:50: sparse: got restricted __poll_t [usertype] events
fs/io_uring.c:6077:24: sparse: sparse: invalid assignment: |=
fs/io_uring.c:6077:24: sparse: left side has type unsigned int
fs/io_uring.c:6077:24: sparse: right side has type restricted __poll_t
fs/io_uring.c:6078:65: sparse: sparse: restricted __poll_t degrades to integer
fs/io_uring.c:6078:29: sparse: sparse: restricted __poll_t degrades to integer
fs/io_uring.c:6078:38: sparse: sparse: incorrect type in return expression (different base types) @@ expected restricted __poll_t @@ got unsigned int @@
fs/io_uring.c:6078:38: sparse: expected restricted __poll_t
fs/io_uring.c:6078:38: sparse: got unsigned int
fs/io_uring.c:6220:35: sparse: sparse: invalid assignment: &=
fs/io_uring.c:6220:35: sparse: left side has type restricted __poll_t
fs/io_uring.c:6220:35: sparse: right side has type int
fs/io_uring.c:6221:54: sparse: sparse: restricted __poll_t degrades to integer
fs/io_uring.c:6221:35: sparse: sparse: invalid assignment: |=
fs/io_uring.c:6221:35: sparse: left side has type restricted __poll_t
fs/io_uring.c:6221:35: sparse: right side has type unsigned int
fs/io_uring.c:8267:9: sparse: sparse: context imbalance in 'io_sq_thread_unpark' - wrong count at exit
fs/io_uring.c:8278:9: sparse: sparse: context imbalance in 'io_sq_thread_park' - wrong count at exit
vim +/__user +5108 fs/io_uring.c
5089
5090 static int io_sendzc(struct io_kiocb *req, unsigned int issue_flags)
5091 {
5092 struct sockaddr_storage address;
5093 struct io_ring_ctx *ctx = req->ctx;
5094 struct io_tx_notifier *notifier;
5095 struct io_sendzc *sr = &req->msgzc;
5096 struct msghdr msg;
5097 struct iovec iov;
5098 struct socket *sock;
5099 unsigned flags;
5100 int ret, min_ret = 0;
5101
5102 sock = sock_from_file(req->file);
5103 if (unlikely(!sock))
5104 return -ENOTSOCK;
5105
5106 if (req->msgzc.zc_flags & IORING_SENDZC_FIXED_BUF) {
5107 ret = __io_import_fixed(WRITE, &msg.msg_iter, req->imu,
> 5108 (u64)sr->buf, sr->len);
5109 } else {
5110 ret = import_single_range(WRITE, sr->buf, sr->len, &iov,
5111 &msg.msg_iter);
5112 }
5113 if (unlikely(ret))
5114 return ret;
5115
5116 msg.msg_name = NULL;
5117 msg.msg_control = NULL;
5118 msg.msg_controllen = 0;
5119 msg.msg_namelen = 0;
5120 if (sr->addr) {
5121 ret = move_addr_to_kernel(sr->addr, sr->addr_len, &address);
5122 if (ret < 0)
5123 return ret;
5124 msg.msg_name = (struct sockaddr *)&address;
5125 msg.msg_namelen = sr->addr_len;
5126 }
5127
5128 io_ring_submit_lock(ctx, issue_flags & IO_URING_F_UNLOCKED);
5129 notifier = io_get_tx_notifier(ctx, req->msgzc.tx_ctx);
5130 if (!notifier) {
5131 req_set_fail(req);
5132 ret = -ENOMEM;
5133 goto out;
5134 }
5135 msg.msg_ubuf = ¬ifier->uarg;
5136
5137 flags = sr->msg_flags;
5138 if (issue_flags & IO_URING_F_NONBLOCK)
5139 flags |= MSG_DONTWAIT;
5140 if (flags & MSG_WAITALL)
5141 min_ret = iov_iter_count(&msg.msg_iter);
5142 msg.msg_flags = flags;
5143 ret = sock_sendmsg(sock, &msg);
5144
5145 if (ret < min_ret) {
5146 if (ret == -EAGAIN && (issue_flags & IO_URING_F_NONBLOCK))
5147 goto out;
5148 if (ret == -ERESTARTSYS)
5149 ret = -EINTR;
5150 req_set_fail(req);
5151 } else if (req->msgzc.zc_flags & IORING_SENDZC_FLUSH) {
5152 io_tx_kill_notification(req->msgzc.tx_ctx);
5153 }
5154 io_ring_submit_unlock(ctx, issue_flags & IO_URING_F_UNLOCKED);
5155 __io_req_complete(req, issue_flags, ret, 0);
5156 return 0;
5157 out:
5158 io_ring_submit_unlock(ctx, issue_flags & IO_URING_F_UNLOCKED);
5159 return ret;
5160 }
5161
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
next prev parent reply other threads:[~2021-12-01 9:18 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-30 15:18 [RFC 00/12] io_uring zerocopy send Pavel Begunkov
2021-11-30 15:18 ` [RFC 01/12] skbuff: add SKBFL_DONT_ORPHAN flag Pavel Begunkov
2021-11-30 15:18 ` [RFC 02/12] skbuff: pass a struct ubuf_info in msghdr Pavel Begunkov
2021-11-30 15:18 ` [RFC 03/12] net/udp: add support msgdr::msg_ubuf Pavel Begunkov
2021-11-30 15:18 ` [RFC 04/12] net: add zerocopy_sg_from_iter for bvec Pavel Begunkov
2021-11-30 15:18 ` [RFC 05/12] net: optimise page get/free for bvec zc Pavel Begunkov
2021-12-01 19:20 ` Jonathan Lemon
2021-12-01 20:17 ` Pavel Begunkov
2021-11-30 15:18 ` [RFC 06/12] io_uring: add send notifiers registration Pavel Begunkov
2021-11-30 15:18 ` [RFC 07/12] io_uring: infrastructure for send zc notifications Pavel Begunkov
2021-11-30 15:18 ` [RFC 08/12] io_uring: wire send zc request type Pavel Begunkov
2021-11-30 15:18 ` [RFC 09/12] io_uring: add an option to flush zc notifications Pavel Begunkov
2021-11-30 15:18 ` [RFC 10/12] io_uring: opcode independent fixed buf import Pavel Begunkov
2021-11-30 15:18 ` [RFC 11/12] io_uring: sendzc with fixed buffers Pavel Begunkov
2021-11-30 23:22 ` kernel test robot
2021-12-01 9:18 ` kernel test robot [this message]
2021-11-30 15:19 ` [RFC 12/12] io_uring: cache struct ubuf_info Pavel Begunkov
2021-12-01 3:10 ` [RFC 00/12] io_uring zerocopy send David Ahern
2021-12-01 15:32 ` Pavel Begunkov
2021-12-01 17:57 ` David Ahern
2021-12-01 19:11 ` Pavel Begunkov
2021-12-01 19:20 ` David Ahern
2021-12-01 20:15 ` Pavel Begunkov
2021-12-01 21:51 ` Martin KaFai Lau
2021-12-01 22:35 ` David Ahern
2021-12-01 23:07 ` Martin KaFai Lau
2021-12-01 23:18 ` Pavel Begunkov
2021-12-02 15:48 ` Pavel Begunkov
2021-12-02 17:40 ` Martin KaFai Lau
2021-12-01 20:42 ` Pavel Begunkov
2021-12-01 14:31 ` Pavel Begunkov
2021-12-01 17:49 ` David Ahern
2021-12-01 19:59 ` Pavel Begunkov
2021-12-01 18:10 ` Willem de Bruijn
2021-12-01 19:59 ` Pavel Begunkov
2021-12-01 20:29 ` Pavel Begunkov
2021-12-02 0:36 ` Willem de Bruijn
2021-12-02 16:25 ` Pavel Begunkov
2021-12-02 0:32 ` Willem de Bruijn
2021-12-02 16:45 ` Pavel Begunkov
2021-12-02 21:25 ` Willem de Bruijn
2021-12-03 16:19 ` Pavel Begunkov
2021-12-03 16:30 ` Willem de Bruijn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202112011718.UpQScm5i-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.