mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Dylan Yudaken <dylany@fb.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	Jens Axboe <axboe@kernel.dk>
Subject: io_uring/net.c:564:44: sparse: sparse: incorrect type in assignment (different address spaces)
Date: Fri, 5 Aug 2022 11:14:05 +0800	[thread overview]
Message-ID: <202208051104.7NeIlCzj-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   31be1d0fbd950395701d9fd47d8fb1f99c996f61
commit: 9bb66906f23e50d6db1e11f7498b72dfca1982a2 io_uring: support multishot in recvmsg
date:   11 days ago
config: alpha-randconfig-s043-20220804 (https://download.01.org/0day-ci/archive/20220805/202208051104.7NeIlCzj-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 12.1.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.4-39-gce1a6720-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9bb66906f23e50d6db1e11f7498b72dfca1982a2
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 9bb66906f23e50d6db1e11f7498b72dfca1982a2
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=alpha SHELL=/bin/bash

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>

sparse warnings: (new ones prefixed by >>)
   io_uring/net.c: note: in included file (through io_uring/io_uring.h):
   io_uring/slist.h:138:29: sparse: sparse: no newline at end of file
>> io_uring/net.c:564:44: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected void [noderef] __user *msg_control_user @@     got void * @@
   io_uring/net.c:564:44: sparse:     expected void [noderef] __user *msg_control_user
   io_uring/net.c:564:44: sparse:     got void *
>> io_uring/net.c:569:14: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected void [noderef] __user * @@     got void * @@
   io_uring/net.c:569:14: sparse:     expected void [noderef] __user *
   io_uring/net.c:569:14: sparse:     got void *

vim +564 io_uring/net.c

   548	
   549	static int io_recvmsg_prep_multishot(struct io_async_msghdr *kmsg,
   550					     struct io_sr_msg *sr, void __user **buf,
   551					     size_t *len)
   552	{
   553		unsigned long ubuf = (unsigned long) *buf;
   554		unsigned long hdr;
   555	
   556		hdr = sizeof(struct io_uring_recvmsg_out) + kmsg->namelen +
   557			kmsg->controllen;
   558		if (*len < hdr)
   559			return -EFAULT;
   560	
   561		if (kmsg->controllen) {
   562			unsigned long control = ubuf + hdr - kmsg->controllen;
   563	
 > 564			kmsg->msg.msg_control_user = (void *) control;
   565			kmsg->msg.msg_controllen = kmsg->controllen;
   566		}
   567	
   568		sr->buf = *buf; /* stash for later copy */
 > 569		*buf = (void *) (ubuf + hdr);
   570		kmsg->payloadlen = *len = *len - hdr;
   571		return 0;
   572	}
   573	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

                 reply	other threads:[~2022-08-05  3:14 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202208051104.7NeIlCzj-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=axboe@kernel.dk \
    --cc=dylany@fb.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®