public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* lib/iov_iter.c:27:40: sparse: sparse: incorrect type in argument 1 (different address spaces)
@ 2023-11-15 18:17 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2023-11-15 18:17 UTC (permalink / raw)
  To: David Howells; +Cc: oe-kbuild-all, linux-kernel, Christian Brauner

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   c42d9eeef8e5ba9292eda36fd8e3c11f35ee065c
commit: f1982740f5e77090bde41a9b84e257d69ec46598 iov_iter: Convert iterate*() to inline funcs
date:   7 weeks ago
config: csky-randconfig-r111-20231115 (https://download.01.org/0day-ci/archive/20231116/202311160203.T48OaruS-lkp@intel.com/config)
compiler: csky-linux-gcc (GCC) 13.2.0
reproduce: (https://download.01.org/0day-ci/archive/20231116/202311160203.T48OaruS-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202311160203.T48OaruS-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> lib/iov_iter.c:27:40: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *to @@     got void [noderef] __user *iter_to @@
   lib/iov_iter.c:27:40: sparse:     expected void *to
   lib/iov_iter.c:27:40: sparse:     got void [noderef] __user *iter_to
   lib/iov_iter.c:57:46: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void const *from @@     got void [noderef] __user *iter_from @@
   lib/iov_iter.c:57:46: sparse:     expected void const *from
   lib/iov_iter.c:57:46: sparse:     got void [noderef] __user *iter_from
   lib/iov_iter.c: note: in included file (through include/linux/sched/task.h, include/linux/sched/signal.h, include/linux/rcuwait.h, ...):
   include/linux/uaccess.h:87:38: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void const *from @@     got void const [noderef] __user *from @@
   include/linux/uaccess.h:87:38: sparse:     expected void const *from
   include/linux/uaccess.h:87:38: sparse:     got void const [noderef] __user *from
   lib/iov_iter.c: note: in included file:
   include/net/checksum.h:33:39: sparse: sparse: incorrect type in argument 3 (different base types) @@     expected restricted __wsum [usertype] sum @@     got unsigned int @@
   include/net/checksum.h:33:39: sparse:     expected restricted __wsum [usertype] sum
   include/net/checksum.h:33:39: sparse:     got unsigned int
   include/net/checksum.h:41:45: sparse: sparse: incorrect type in argument 3 (different base types) @@     expected restricted __wsum [usertype] sum @@     got unsigned int @@
   include/net/checksum.h:41:45: sparse:     expected restricted __wsum [usertype] sum
   include/net/checksum.h:41:45: sparse:     got unsigned int

vim +27 lib/iov_iter.c

    17	
    18	static __always_inline
    19	size_t copy_to_user_iter(void __user *iter_to, size_t progress,
    20				 size_t len, void *from, void *priv2)
    21	{
    22		if (should_fail_usercopy())
    23			return len;
    24		if (access_ok(iter_to, len)) {
    25			from += progress;
    26			instrument_copy_to_user(iter_to, from, len);
  > 27			len = raw_copy_to_user(iter_to, from, len);
    28		}
    29		return len;
    30	}
    31	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 2+ messages in thread

* lib/iov_iter.c:27:40: sparse: sparse: incorrect type in argument 1 (different address spaces)
@ 2024-01-05  6:55 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2024-01-05  6:55 UTC (permalink / raw)
  To: David Howells; +Cc: oe-kbuild-all, linux-kernel, Christian Brauner

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   1f874787ed9a2d78ed59cb21d0d90ac0178eceb0
commit: f1982740f5e77090bde41a9b84e257d69ec46598 iov_iter: Convert iterate*() to inline funcs
date:   3 months ago
config: csky-randconfig-r111-20231115 (https://download.01.org/0day-ci/archive/20240105/202401051457.EDSUSsof-lkp@intel.com/config)
compiler: csky-linux-gcc (GCC) 13.2.0
reproduce: (https://download.01.org/0day-ci/archive/20240105/202401051457.EDSUSsof-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202401051457.EDSUSsof-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> lib/iov_iter.c:27:40: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *to @@     got void [noderef] __user *iter_to @@
   lib/iov_iter.c:27:40: sparse:     expected void *to
   lib/iov_iter.c:27:40: sparse:     got void [noderef] __user *iter_to
   lib/iov_iter.c:57:46: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void const *from @@     got void [noderef] __user *iter_from @@
   lib/iov_iter.c:57:46: sparse:     expected void const *from
   lib/iov_iter.c:57:46: sparse:     got void [noderef] __user *iter_from
   lib/iov_iter.c: note: in included file (through include/linux/sched/task.h, include/linux/sched/signal.h, include/linux/rcuwait.h, ...):
   include/linux/uaccess.h:87:38: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void const *from @@     got void const [noderef] __user *from @@
   include/linux/uaccess.h:87:38: sparse:     expected void const *from
   include/linux/uaccess.h:87:38: sparse:     got void const [noderef] __user *from
   lib/iov_iter.c: note: in included file:
   include/net/checksum.h:33:39: sparse: sparse: incorrect type in argument 3 (different base types) @@     expected restricted __wsum [usertype] sum @@     got unsigned int @@
   include/net/checksum.h:33:39: sparse:     expected restricted __wsum [usertype] sum
   include/net/checksum.h:33:39: sparse:     got unsigned int
   include/net/checksum.h:41:45: sparse: sparse: incorrect type in argument 3 (different base types) @@     expected restricted __wsum [usertype] sum @@     got unsigned int @@
   include/net/checksum.h:41:45: sparse:     expected restricted __wsum [usertype] sum
   include/net/checksum.h:41:45: sparse:     got unsigned int

vim +27 lib/iov_iter.c

    17	
    18	static __always_inline
    19	size_t copy_to_user_iter(void __user *iter_to, size_t progress,
    20				 size_t len, void *from, void *priv2)
    21	{
    22		if (should_fail_usercopy())
    23			return len;
    24		if (access_ok(iter_to, len)) {
    25			from += progress;
    26			instrument_copy_to_user(iter_to, from, len);
  > 27			len = raw_copy_to_user(iter_to, from, len);
    28		}
    29		return len;
    30	}
    31	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-01-05  6:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-05  6:55 lib/iov_iter.c:27:40: sparse: sparse: incorrect type in argument 1 (different address spaces) kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2023-11-15 18:17 kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox