All of lore.kernel.org
 help / color / mirror / Atom feed
* [dhowells-fs:ceph-iter 1/18] lib/iov_iter.c:582:9: sparse: sparse: incorrect type in argument 1 (different address spaces)
@ 2023-08-08  7:21 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2023-08-08  7:21 UTC (permalink / raw)
  To: David Howells; +Cc: oe-kbuild-all

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git ceph-iter
head:   672499b5bfaeda1769d9eab9c9a08f4c2b2e4bf5
commit: f008e454544ebdcf3742c4d4e3d06abe5868be00 [1/18] iov_iter: Add function to see if buffer is all zeros
config: x86_64-randconfig-r071-20230807 (https://download.01.org/0day-ci/archive/20230808/202308081520.3nhfaFPs-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce: (https://download.01.org/0day-ci/archive/20230808/202308081520.3nhfaFPs-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/202308081520.3nhfaFPs-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> lib/iov_iter.c:582:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const *const p @@     got void [noderef] __user *[assigned] base @@
   lib/iov_iter.c:582:9: sparse:     expected void const *const p
   lib/iov_iter.c:582:9: sparse:     got void [noderef] __user *[assigned] base
   lib/iov_iter.c:582:9: sparse: sparse: subtraction of different types can't work (different address spaces)
   lib/iov_iter.c:582:9: sparse: sparse: subtraction of different types can't work (different address spaces)
   lib/iov_iter.c: note: in included file (through arch/x86/include/asm/uaccess.h, include/linux/uaccess.h, include/linux/sched/task.h, ...):
   arch/x86/include/asm/uaccess_64.h:88:24: sparse: sparse: cast removes address space '__user' of expression
   arch/x86/include/asm/uaccess_64.h:88:24: sparse: sparse: cast removes address space '__user' of expression
   arch/x86/include/asm/uaccess_64.h:88:24: sparse: sparse: cast removes address space '__user' of expression
   arch/x86/include/asm/uaccess_64.h:88:24: sparse: sparse: cast removes address space '__user' of expression
   arch/x86/include/asm/uaccess_64.h:88:24: sparse: sparse: cast removes address space '__user' of expression
   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: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
   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
   lib/iov_iter.c: note: in included file (through arch/x86/include/asm/uaccess.h, include/linux/uaccess.h, include/linux/sched/task.h, ...):
   arch/x86/include/asm/uaccess_64.h:88:24: sparse: sparse: cast removes address space '__user' of expression
   arch/x86/include/asm/uaccess_64.h:88:24: sparse: sparse: cast removes address space '__user' of expression
   arch/x86/include/asm/uaccess_64.h:88:24: sparse: sparse: cast removes address space '__user' of expression
   arch/x86/include/asm/uaccess_64.h:88:24: sparse: sparse: cast removes address space '__user' of expression
   arch/x86/include/asm/uaccess_64.h:88:24: sparse: sparse: cast removes address space '__user' of expression

vim +582 lib/iov_iter.c

   568	
   569	/**
   570	 * iov_iter_is_zero - Return true if the buffer is entirely zeroed
   571	 * @i: The iterator describing the buffer
   572	 * @count: Amount of buffer to scan
   573	 *
   574	 * Scans the specified amount of the supplied buffer and returns true if only
   575	 * zero bytes are found therein and false otherwise.
   576	 */
   577	bool iov_iter_is_zero(const struct iov_iter *i, size_t count)
   578	{
   579		struct iov_iter j = *i, *pj = &j;
   580		void *p;
   581	
 > 582		iterate_and_advance(pj, count, base, len, count,
   583				    ({ p = memchr_inv(base, 0, len); p ? p - base : len; }),
   584				    ({ p = memchr_inv(base, 0, len); p ? p - base : len; })
   585		)
   586	
   587		return !count;
   588	}
   589	EXPORT_SYMBOL(iov_iter_is_zero);
   590	

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

^ permalink raw reply	[flat|nested] 2+ messages in thread
* [dhowells-fs:ceph-iter 1/18] lib/iov_iter.c:582:9: sparse: sparse: incorrect type in argument 1 (different address spaces)
@ 2023-08-07  5:32 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2023-08-07  5:32 UTC (permalink / raw)
  To: David Howells; +Cc: oe-kbuild-all

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git ceph-iter
head:   672499b5bfaeda1769d9eab9c9a08f4c2b2e4bf5
commit: f008e454544ebdcf3742c4d4e3d06abe5868be00 [1/18] iov_iter: Add function to see if buffer is all zeros
config: powerpc-randconfig-r081-20230807 (https://download.01.org/0day-ci/archive/20230807/202308071349.NFP7QACA-lkp@intel.com/config)
compiler: powerpc-linux-gcc (GCC) 12.3.0
reproduce: (https://download.01.org/0day-ci/archive/20230807/202308071349.NFP7QACA-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/202308071349.NFP7QACA-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> lib/iov_iter.c:582:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const *s @@     got void [noderef] __user *[assigned] base @@
   lib/iov_iter.c:582:9: sparse:     expected void const *s
   lib/iov_iter.c:582:9: sparse:     got void [noderef] __user *[assigned] base
>> lib/iov_iter.c:582:9: sparse: sparse: subtraction of different types can't work (different address spaces)
>> lib/iov_iter.c:582:9: sparse: sparse: subtraction of different types can't work (different address spaces)

vim +582 lib/iov_iter.c

   568	
   569	/**
   570	 * iov_iter_is_zero - Return true if the buffer is entirely zeroed
   571	 * @i: The iterator describing the buffer
   572	 * @count: Amount of buffer to scan
   573	 *
   574	 * Scans the specified amount of the supplied buffer and returns true if only
   575	 * zero bytes are found therein and false otherwise.
   576	 */
   577	bool iov_iter_is_zero(const struct iov_iter *i, size_t count)
   578	{
   579		struct iov_iter j = *i, *pj = &j;
   580		void *p;
   581	
 > 582		iterate_and_advance(pj, count, base, len, count,
   583				    ({ p = memchr_inv(base, 0, len); p ? p - base : len; }),
   584				    ({ p = memchr_inv(base, 0, len); p ? p - base : len; })
   585		)
   586	
   587		return !count;
   588	}
   589	EXPORT_SYMBOL(iov_iter_is_zero);
   590	

-- 
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:[~2023-08-08  7:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-08  7:21 [dhowells-fs:ceph-iter 1/18] lib/iov_iter.c:582:9: sparse: sparse: incorrect type in argument 1 (different address spaces) kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2023-08-07  5:32 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.