[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202207041919.hbuajt5T-lkp@intel.com>
Date: Mon, 4 Jul 2022 19:11:57 +0800
From: kernel test robot <lkp@...el.com>
To: David Howells <dhowells@...hat.com>
Cc: kbuild-all@...ts.01.org,
GNU/Weeb Mailing List <gwml@...r.gnuweeb.org>,
linux-kernel@...r.kernel.org
Subject: [ammarfaizi2-block:dhowells/linux-fs/netfs-linked-list 2/61]
lib/iov_iter.c:1803:9: sparse: sparse: incorrect type in argument 2
(different address spaces)
tree: https://github.com/ammarfaizi2/linux-block dhowells/linux-fs/netfs-linked-list
head: ce4670495468b797b0c5927fcb661bc0da48b9ab
commit: 0ac76aa3371bb25ad7921628f97c51a225ded090 [2/61] iov_iter: Add a general purpose iteration function
config: arc-randconfig-s032-20220703 (https://download.01.org/0day-ci/archive/20220704/202207041919.hbuajt5T-lkp@intel.com/config)
compiler: arceb-elf-gcc (GCC) 11.3.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://github.com/ammarfaizi2/linux-block/commit/0ac76aa3371bb25ad7921628f97c51a225ded090
git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
git fetch --no-tags ammarfaizi2-block dhowells/linux-fs/netfs-linked-list
git checkout 0ac76aa3371bb25ad7921628f97c51a225ded090
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arc SHELL=/bin/bash
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@...el.com>
sparse warnings: (new ones prefixed by >>)
>> lib/iov_iter.c:1803:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const *p @@ got void [noderef] __user *[assigned] base @@
lib/iov_iter.c:1803:9: sparse: expected void const *p
lib/iov_iter.c:1803:9: sparse: got void [noderef] __user *[assigned] base
lib/iov_iter.c: note: in included file (through include/linux/uaccess.h, include/linux/sched/task.h, include/linux/sched/signal.h, ...):
arch/arc/include/asm/uaccess.h:590:33: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned char *d_char @@ got void [noderef] __user *to @@
arch/arc/include/asm/uaccess.h:590:33: sparse: expected unsigned char *d_char
arch/arc/include/asm/uaccess.h:590:33: sparse: got void [noderef] __user *to
lib/iov_iter.c: note: in included file:
include/net/checksum.h:31:39: sparse: sparse: incorrect type in argument 3 (different base types) @@ expected restricted __wsum [usertype] sum @@ got unsigned int @@
include/net/checksum.h:31:39: sparse: expected restricted __wsum [usertype] sum
include/net/checksum.h:31:39: sparse: got unsigned int
include/net/checksum.h:39:45: sparse: sparse: incorrect type in argument 3 (different base types) @@ expected restricted __wsum [usertype] sum @@ got unsigned int @@
include/net/checksum.h:39:45: sparse: expected restricted __wsum [usertype] sum
include/net/checksum.h:39:45: sparse: got unsigned int
vim +1803 lib/iov_iter.c
1779
1780 /**
1781 * iov_iter_scan - Scan a source iter
1782 * @i: The iterator to scan
1783 * @bytes: The amount of buffer/data to scan
1784 * @scanner: The function to call for each bit
1785 * @priv: Private data to pass to the scanner function
1786 *
1787 * Scan an iterator, passing each segment to the scanner function. If the
1788 * scanner returns an error at any time, scanning stops and the error is
1789 * returned, otherwise the sum of the scanner results is returned.
1790 */
1791 ssize_t iov_iter_scan(struct iov_iter *i, size_t bytes,
1792 ssize_t (*scanner)(struct iov_iter *i, const void *p,
1793 size_t len, size_t off, void *priv),
1794 void *priv)
1795 {
1796 ssize_t ret = 0, scanned = 0;
1797
1798 if (!bytes)
1799 return 0;
1800 if (iter_is_iovec(i))
1801 might_fault();
1802
> 1803 iterate_and_advance(
1804 i, bytes, base, len, off, ({
1805 ret = scanner(i, base, len, off, priv);
1806 if (ret < 0)
1807 break;
1808 scanned += ret;
1809 }), ({
1810 ret = scanner(i, base, len, off, priv);
1811 if (ret < 0)
1812 break;
1813 scanned += ret;
1814 })
1815 );
1816 return ret < 0 ? ret : scanned;
1817 }
1818 EXPORT_SYMBOL(iov_iter_scan);
1819
--
0-DAY CI Kernel Test Service
https://01.org/lkp
Powered by blists - more mailing lists